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.
these are applied by adding constraints, drivers, control bones etc. making it possible to re-apply changes & improvements to many rigs at once.
testcase makes a finger rig (like in BBB) from 3 bones, the base tagged with an id property "type":"finger".
still missing is a way to update the driver dep's
also fixed an error in the property UI when the active bone is not on the active layer.
This means you can have a pose bone for eg and get the path...
pose.bones["Bone"]
uses rna internal functions, so will work for sequence strips etc.
- StructRNA.get(), used for getting ID props without exceptions...
val = C.object["someKey"]
or..
val = C.object.get("someKey", "defaultValue") # wont raise an error
- change rna property for testing if rna props are editable, test the flag rather then calling the function since the function depends on blenders state.
- fix a python exception with the ID-Property popup UI (when editing in more then 1 step)
- remove functions such as operator_int(), operator_enum(), operator_string
this mixed with keyword arguments in a way that made them hard to read.
Instead, have operator() always return properties rather then needing an argument.
- rename prop_pointer() --> prop_object(), pointer is more a C thing.
- missed item_enumR(), rename to prop_enum()
- property editor can now set button min/max values and edit the tooltip
- custom props tooltips were not displayed
- cleanup the property UI
- remove hacks that were used for editing (edit is now a popup operator)
- object.children was broken
however this meant the invoke function could not modify properties for exec to use (unless it called exec directly after)
since the popup for eg would re-instance the python class each time.
now use the operator properties directly through rna without an automatic copy.
now an operator attribute is accessed like this...
self.path --> self.properties.path
only implimented min/max precision & step.
at the moment there is no way to edit these other then via python
example of setting UI limits...
>>> C.object['foo'] = 0.5
>>> C.object['_RNA_UI'] = {'foo': {'step': 0.5, 'soft_max': 10.0, 'soft_min': 0.0, 'precision': 2, 'description': 'Some setting'}}
Also fixed typo's: precission -> precision
this could be supported again easily however it leads typo's & api changes not showing any errors.
This broke povray export.
Solution for now is to allow setting private properties starting with '_'
eg,
ob = bpy.context.object
ob._foo = [1,2,3] # this is a python list, it will stay only as long as this PyObject is active
ob.foo = 1 # raises an error!, only for rna properties
ob["foo"] = 1 # converts to an ID property and is saved
using the underscore like this should really be used for classes internally.
- povray failed on armatures
- menu key wasn't using WM_keymap_add_menu