Changeset View
Standalone View
source/blender/makesrna/intern/rna_pose.c
| Show First 20 Lines • Show All 1,353 Lines • ▼ Show 20 Lines | static void rna_def_pose_channel(BlenderRNA *brna) | ||||
| RNA_def_property_struct_type(prop, "Object"); | RNA_def_property_struct_type(prop, "Object"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | ||||
| RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Custom Object", "Object that defines custom display shape for this bone"); | prop, "Custom Object", "Object that defines custom display shape for this bone"); | ||||
| RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); | RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_dependency_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_dependency_update"); | ||||
| prop = RNA_def_property(srna, "custom_shape_scale", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "custom_shape_scale_xyz", PROP_FLOAT, PROP_XYZ); | ||||
| RNA_def_property_float_sdna(prop, NULL, "custom_scale"); | RNA_def_property_float_sdna(prop, NULL, "custom_scale_xyz"); | ||||
| RNA_def_property_range(prop, 0.0f, 1000.0f); | RNA_def_property_flag(prop, PROP_PROPORTIONAL); | ||||
| RNA_def_property_float_array_default(prop, rna_default_scale_3d); | |||||
| RNA_def_property_ui_text(prop, "Custom Shape Scale", "Adjust the size of the custom shape"); | RNA_def_property_ui_text(prop, "Custom Shape Scale", "Adjust the size of the custom shape"); | ||||
sybren: "XYZ" can be removed, as the fact that this is a `float[3]` property already is clear enough. | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | ||||
| prop = RNA_def_property(srna, "custom_shape_translation", PROP_FLOAT, PROP_XYZ); | |||||
Done Inline ActionsI think "Offset" is ambiguous. After all, the rotation is also offsetting the shape rotationally. Use either "Location" (which is technically incorrect, but used in many places in Blender) or "Translation" (which is technically correct but used less often). That way you don't have to suffix it with _loc to remove the ambiguity. sybren: I think "Offset" is ambiguous. After all, the rotation is also offsetting the shape… | |||||
Done Inline ActionsReplace "Offset Location" with "Location". sybren: Replace "Offset Location" with "Location". | |||||
| RNA_def_property_float_sdna(prop, NULL, "custom_translation"); | |||||
| RNA_def_property_flag(prop, PROP_PROPORTIONAL); | |||||
| RNA_def_property_ui_text(prop, "Custom Shape Translation", "Adjust the location of the custom shape"); | |||||
Done Inline ActionsThe scale isn't overridable, but the rotation and translation properties are. I'd say this ought to be consistent. sybren: The scale isn't overridable, but the rotation and translation properties are. I'd say this… | |||||
| RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | |||||
| prop = RNA_def_property(srna, "custom_shape_rotation_euler", PROP_FLOAT, PROP_EULER); | |||||
| RNA_def_property_float_sdna(prop, NULL, "custom_rotation_euler"); | |||||
| RNA_def_property_ui_text(prop, "Custom Shape Rotation", "Adjust the rotation of the custom shape"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | |||||
Done Inline Actions"in XYZ Eulers" can be removed from the description. sybren: "in XYZ Eulers" can be removed from the description. | |||||
Done Inline Actions"XYZ Euler" can be removed from the label. sybren: "XYZ Euler" can be removed from the label. | |||||
| prop = RNA_def_property(srna, "use_custom_shape_bone_size", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_custom_shape_bone_size", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", PCHAN_DRAW_NO_CUSTOM_BONE_SIZE); | RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", PCHAN_DRAW_NO_CUSTOM_BONE_SIZE); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Scale to Bone Length", "Scale the custom object by the bone length"); | prop, "Scale to Bone Length", "Scale the custom object by the bone length"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | ||||
Done Inline Actions"The hide of" means something like "the skin of", like the hide of an animal. The description should also make it clear what happens when the custom shape is hidden. Does that mean the original bone shape is shown? Or is the entire bone invisible? sybren: "The hide of" means something like "the skin of", like the hide of an animal. The description… | |||||
Done Inline Actions"Hide the custom shape" doesn't convey anything beyond what the property label already tells you. As I said, the description should also make it clear what happens when the custom shape is hidden. sybren: "Hide the custom shape" doesn't convey anything beyond what the property label already tells… | |||||
Done Inline Actions"Temporarily hide the custom shape" still isn't explaining enough. As I said before: The description should make it clear what happens when the custom shape is hidden. Does that mean the original bone shape is shown? Or is the entire bone invisible? sybren: "Temporarily hide the custom shape" still isn't explaining enough. As I said before: The… | |||||
| prop = RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "custom_tx"); | RNA_def_property_pointer_sdna(prop, NULL, "custom_tx"); | ||||
| RNA_def_property_struct_type(prop, "PoseBone"); | RNA_def_property_struct_type(prop, "PoseBone"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_PTR_NO_OWNERSHIP); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_PTR_NO_OWNERSHIP); | ||||
| RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | ||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Custom Shape Transform", | "Custom Shape Transform", | ||||
| ▲ Show 20 Lines • Show All 374 Lines • Show Last 20 Lines | |||||
"XYZ" can be removed, as the fact that this is a float[3] property already is clear enough.