forked from bartvdbraak/blender
RNA api
- EditBone was missing 'selected' - renamed 'selectable' to --> 'restrict_select', matching object mode. - renamed 'active_pchan' --> 'active_pose_bone'
This commit is contained in:
parent
f28975dbc4
commit
dcd1642121
@ -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"
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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", "");
|
||||
|
Loading…
Reference in New Issue
Block a user