RNA api
authorCampbell Barton <ideasman42@gmail.com>
Tue, 24 Nov 2009 17:12:32 +0000 (17:12 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 24 Nov 2009 17:12:32 +0000 (17:12 +0000)
- EditBone was missing 'selected'
- renamed 'selectable' to --> 'restrict_select', matching object mode.
- renamed 'active_pchan' --> 'active_pose_bone'

release/scripts/ui/properties_data_bone.py
release/scripts/ui/space_view3d.py
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/intern/context.c
source/blender/editors/armature/editarmature.c
source/blender/editors/screen/screen_context.c
source/blender/makesrna/intern/rna_armature.c

index 3b8911b38964bb6ab666e13822bda5a2508bb21d..40877a6be0836a2cf6679e3c99ea685e2f7f1fb0 100644 (file)
@@ -284,7 +284,7 @@ class BONE_PT_properties(BoneButtonsPanel):
         # reload(rna_prop_ui)
         obj = context.object
         if obj and obj.mode == 'POSE':
-            item = "active_pchan"
+            item = "active_pose_bone"
         else:
             item = "active_bone"
 
index 21521e36cbafa70794af1eed7ea1d19f88cc34e6..edc526f3c553100aebcc2a8a6e501f216e5fd9d1 100644 (file)
@@ -1775,7 +1775,7 @@ class VIEW3D_PT_context_properties(bpy.types.Panel):
         if obj:
             mode = obj.mode
             if mode == 'POSE':
-                return "active_pchan"
+                return "active_pose_bone"
             elif mode == 'EDIT' and obj.type == 'ARMATURE':
                 return "active_bone"
             else:
index 7f64538b10d09802c0073eefecfd4058fb0e51c2..947ec914fa490c488402e9dcd868c4b4dc08614d 100644 (file)
@@ -248,7 +248,7 @@ int CTX_data_selected_editable_bones(const bContext *C, ListBase *list);
 int CTX_data_visible_bones(const bContext *C, ListBase *list);
 int CTX_data_editable_bones(const bContext *C, ListBase *list);
 
-struct bPoseChannel *CTX_data_active_pchan(const bContext *C);
+struct bPoseChannel *CTX_data_active_pose_bone(const bContext *C);
 int CTX_data_selected_pchans(const bContext *C, ListBase *list);
 int CTX_data_visible_pchans(const bContext *C, ListBase *list);
 
index 21549f6b14720d0f7ed72fe466d4817e65d4096d..164e7a23d9298bb3d06a6204fa1e7a4f25cc6f15 100644 (file)
@@ -878,9 +878,9 @@ int CTX_data_editable_bones(const bContext *C, ListBase *list)
        return ctx_data_collection_get(C, "editable_bones", list);
 }
 
-struct bPoseChannel *CTX_data_active_pchan(const bContext *C)
+struct bPoseChannel *CTX_data_active_pose_bone(const bContext *C)
 {
-       return ctx_data_pointer_get(C, "active_pchan");
+       return ctx_data_pointer_get(C, "active_pose_bone");
 }
 
 int CTX_data_selected_pchans(const bContext *C, ListBase *list)
index 78ba73ce5d5630bc6206b08247500d9ff0ee01cd..ce3e4cc8f8d36880e09a4e3134da16b3614f6686 100644 (file)
@@ -5149,7 +5149,7 @@ static int pose_select_parent_exec(bContext *C, wmOperator *op)
        bPoseChannel *pchan,*parent;
 
        /*      Determine if there is an active bone */
-       pchan=CTX_data_active_pchan(C);
+       pchan=CTX_data_active_pose_bone(C);
        if (pchan) {
                bArmature *arm= ob->data;
                parent=pchan->parent;
index 1ddc19a5ec0c853cdb654046c3a2fe1d787c14aa..cd80bcde19fa87df7522e87da3f5580d23125bec 100644 (file)
@@ -64,7 +64,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                        "scene", "selected_objects", "selected_bases",
                        "selected_editable_objects", "selected_editable_bases",
                        "visible_bones", "editable_bones", "selected_bones", "selected_editable_bones",
-                       "visible_pchans", "selected_pchans", "active_bone", "active_pchan",
+                       "visible_pchans", "selected_pchans", "active_bone", "active_pose_bone",
                        "active_base", "active_object", "object", "edit_object",
                        "sculpt_object", "vertex_paint_object", "weight_paint_object",
                        "texture_paint_object", "particle_edit_object", NULL};
@@ -240,7 +240,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                        }
                }
        }
-       else if(CTX_data_equals(member, "active_pchan")) {
+       else if(CTX_data_equals(member, "active_pose_bone")) {
                bPoseChannel *pchan;
                
                pchan= get_active_posechannel(obact);
index f1164cda675775cc09f3983f7882b98014928c00..8d84257e219a624b943424330b624ac8a4b2aea7 100644 (file)
@@ -439,8 +439,8 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
        RNA_def_property_ui_text(prop, "Cyclic Offset", "When bone doesn't have a parent, it receives cyclic offset effects.");
        RNA_def_property_update(prop, 0, "rna_Armature_update_data");
        
-       prop= RNA_def_property(srna, "selectable", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_UNSELECTABLE);
+       prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_UNSELECTABLE);
        RNA_def_property_ui_text(prop, "Selectable", "Bone is able to be selected");
        RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
 
@@ -610,6 +610,11 @@ static void rna_def_edit_bone(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Locked", "Bone is not able to be transformed when in Edit Mode.");
        RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
 
+       prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED);
+       RNA_def_property_ui_text(prop, "Selected", "");
+       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+
        prop= RNA_def_property(srna, "head_selected", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ROOTSEL);
        RNA_def_property_ui_text(prop, "Head Selected", "");