diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-12-28 06:45:24 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-12-28 06:45:24 +0300 |
commit | 860e46082f24afdad9e40e15ac04d35f06924c10 (patch) | |
tree | 3658c29ab64a23821a865df456fd31f3c4001fc9 /source/blender/makesrna/intern/rna_pose.c | |
parent | 03c1e4374bbc796d3128057ee2efe870b366a760 (diff) |
Assorted Animation/RNA fixes:
* Fix for compiler warning in mesh.c from previous commit
* Fix for wrong name for dopesheet filter button used for meshes
* Added RNA defines for the default values for quaternion and axis-angle rotations, so that clearing these to their default values "does the right thing (TM)"
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index c7aca9c9738..7e2b9d7875b 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -638,6 +638,9 @@ static void rna_def_pose_channel(BlenderRNA *brna) {ROT_MODE_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"}, {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."}, {0, NULL, 0, NULL, NULL}}; + + static float default_quat[4] = {1,0,0,0}; /* default quaternion values */ + static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */ StructRNA *srna; PropertyRNA *prop; @@ -665,7 +668,7 @@ 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", ""); - /* Baked Bone Path cache data s*/ + /* Baked Bone Path cache data */ prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "pathsf"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -711,6 +714,7 @@ static void rna_def_pose_channel(BlenderRNA *brna) prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION); RNA_def_property_float_sdna(prop, NULL, "quat"); RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable"); + RNA_def_property_float_array_default(prop, default_quat); RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions."); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update"); @@ -721,6 +725,7 @@ static void rna_def_pose_channel(BlenderRNA *brna) RNA_def_property_array(prop, 4); // TODO: maybe we'll need to define the 'default value' getter too... RNA_def_property_float_funcs(prop, "rna_PoseChannel_rotation_axis_angle_get", "rna_PoseChannel_rotation_axis_angle_set", NULL); RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable"); + RNA_def_property_float_array_default(prop, default_axisAngle); RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation."); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update"); |