diff options
author | Roland Hess <me@harkyman.com> | 2009-01-16 21:04:01 +0300 |
---|---|---|
committer | Roland Hess <me@harkyman.com> | 2009-01-16 21:04:01 +0300 |
commit | ef93f8a36e39a67f5d25b0332a6d40e261a6d793 (patch) | |
tree | defbd8a4974f12b7480f66c082ccb221bcb4bfed /source/blender | |
parent | 8252daa40b59d327590ba45d8c4023e1baf494dc (diff) |
Added transform locking. Fixed a bad UI string. Added access to posing data.
Diffstat (limited to 'source/blender')
-rwxr-xr-x | source/blender/makesrna/intern/rna_pose.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index c1561987378..b1258e05f56 100755 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -32,6 +32,7 @@ #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" +#include "DNA_object_types.h" #include "DNA_scene_types.h" #ifdef RNA_RUNTIME @@ -89,10 +90,6 @@ static void rna_def_pose_channel(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "selectflag", BONE_SELECTED); RNA_def_property_ui_text(prop, "Selected", ""); - prop= RNA_def_property(srna, "protected", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "protectflag", POSE_LOCKED); - RNA_def_property_ui_text(prop, "Protected", "Protect channel from being transformed."); - // XXX note: bone groups are stored internally as bActionGroups :) - Aligorith //prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE); //RNA_def_property_int_sdna(prop, NULL, "agrp_index"); @@ -121,7 +118,19 @@ static void rna_def_pose_channel(BlenderRNA *brna) prop= RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "PoseChannel"); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); - RNA_def_property_ui_text(prop, "Parent", "Child of this pose channel."); + RNA_def_property_ui_text(prop, "Child", "Child of this pose channel."); + + prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "loc"); + RNA_def_property_ui_text(prop, "Location", ""); + + prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "size"); + RNA_def_property_ui_text(prop, "Scale", ""); + + prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION); + RNA_def_property_float_sdna(prop, NULL, "quat"); + RNA_def_property_ui_text(prop, "Rotation", "Rotation in Quaternions."); /* These three matrix properties await an implementation of the PROP_MATRIX subtype, which currently doesn't exist. */ /* prop= RNA_def_property(srna, "channel_matrix", PROP_FLOAT, PROP_MATRIX); @@ -171,6 +180,20 @@ static void rna_def_pose_channel(BlenderRNA *brna) prop= RNA_def_property(srna, "custom", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone."); + prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_VECTOR); + RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface."); + + prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_VECTOR); + RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface."); + + prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_VECTOR); + RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface."); } void RNA_def_pose(BlenderRNA *brna) |