[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34547] trunk/blender/release/scripts/ keyingsets/keyingsets_builtins.py: "Whole Character" KeyingSet Bugfix: RNA paths for custom properties

Joshua Leung aligorith at gmail.com
Sat Jan 29 10:47:49 CET 2011


Revision: 34547
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34547
Author:   aligorith
Date:     2011-01-29 09:47:48 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
"Whole Character" KeyingSet Bugfix: RNA paths for custom properties
were getting formed wrongly

Although the RNA paths for the custom properties could get evaluated
correctly, keyframe status highlights in buttons didn't always work
correctly, and would lead to a duplicate F-Curve for the same setting
getting created.

Modified Paths:
--------------
    trunk/blender/release/scripts/keyingsets/keyingsets_builtins.py

Modified: trunk/blender/release/scripts/keyingsets/keyingsets_builtins.py
===================================================================
--- trunk/blender/release/scripts/keyingsets/keyingsets_builtins.py	2011-01-29 03:01:51 UTC (rev 34546)
+++ trunk/blender/release/scripts/keyingsets/keyingsets_builtins.py	2011-01-29 09:47:48 UTC (rev 34547)
@@ -236,11 +236,17 @@
     # helper to add some bone's property to the Keying Set
     def addProp(ksi, ks, bone, prop, index=-1, use_groups=True):        
         # add the property name to the base path
-        path = path_add_property(bone.path_from_id(), prop)
+        id_path = bone.path_from_id()
+        id_block = bone.id_data
+		
+        if prop.startswith('['): 
+            # custom properties
+            path = id_path + prop
+        else: 
+            # standard transforms/properties
+            path = path_add_property(id_path, prop)
         
         # add Keying Set entry for this...
-        id_block = bone.id_data
-        
         if use_groups:
             ks.paths.add(id_block, path, index, group_method='NAMED', group_name=bone.name)
         else:




More information about the Bf-blender-cvs mailing list