Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_armature.c
| Show First 20 Lines • Show All 615 Lines • ▼ Show 20 Lines | |||||
| void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone) | void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone) | ||||
| { | { | ||||
| # define RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone) \ | # define RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone) \ | ||||
| { \ | { \ | ||||
| if (is_posebone) { \ | if (is_posebone) { \ | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); \ | RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); \ | ||||
| } \ | } \ | ||||
| else { \ | else { \ | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); \ | RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update"); \ | ||||
| } \ | } \ | ||||
| } \ | } \ | ||||
| ((void)0) | ((void)0) | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| /* Roll In/Out */ | /* Roll In/Out */ | ||||
| prop = RNA_def_property(srna, "bbone_rollin", PROP_FLOAT, PROP_ANGLE); | prop = RNA_def_property(srna, "bbone_rollin", PROP_FLOAT, PROP_ANGLE); | ||||
| ▲ Show 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | static void rna_def_bone_common(StructRNA *srna, int editbone) | ||||
| prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_UNSELECTABLE); | 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_ui_text(prop, "Selectable", "Bone is able to be selected"); | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); | RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); | ||||
| /* Number values */ | /* Number values */ | ||||
| /* envelope deform settings */ | /* envelope deform settings */ | ||||
| prop = RNA_def_property(srna, "envelope_distance", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "envelope_distance", PROP_FLOAT, PROP_DISTANCE); | ||||
| if (editbone) { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update"); | |||||
| } | |||||
| else { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | |||||
| } | |||||
| RNA_def_property_float_sdna(prop, NULL, "dist"); | RNA_def_property_float_sdna(prop, NULL, "dist"); | ||||
| RNA_def_property_range(prop, 0.0f, 1000.0f); | RNA_def_property_range(prop, 0.0f, 1000.0f); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Envelope Deform Distance", "Bone deformation distance (for Envelope deform only)"); | prop, "Envelope Deform Distance", "Bone deformation distance (for Envelope deform only)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | |||||
| prop = RNA_def_property(srna, "envelope_weight", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "envelope_weight", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "weight"); | RNA_def_property_float_sdna(prop, NULL, "weight"); | ||||
| RNA_def_property_range(prop, 0.0f, 1000.0f); | RNA_def_property_range(prop, 0.0f, 1000.0f); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Envelope Deform Weight", "Bone deformation weight (for Envelope deform only)"); | prop, "Envelope Deform Weight", "Bone deformation weight (for Envelope deform only)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | ||||
| Show All 22 Lines | static void rna_def_bone_common(StructRNA *srna, int editbone) | ||||
| /* XXX range is 0 to lim, where lim = 10000.0f * MAX2(1.0, view3d->grid); */ | /* XXX range is 0 to lim, where lim = 10000.0f * MAX2(1.0, view3d->grid); */ | ||||
| /*RNA_def_property_range(prop, 0, 1000); */ | /*RNA_def_property_range(prop, 0, 1000); */ | ||||
| RNA_def_property_ui_range(prop, 0.01, 100, 0.1, 3); | RNA_def_property_ui_range(prop, 0.01, 100, 0.1, 3); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Envelope Tail Radius", "Radius of tail of bone (for Envelope deform only)"); | prop, "Envelope Tail Radius", "Radius of tail of bone (for Envelope deform only)"); | ||||
| /* b-bones deform settings */ | /* b-bones deform settings */ | ||||
| prop = RNA_def_property(srna, "bbone_segments", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "bbone_segments", PROP_INT, PROP_NONE); | ||||
| if (editbone) { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update"); | |||||
| } | |||||
| else { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_dependency_update"); | |||||
| } | |||||
| RNA_def_property_int_sdna(prop, NULL, "segments"); | RNA_def_property_int_sdna(prop, NULL, "segments"); | ||||
| RNA_def_property_range(prop, 1, 32); | RNA_def_property_range(prop, 1, 32); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only)"); | prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_dependency_update"); | |||||
| prop = RNA_def_property(srna, "bbone_x", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "bbone_x", PROP_FLOAT, PROP_NONE); | ||||
| if (editbone) { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update"); | |||||
| } | |||||
| else { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | |||||
| } | |||||
| RNA_def_property_float_sdna(prop, NULL, "xwidth"); | RNA_def_property_float_sdna(prop, NULL, "xwidth"); | ||||
| RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1, RNA_TRANSLATION_PREC_DEFAULT); | RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1, RNA_TRANSLATION_PREC_DEFAULT); | ||||
| RNA_def_property_ui_text(prop, "B-Bone Display X Width", "B-Bone X size"); | RNA_def_property_ui_text(prop, "B-Bone Display X Width", "B-Bone X size"); | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | |||||
| prop = RNA_def_property(srna, "bbone_z", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "bbone_z", PROP_FLOAT, PROP_NONE); | ||||
| if (editbone) { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update"); | |||||
| } | |||||
| else { | |||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | |||||
| } | |||||
| RNA_def_property_float_sdna(prop, NULL, "zwidth"); | RNA_def_property_float_sdna(prop, NULL, "zwidth"); | ||||
| RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1, RNA_TRANSLATION_PREC_DEFAULT); | RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1, RNA_TRANSLATION_PREC_DEFAULT); | ||||
| RNA_def_property_ui_text(prop, "B-Bone Display Z Width", "B-Bone Z size"); | RNA_def_property_ui_text(prop, "B-Bone Display Z Width", "B-Bone Z size"); | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_update_data"); | |||||
| prop = RNA_def_property(srna, "bbone_handle_type_start", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "bbone_handle_type_start", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "bbone_prev_type"); | RNA_def_property_enum_sdna(prop, NULL, "bbone_prev_type"); | ||||
| RNA_def_property_enum_items(prop, prop_bbone_handle_type); | RNA_def_property_enum_items(prop, prop_bbone_handle_type); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "B-Bone Start Handle Type", "Selects how the start handle of the B-Bone is computed"); | prop, "B-Bone Start Handle Type", "Selects how the start handle of the B-Bone is computed"); | ||||
| RNA_def_property_update(prop, 0, "rna_Armature_dependency_update"); | RNA_def_property_update(prop, 0, "rna_Armature_dependency_update"); | ||||
| ▲ Show 20 Lines • Show All 472 Lines • Show Last 20 Lines | |||||