933 Commits

Author SHA1 Message Date
David Vierra
23f71061fc Do not emit handleBoundsChangedDone for non-changes. 2015-10-03 01:16:10 -10:00
David Vierra
1167d930ed PendingImportNode now forwards mouse events to its handleNode 2015-10-03 01:15:57 -10:00
David Vierra
63d02760f0 Greatly simplify extractSchematicFromIter 2015-10-03 00:09:22 -10:00
David Vierra
911aa28470 Move tool now imports the transformed form of the moved object
... as you would expect from looking at the live preview of the moved object. Also, intermediate schematics are skipped when the source and destination boxes do not intersect.
2015-10-03 00:08:54 -10:00
David Vierra
9be6563ba2 transform_test now tests selection, rotation, and selection+rotation 2015-10-02 14:03:46 -10:00
David Vierra
16565712d9 Move tool now displays live previews of the rotated blocks 2015-10-02 14:03:30 -10:00
David Vierra
2c531925fb PendingImport now has rotate/scale and transformedDim attributes
transformedDim is recreated whenever the rotate/scale are changed. Its chunks are lazily evaluated.
2015-10-02 14:02:49 -10:00
David Vierra
fc0080015d Fix movable-only BoxHandles not actually being movable. 2015-10-02 14:02:00 -10:00
David Vierra
d6f5b98b95 RotateNode allows degrees and axis to be changed. 2015-10-02 14:01:41 -10:00
David Vierra
986a4fb4fe Refactor RotationTransform, create SelectionTransform 2015-10-02 14:01:08 -10:00
David Vierra
c96a8565bc Use Tool action now has "any" modifiers.
May have undesirable side effects.
2015-10-01 22:34:40 -10:00
David Vierra
37bd7e098a BoxHandle now uses explicit isMoving, isCreating, isResizing flags instead of inferring them from other state 2015-10-01 22:31:20 -10:00
David Vierra
db584cf563 Resizing selection box only triggers immediate chunk loads when mouse button is released. 2015-10-01 22:30:20 -10:00
David Vierra
a5e54c62b5 Refactor drag-to-move out of MoveTool and into BoxHandle.
This is a bit icky - PendingImportNode emits a signal that MoveTool handles by moving the "current import", instead of by moving the PendingImportNode's import.

TODO: Give CloneTool the same treatment.
2015-10-01 22:28:37 -10:00
David Vierra
5deb2f2723 Refactor drag-to-move out of MoveTool and into BoxHandle.
This is a bit icky - PendingImportNode emits a signal that MoveTool handles by moving the "current import", instead of by moving the PendingImportNode's import.

TODO: Give CloneTool the same treatment.
2015-10-01 21:29:25 -10:00
David Vierra
cc569bce1c Refactor PendingImportNode to contain a translate node rather than be one 2015-10-01 17:49:02 -10:00
David Vierra
a91d6b3441 Create rotation input widget in preparation for live rotation. 2015-10-01 17:11:48 -10:00
David Vierra
f5c860f342 Move modifier condition to ViewAction.matchModifiers, handle modifiers==None as "any"
TrackingMouseAction now has "any" modifiers.
2015-10-01 17:11:20 -10:00
David Vierra
dd195c34e8 Refactor BoxHandle in preparation of making it movable. 2015-10-01 17:10:18 -10:00
David Vierra
4015ec033a Add RotationTransform, a proxy dimension that rotates blocks.
Blocks are rotated as their sections are accessed, making this proxy responsive for live editing.
2015-10-01 00:04:37 -10:00
David Vierra
c0e403ed6a TextureAtlas can handle worlds without filenames 2015-10-01 00:03:28 -10:00
David Vierra
257cd3f7fc ChunkUpdate.areaLights returns an appropriately-sized array for lights
... when the level in question has no light arrays.
2015-10-01 00:03:18 -10:00
David Vierra
50c441fa29 displaySchematic updates as chunks are loaded instead of preloading chunks 2015-10-01 00:02:38 -10:00
David Vierra
bc70ff8e67 displaySchematic accepts either a schematic or a dimension 2015-10-01 00:02:21 -10:00
David Vierra
b35e61a670 WorldView.__str__ can handle dimensions without filenames or dimension names. 2015-10-01 00:01:48 -10:00
David Vierra
ee699a1674 WorldEditor.importSchematic[Iter] now accepts either a schematic or a dimension 2015-10-01 00:01:13 -10:00
David Vierra
e814841844 Create a SchematicWorldView and a displaySchematic function
SchematicWorldView is a world view variant with specialized controls for orbiting a world from a fixed distance and center point, and zooming in and out on this world.

displaySchematic can be used, even from non-GUI code, to open a window displaying a single world.
2015-09-29 11:24:53 -10:00
David Vierra
bcbf61f82c Fix logic for deciding if a cell needs a light update.
When a light-emitting block is replaced with one that emits less light, and the light drawn into the block from neighbors is greater than the light emitted by the new block, the drawn light should be considered the new light rather than the block's brightness.
2015-09-28 21:02:54 -10:00
David Vierra
eb6facc20c Collect more stats in relight/with_cython and add some comments 2015-09-28 20:58:57 -10:00
David Vierra
7c58091558 Cache absent sections' coords in RelightCtx and handle ValueError from uncreatable sections. 2015-09-28 20:58:16 -10:00
David Vierra
16d3aa19fa Add more logging info to block_copy relights, and skip empty lists 2015-09-28 20:56:36 -10:00
David Vierra
c162faa262 Skip SkyLight update for Nether and End dimensions 2015-09-28 20:52:24 -10:00
David Vierra
32c1c44465 Kill dead code in relight_test.py 2015-09-28 20:51:44 -10:00
David Vierra
a8169378b1 Better handling of named/unknown BlockTypeSets in SchematicFileAdapter 2015-09-28 10:52:15 -10:00
David Vierra
41d5214bb9 Demote lightmap logger to DEBUG 2015-09-23 01:27:06 -10:00
David Vierra
9ef15e0890 Rework test suite to use pytest fixtures in conftest.py 2015-09-22 16:38:06 -10:00
David Vierra
fd98d50c4e Add report options for py.test 2015-09-22 11:25:24 -10:00
David Vierra
45c5e713ee Add Quit button to error dialog 2015-09-21 11:14:47 -10:00
David Vierra
8ccc71780a Implement "Restart MCEdit" button on error dialog 2015-09-21 09:45:47 -10:00
David Vierra
a4106ad018 Fix misplaced import in main.py
This was causing OpenGL.GL to be loaded too early
2015-09-20 01:01:40 -10:00
David Vierra
c1d6484db4 Cleanup 2015-09-17 20:40:37 -10:00
David Vierra
39a113dab9 Error reporting dialog can (finally) upload error reports to Pastebin. 2015-09-17 20:40:32 -10:00
David Vierra
e11787a4fa centerWidgetInScreen now centers the widget on the screen containing its parent widget. 2015-09-17 20:40:02 -10:00
David Vierra
abcc812e80 Show error reporting dialog on all unhandled exceptions. 2015-09-17 20:39:43 -10:00
David Vierra
83cf434426 Put ShapeWidget in a neat GroupBox with the shape's name in the caption. 2015-09-17 15:54:21 -10:00
David Vierra
4758e6f7dd Add brush shape icons 2015-09-17 03:26:11 -10:00
David Vierra
29c960925c Use QSignalMapper instead of function closures for inventory slots. 2015-09-16 22:06:21 -10:00
David Vierra
17d7afaba2 showProgress no longer shows immediately and no longer processes events
Not processing events means "Cancel" is broken, but it was already broken anyway.
Processing events before the modal dialog is shown can cause edits to occur while the level is saved. (Oops.)
2015-09-16 20:54:41 -10:00
David Vierra
779c84af74 Handle invalid meta values when getting item names
A warning is emitted and a placeholder name is returned.
2015-09-16 20:53:30 -10:00
David Vierra
bfeb5c7e94 Inventory editor now allows items to be dragged from the item list 2015-09-16 20:53:02 -10:00