731 Commits

Author SHA1 Message Date
David Vierra
9d7adf134e EditorSession.WorldInfoPanel -> worldInfoPanel
oops...
2015-05-24 07:58:37 -10:00
David Vierra
9496914e9a Add every pyfile under src/mcedit2 and src/mceditlib to the pyi build.
This brings in synth.l_system even though it isn't imported, and brings in anything else that's only provided for plugins and isn't found by modulefinder.
2015-05-24 06:01:27 -10:00
David Vierra
6a8d95b3a6 Move run_regression_test.py into mceditlib/test 2015-05-24 05:40:22 -10:00
David Vierra
72c85ef125 Remove unused mcedit2/util/scanmodules.py 2015-05-24 05:37:31 -10:00
David Vierra
9599097772 Remove unused mcedit2/util/geometry.py 2015-05-24 05:37:03 -10:00
David Vierra
bed69d95b4 Remove unused files in mcedit2/prefs 2015-05-24 05:36:21 -10:00
David Vierra
3d536c6d47 Remove __init__.py from mcedit2/ui (not a package) 2015-05-24 05:34:42 -10:00
David Vierra
519b21329a GenerateTool doesn't call boundsChanged if no currentGenerator 2015-05-24 04:45:55 -10:00
David Vierra
15cb5e03d7 Update guidelines with new error log locations 2015-05-24 04:26:10 -10:00
David Vierra
580af9bc18 Add a note about not reading the guidelines to the issue guidelines. 2015-05-24 04:23:45 -10:00
David Vierra
2438efdbd0 Use a more sensible default view distance 2015-05-24 04:23:22 -10:00
David Vierra
23fe46ca7b Koch Snowflake plugin now uses boundsChanged to limit the max iterations, and uses glColor to color the lines 2015-05-24 03:55:40 -10:00
David Vierra
11ac62fa24 Line's GL color can now be specified 2015-05-24 03:55:06 -10:00
David Vierra
60b13618f5 Add a boundsChanged method to GeneratePlugin 2015-05-24 03:54:51 -10:00
David Vierra
cc06555d5c Actually reselect the previous generator plugin after it was reloaded. 2015-05-24 03:54:37 -10:00
David Vierra
f78039f1fd Need to use iteritems to iterate registered classes 2015-05-24 03:10:28 -10:00
David Vierra
3a8453a47b Generate tool now responds to plugin classes being loaded and unloaded.
Adds/removes the plugin class to/from the generator type box
Chooses a different generator type when the current type is unloaded
Switches back to the unloaded generator type if the plugin is loaded again
2015-05-24 03:04:02 -10:00
David Vierra
dfa172e85e For automatic unregistration, key plugin classes by the module fullpath.
Can't key them by the module itself because once the module is loaded, classes may already be registered.

Also, checkTimestamps now returns the correct answer.
2015-05-24 01:33:35 -10:00
David Vierra
b5c8b41e1f When in developer mode, reload modified plugins when app is brought to foreground 2015-05-23 14:54:20 -10:00
David Vierra
d2cd7976e7 Add "Developer Mode" toggle to Options menu, remove -debug argument 2015-05-23 14:53:32 -10:00
David Vierra
ae83f9eac7 Add function to record and check timestamps to PluginRef 2015-05-23 13:39:03 -10:00
David Vierra
355a9a4018 Validate GL format only when creating a QGLWidget.
QGLContext cannot be created on its own without using deprecated APIs to bind its output to a widget (or an offscreen render buffer, or a texture in an existing context...). So, allow QGLWidget to create the context and then validate it afterward.

This also sets the default QGLFormat to require OpenGL 1.3 and hardware rendering (called "direct rendering" in QGLFormat)
2015-05-23 13:39:03 -10:00
David Vierra
747e936de6 Disable line ending conversion in .gitattributes 2015-05-22 14:38:20 -10:00
David Vierra
369b4e375e Make currentViewSetting into a settingsOption, cleanup, auto-format, add notes 2015-05-22 14:38:09 -10:00
David Vierra
1337312fc6 Attempt to validate OpenGL capabilities on startup. 2015-05-22 14:27:54 -10:00
David Vierra
d7aa323b0b City: The Random instance is now a parameter instead of a global.
Since it is a parameter, it will be passed to replaced symbols through the `**kw=self.parameters` when constructing symbols.
2015-05-22 13:13:25 -10:00
David Vierra
168bbfa563 Add KeyedVectorAttr, make adapter.metadata accessible through WorldEditor
Add AnvilWorldMetadata.Spawn
Add KeyedVectorAttr, used for Spawn and TileEntity Position
Remove get/setWorldSpawnPosition
2015-05-22 02:58:06 -10:00
David Vierra
123b4ea063 edit_metadata.png -> edit_worldinfo.png 2015-05-22 02:14:28 -10:00
David Vierra
832707170a worldmeta.ui -> worldinfo.ui 2015-05-22 02:13:32 -10:00
David Vierra
54f310a2ac WorldMetaPanel -> WorldInfoPanel 2015-05-22 02:11:36 -10:00
David Vierra
2add2c263e Merge pull request #92 from Rubisk/worldmetadeta
Added World-Metadeta
2015-05-22 02:09:37 -10:00
Rubisk
4a6cc5a013 Fix Translation for World Info Panel 2015-05-17 14:57:22 +02:00
Rubisk
bad40bef77 Updated World Info Panel 2015-05-17 13:35:19 +02:00
Rubisk
914e59ffd3 Added WorldMetaPanel
I need to make it somewhat functional still, but wanted to checkout the
branch for now, I'll stash this commit with the next WorldMetaPanel one.
2015-05-17 00:29:57 +02:00
David Vierra
355346db7b Put a stern warning about imports in main.py
And make sure the shebang line comes first
2015-05-15 21:00:15 -10:00
David Vierra
685031494a Call QCoreApplication.quit instead of raising SystemExit
Not sure it's needed, but it might trigger some cleanup code? Who knows.
2015-05-15 20:58:54 -10:00
David Vierra
3f245f0a48 Revise the introduction to L-systems 2015-05-15 20:58:19 -10:00
David Vierra
5663ad9b71 Add Adrian's City plugin as an example
Could flesh this out and add all kinds of parameters like MINSIZE as options
2015-05-15 00:58:09 -10:00
David Vierra
41ea8634e2 Add LSystemPlugin subclass for Koch Snowflake system 2015-05-15 00:58:09 -10:00
David Vierra
71722a1149 Make plugin rows selectable and not editable 2015-05-15 00:58:08 -10:00
David Vierra
a34957a48b Remove displayName from LSystemPlugin, document displayName in GeneratePlugin
Add class name as fallback for missing displayName
2015-05-15 00:58:08 -10:00
David Vierra
23c274680f LSystemPlugin is now a core component and not a plugin.
Provides a minimal implementation of GeneratePlugin suitable for L-systems.
getOptionsWidget and createInitialSymbol are the only required methods to implement.

Kindly ignore the 'getInputsList' for now, I'm still not sure if it's going to be implemented.
2015-05-15 00:58:07 -10:00
David Vierra
4bb58c1e24 GeneratePlugin: Wrap and adjust docstrings, remove wonky TreeGen 2015-05-15 00:58:07 -10:00
David Vierra
39da111ac9 GenerateTool: Toggling Block or GL Preview no longer updates the other. 2015-05-15 00:58:06 -10:00
David Vierra
65b18f70be Rewrote plugin finding code, added PluginRefs and Plugins dialog
getAllPlugins returns all PluginRefs found so far
detectPlugin tries to find a plugin and returns a PluginRef
findNewPluginsInDir stores a PluginRef for each plugin in the dir

Each PluginRef can be loaded and unloaded, remembers its 'enabled' setting, and provides a displayName and info about loading/unloading errors.

On startup, `findNewPluginsInDir` is called.
Found plugins are retrieved using getAllPlugins and any enabled plugins are loaded.

Plugins dialog lists plugins from getAllPlugins and allows to enable/disable each one.
Reloading is not yet implemented.
2015-05-15 00:58:05 -10:00
David Vierra
ddd6c495c6 Use MCESettings.getNameSpace in camera.py 2015-05-15 00:58:05 -10:00
David Vierra
70a5bd098f Add supporters to About Box as promised in Patreon rewards.
Anyone who donated at least $20 since MCEdit's inception is credited.
2015-05-15 00:58:04 -10:00
Rubisk
eb8e722234 Fixed a bug with the Edit Player button
Fixed a bug causing the Edit Player button to stay looking pressed if
the red X in the top-right got pressed.
2015-05-14 15:21:13 +02:00
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