Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-24 20:12:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-24 20:12:32 +0300
commitdcd1642121a14ddc3191399fb7120fe0a15437ce (patch)
treea8ecb6ee3736d94edbecf90136030249d8b2cfba /source/blender
parentf28975dbc493288403bf26e5018213c21a2e131c (diff)
RNA api
- EditBone was missing 'selected' - renamed 'selectable' to --> 'restrict_select', matching object mode. - renamed 'active_pchan' --> 'active_pose_bone'
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_context.h2
-rw-r--r--source/blender/blenkernel/intern/context.c4
-rw-r--r--source/blender/editors/armature/editarmature.c2
-rw-r--r--source/blender/editors/screen/screen_context.c4
-rw-r--r--source/blender/makesrna/intern/rna_armature.c9
5 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index 7f64538b10d..947ec914fa4 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -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);
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index 21549f6b147..164e7a23d92 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -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)
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 78ba73ce5d5..ce3e4cc8f8d 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -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;
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 1ddc19a5ec0..cd80bcde19f 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index f1164cda675..8d84257e219 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -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", "");