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>2010-01-16 01:40:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-16 01:40:33 +0300
commit5272991e8b91c527fbe3923d75ae2c5148dd7177 (patch)
tree84c871abe7d084a775ff7ffab5033c08d085ed32 /source/blender/editors/armature
parent2b3a6b38b764717878de39a97feeee186e3694ad (diff)
generic operator menu was searching for "type" and using the first enum property if it wasnt found.
this is too arbitrary and could break if roperty order is changed. store the property in the operator type that is to be used for menu and enum search func's. python function for searching operator enums on invoke. (just need dynamic python enums now) wm.invoke_search_popup(self)
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c12
-rw-r--r--source/blender/editors/armature/poselib.c3
-rw-r--r--source/blender/editors/armature/poseobject.c2
3 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 410da6662aa..cf7cd3e1f27 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -1384,7 +1384,7 @@ void ARMATURE_OT_flags_set (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", prop_bone_setting_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", prop_bone_setting_types, 0, "Type", "");
RNA_def_enum(ot->srna, "mode", prop_bone_setting_modes, 0, "Mode", "");
}
@@ -1404,7 +1404,7 @@ void POSE_OT_flags_set (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", prop_bone_setting_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", prop_bone_setting_types, 0, "Type", "");
RNA_def_enum(ot->srna, "mode", prop_bone_setting_modes, 0, "Mode", "");
}
@@ -2164,7 +2164,7 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", "");
}
/* **************** undo for armatures ************** */
@@ -3200,7 +3200,7 @@ void ARMATURE_OT_merge (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", merge_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", merge_types, 0, "Type", "");
}
/* ************** END Add/Remove stuff in editmode ************ */
@@ -3973,7 +3973,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", prop_editarm_clear_parent_types, 0, "ClearType", "What way to clear parenting");
+ ot->prop= RNA_def_enum(ot->srna, "type", prop_editarm_clear_parent_types, 0, "ClearType", "What way to clear parenting");
}
/* **************** Selections ******************/
@@ -5559,7 +5559,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
- RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with.");
+ ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with.");
}
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 0837e9cb48a..f4cf907ed4b 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -519,7 +519,8 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot)
/* properties */
prop= RNA_def_enum(ot->srna, "pose", prop_poses_dummy_types, 0, "Pose", "The pose to remove");
- RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
+ RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
+ ot->prop= prop;
}
static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index df5f551fb0c..d26238150ca 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -1617,7 +1617,7 @@ void POSE_OT_autoside_names (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
- RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with.");
+ ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with.");
}
/* ********************************************** */