now addon path is created using the same path functions and selecting where to save the startup.blend
also made some minor changes to path handling funcs.
- use preset subclass with funcs for updating the keyconfig
- keyconfig filenames are used for the UI names as with presets (so separation anymore)
- keyconfig's are stored in the preset dir (scripts/cfg dir removed)
- only the active keyconfig script is loaded
- some bugfixes for saving keymaps
- user interactions no longer saves keyconfigs too, I think this needs to be re-worked.
developer note...
multiple keyconfigs at once are not really needed now that they are stored & accessed directly in python.
for now I left it alone but we could consider to remove this capability in the future.
Now reloading the user defaults also unloads/loads addons, resetting the state to the one set in the user preferences.
moved addon functions into bpy.utils
- bpy.utils.addon_enable(name, default_set=True)
- bpy.utils.addon_disable(name, default_set=True)
- bpy.utils.addon_reset_all(name, default_set=True)
the user preference operators now just wrap these.
- better error reporting when an addon fails to load
- upload an addon which loads partly but then fails (eg, module loads but class register fails)
- bugfix addon loading, failier to load would leave _bpy_types._register_immediate = False
- added which change on disk are reloaded when enabling.
- bpy.path.module_names() now returns (module_name, module_path) pairs.
- remove XML testing feature
- add 2 modules: bpyml - generic, bpyml_ui - blender spesific. nothing uses these now.
==bpyml_ui module==
defines BPyML_BaseUI and its draw() function which uses the bpyml member of the class instance self.draw_data & self.draw_header_data.
This way declarative ui is opt-in and easy to use by using BPyML_BaseUI as a mix-in class.
==bpyml module==
This module translates a python like XML representation into XML
or simple python blender/ui function calls.
sometag(arg=10) [
another(),
another(key="value")
]
# converts into ...
<sometag arg="10">
<another/>
<another key="value" />
</sometag>
- 2 panels implimented in properties_render_test.xml (Render Dimensions and Stamp)
- only enabled in debug mode.
- poll() functions are not supported yet.
- as stated above experemental, we'll see if this is at all useful, remove if not.
- XML could be replaced with JSON or YAML.
also made all other exporters do this.
Made some internal changes.
- moved path functions from bpy.utils to bpy.path (similar to os.path)
- added functions...
bpy.path.ensure_ext(path, ".ext", case_sensitive=False) # simple function to ensure the extension is set.
bpy.path.resolve_ncase(path) # useful for importing scenes made on windows where the path case doesnt match the files.
- fix for reload (f8) crashing, missing incref when creating the script namespace.
- store the module names rather then the modules for reloading incase the modules get out of date.
- removed the immediate option from C/api and now store in python only, when python loads modules it sets it to False.
- unloading a module would clear the entire TypeMap for all modules, only remove the module types that is being unloaded.
- added some checks for bad class registering, report errors rather then crashing.
there are internal memory problems which can make it crash still.
If you remove all directories in the scripts folder except for 'modules' and 'ui', it runs without crashes.
After a few days of wrong turns and learning the finer points of RNA-type-subclassing the hard way, this commit finally presents a refactored version of the Keying Sets system (now version 2) based on some requirements from Cessen.
For a more thorough discussion of this commit, see
http://sites.google.com/site/aligorith/keyingsets_2.pdf?attredirects=0&d=1
------
The main highlight of this refactor is that relative Keying Sets have now been recoded so that Python callbacks are run to generate the Keying Set's list of paths everytime the Keying Set is used (to insert or delete keyframes), allowing complex heuristics to be used to determine whether a property gets keyframed based on the current context. These checks may include checking on selection status of related entities, or transform locks.
Built-In KeyingSets have also been recoded, and moved from C and out into Python. These are now coded as Relative Keying Sets, and can to some extent serve as basis for adding new relative Keying Sets. However, these have mostly been coded in a slightly 'modular' way which may be confusing for those not so familiar with Python in general. A usable template will be added soon for more general usage.
Keyframing settings (i.e. 'visual', 'needed') can now be specified on a per-path basis now, which is especially useful for Absolute Keying Sets, where control over this is often beneficial.
Most of the places where Auto-Keyframing is performed have been tidied up for consistency. I'm sure quite a few issues still exist there, but these I'll clean up over the next few days.
reloading bpy_types was causing reload to fail. also unregister all modules in the reverse order that they were loaded, so when reloading removed files done hang around.