David Vierra
ac5e560a1d
Keep track of which plugin module is loading plugin classes.
...
When the plugin module is unloaded, unregister all of its classes.
Plugin modules are also allowed `register()` and `unregister()` functions to use for e.g. monkey-patching MCEdit's internals and other unspeakable things.
2015-05-14 01:30:35 -10:00
David Vierra
c5f1cf49bf
Don't pass an itertools.chain
to nbt.walk
...
nbt.walk only accepts TAG_List and TAG_Compound, not arbitrary iterables.
2015-05-14 00:24:35 -10:00
David Vierra
cbd35c1605
Use catchalls to skip over errors while centering views on players
...
Avoids crashes on badly-formed player data. Should tighten this up to only catch errors in getting the player's position. Should also add a validate function to AnvilPlayerRef (and every other ref, too?)
2015-05-13 22:33:08 -10:00
David Vierra
d10c6440ff
Add raw asset for compass overlay
2015-05-13 21:46:25 -10:00
David Vierra
b22bbcb225
GenerateTool handles an empty generatorTypes and a None currentGenerator.
...
Hopefully this should never happen.
2015-05-13 21:46:00 -10:00
David Vierra
aaefc96f19
Write app version to log file.
...
Duh.
2015-05-13 21:42:54 -10:00
David Vierra
addfa3eab0
Actually abort creating vertex arrays when models are not cooked.
2015-05-13 21:42:40 -10:00
David Vierra
4c6603371f
Encoding pathnames with sys.getfilesystemencoding is always wrong.
...
On Windows this encodes with the current codepage, which often fails for characters not in the codepage.
On Windows, FS functions accept 'unicode' and encode as UTF-16 for WinAPI
On Mac, FS functions accept 'unicode' and encode as UTF-8 for FS API
On Linux, filenames are byte strings and encoding is only a convention. FS functions encode 'unicode' according to locale. On Linux, it is possible to have files whose names cannot be decoded in any character set!
2015-05-13 21:36:31 -10:00
David Vierra
d330a22453
Line draws GL lines with endpoints at block centers
2015-05-13 04:52:40 -10:00
David Vierra
c285151bcf
Line now has a constructor Line(p1, p2)
2015-05-13 04:52:25 -10:00
David Vierra
9a440c92cf
Fill now has a constructor Fill(box, blocktype)
2015-05-13 04:52:16 -10:00
David Vierra
60a2a83a7b
applyReplacements correctly handles symbols without a 'replace'
2015-05-13 04:51:57 -10:00
David Vierra
d203639bb0
Convenience added to GenerateTool
...
GL preview is enabled by default
Undoing a Generate returns the bounding box to the tool
generateInSchematic is provided with the original bounding box
clearSchematic does not remove schematicBounds (should be called generateBounds or something)
2015-05-13 04:51:32 -10:00
David Vierra
d67f115a5c
Auto-format analyze.py and analyze.py
...
Increase default size of analyze dialog
Remove dead code
Improve comments
2015-05-13 01:32:17 -10:00
David Vierra
6d0e89f821
Merge pull request #85 from Rubisk/develop
...
Updated Analyze UI
2015-05-13 01:20:54 -10:00
David Vierra
66f8c17fff
Add an experimental plugin to edit items in StorageDrawers via the Block Inspector.
...
Handles exactly one type of drawer, so not very useful at the moment.
2015-05-13 01:12:40 -10:00
David Vierra
4e9a020f0f
Add a somewhat flaky Generate plugin for L-systems that currently only runs the Koch Snowflake system.
...
This plugin will probably not live for very long as it seems better to make Generate plugins directly for different L-systems.
2015-05-13 01:11:51 -10:00
David Vierra
16460f69d7
Add what appears to be an L-system library for 3D objects
...
Objects can be rendered either as Minecraft block placement commands or as OpenGL rendering commands in the form of scenegraph Nodes.
The huge block of text at the top probably doesn't do much to explain the value of the system, so examples and tutorials will be coming soon.
2015-05-13 01:08:00 -10:00
David Vierra
793fb44daf
Add plugins.py with several registration points for plugin classes to be inserted.
2015-05-13 01:02:11 -10:00
David Vierra
6b83537f3e
Skip files in mods dir that are not files.
2015-05-13 00:31:53 -10:00
David Vierra
f9a6dba4b6
Remove same size check in generateNextSchematic
...
This was stopping generator options from triggering a regen. Come back to this when generated object previews can be moved.
2015-05-12 23:57:18 -10:00
David Vierra
1be1d81fc1
Add TreeGen back in so GenerateTool doesn't crash on zero generator classes.
...
xxx allow zero generator classes
2015-05-12 23:57:17 -10:00
David Vierra
cd7b75d832
Load plugins from a "plugins" folder when frozen or the src/plugins folder when running from source.
2015-05-12 23:57:17 -10:00
David Vierra
3477b59d46
ItemType.name was changed to displayName previously
2015-05-12 23:29:38 -10:00
David Vierra
fe64ea61a5
Added a whole bunch of variations on Bresenham's algorithm and a few tests.
...
The tests check if any of the variations change the algorithm's output to see if I broke anything while making the 3D and fixed-point/scaled variants.
2015-05-12 23:27:23 -10:00
David Vierra
01e08a2d9c
Fleshed out the Generate tool quite a bit.
...
Generate plugins may now provide a scene node for OpenGL previewing instead of Minecraft block previewing
Generate plugins may now generate directly into a world instead of via an intermediate schematic
Documented the functions of the GeneratePlugin class
TreeGen is now broken.
Added "Live Preview", "Block Preview" and "GL Preview" checkboxes.
Added an updatePreview method for plugins to call, e.g. when plugin options change.
Exceptions while running a generator are now caught
Exceptions during Live Preview will disable it.
2015-05-12 23:26:18 -10:00
David Vierra
89e01a809e
Split QuadVertexArrayBuffer off of VertexArrayBuffer
2015-05-12 15:59:30 -10:00
Rubisk
39c85d74d0
Made analyze file writing support unicode
...
(and stopped it from crashing)
2015-05-12 17:30:06 +02:00
Rubisk
b35830a73a
Added option to export analysation results
2015-05-12 16:34:52 +02:00
Rubisk
74c6db1e75
Fixed some small issues with the Analyze Output Panel
2015-05-12 14:09:13 +02:00
Rubisk
eed2c52b78
Updated analyze UI
...
Implement all of CW's feedback/change requests, and updated the analyze
UI.
Next up is export buttons.
2015-05-12 13:38:58 +02:00
Rubisk
fa65763c10
Basic Analyze Tool
...
Just some first things.
2015-05-12 13:38:54 +02:00
Rubisk
fde3d1624b
Fixed an issue causing the fill tool to crash.
2015-05-12 13:38:51 +02:00
David Vierra
7cb73dacf7
Monkeypatch codecs.getwriter to not attempt decoding bytes written to stdout/stderr
2015-05-11 20:59:12 -10:00
David Vierra
e2ce7f170f
Remove junk from old dynamically loaded tools
2015-05-11 20:58:49 -10:00
David Vierra
8429a8d0f5
QComboBox.textChanged was renamed to editTextChanged in Qt4
...
Apparently there is compatibility in place for my version of PySide, but not for some others.
2015-05-11 20:58:29 -10:00
David Vierra
b2c63b4dbe
Fix AttributeError in BlockTypeButton after changing textureAtlas to editorSession
2015-05-11 20:57:56 -10:00
David Vierra
103a5d9728
Fold createToolWidget into SelectBlockTool.__init__
2015-05-11 18:24:08 -10:00
David Vierra
3e2b004cea
More documentation to Vector
2015-05-11 18:23:44 -10:00
David Vierra
699143d916
showProgress displays the dialog after 0.5 seconds instead of after 8 iterations
...
showProgress only accepts a tuple as a status result
2015-05-11 18:18:24 -10:00
David Vierra
ff619ece06
Document geometry.Vector, change __repr__ to return something that can be evaluated
2015-05-11 18:17:39 -10:00
David Vierra
ffc803e7fb
Generate tool now has a rudimentary plugin API and can actually apply a generated object to the world.
...
Add a liveUpdate option
Catch any errors while running the generator and disable liveUpdate if one is caught.
2015-05-11 18:16:37 -10:00
David Vierra
4e507be484
Add setBlock function to WorldEditor
...
Combines the functions of setBlockID and setBlockData. Takes a BlockType or any value convertible to a BlockType
2015-05-11 18:16:29 -10:00
David Vierra
a2c9093ee4
Fix calls to os.path.expanduser with unicode strings.
...
expanduser does not handle unicode strings correctly, tries to decode using ASCII instead of FS encoding. Only workaround is to pass bytestrings
2015-05-11 18:16:19 -10:00
David Vierra
1961997d20
Fail hard when sys.executable does not exist.
...
To help diagnose a problem with sys.executable not having a useful path when the app is in a non-ASCII folder. The user data folder can end up in a completely different location as a different series of folders is created.
2015-05-11 18:15:58 -10:00
David Vierra
30f1ad3e7a
Use a lenient encoder for stdin/out/err to avoid encoding errors when printing to a Windows console.
2015-05-10 01:26:48 -10:00
David Vierra
e0ed1b5048
Disable profiling in blockmodels.pyx to avoid a bug with cython0.22+memoryviews+MSVC
2015-05-09 03:04:24 -10:00
David Vierra
1cd59bc0e4
Add note to readme about updating setuptools
2015-05-09 03:03:28 -10:00
David Vierra
346f5c7c73
Schematics are now exported with an ItemIDs mapping and an itemStackVersion value.
...
Remove and comment out some dead/unused code. INVEditChest shouldn't be important now that we have an inventory editor.
2015-05-08 23:11:02 -10:00
David Vierra
839ae3c3d3
Get selection highlight to display again by connecting to editorSession.dimensionChanged
2015-05-08 23:09:49 -10:00