- 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.
python modules bpy.app, bpy.utils are now included in docs.
C defined python module bpy.props has its docstrings extracted and written directly into sphinx docs since the C methods cant be inspected.
added docstrings to bpy.props and improved some in bpy.utils.
will update online docs tomorrow.
On ubuntu/debian install these tools...
sudo apt-get install pylint pyflakes python-setuptools python-pip
sudo pip install pep8
then run from blenders source dir...
python release/test/pep8.py
This searches for the comments "# <pep8 compliant>" and "# <pep8-80 compliant>", running the checking tools on these scripts only.
* some minor pep8 corrections too.
- the scripts path set in the user preferences or ~/.blender/scripts/ui (io, op, io etc..) will be used to load scripts.
- the default home dir part probably only works in *nix os's
- Added a missing sync callback to vector.toTuple()