diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-18 11:40:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-18 11:40:18 +0300 |
commit | 318e9aa5d10ddeca60f838d564ce0da829233771 (patch) | |
tree | dac336b034bd04a8a63d5031ee9ab4ddf114fbd5 /release/scripts/modules/rna_prop_ui.py | |
parent | 1e1a0078da2e5c1c70ad881d1a45b5e0553a1424 (diff) |
- rna attribute setting problem, class instances could not set their own attributes because they are blocked by our own internal setattr.
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
Diffstat (limited to 'release/scripts/modules/rna_prop_ui.py')
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index 461ce929593..8ef50e20d76 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -100,7 +100,7 @@ def draw(layout, context, context_member): if convert_to_pyobject and not hasattr(val_orig, "len"): row.itemL(text=val_draw) else: - row.itemR(rna_item, '["' + key + '"]', text="") + row.itemR(rna_item, '["%s"]' % key, text="") row = split.row(align=True) |