Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_constraint.c
| Show First 20 Lines • Show All 967 Lines • ▼ Show 20 Lines | static void rna_def_constraint_childof(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Scale Y", "Use Y Scale of Parent"); | RNA_def_property_ui_text(prop, "Scale Y", "Use Y Scale of Parent"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | ||||
| prop = RNA_def_property(srna, "use_scale_z", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_scale_z", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEZ); | RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEZ); | ||||
| RNA_def_property_ui_text(prop, "Scale Z", "Use Z Scale of Parent"); | RNA_def_property_ui_text(prop, "Scale Z", "Use Z Scale of Parent"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | ||||
| prop = RNA_def_property(srna, "set_inverse_pending", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SET_INVERSE); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Set Inverse Pending", "Set to true to request recalculation of the inverse matrix"); | |||||
sybren: I think it would be a nice touch to mention that it's automatically set to false when the… | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | |||||
| prop = RNA_def_property(srna, "inverse_matrix", PROP_FLOAT, PROP_MATRIX); | prop = RNA_def_property(srna, "inverse_matrix", PROP_FLOAT, PROP_MATRIX); | ||||
| RNA_def_property_float_sdna(prop, NULL, "invmat"); | RNA_def_property_float_sdna(prop, NULL, "invmat"); | ||||
| RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); | RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_text(prop, "Inverse Matrix", "Transformation matrix to apply before"); | RNA_def_property_ui_text(prop, "Inverse Matrix", "Transformation matrix to apply before"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | |||||
| } | } | ||||
| static void rna_def_constraint_python(BlenderRNA *brna) | static void rna_def_constraint_python(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "PythonConstraint", "Constraint"); | srna = RNA_def_struct(brna, "PythonConstraint", "Constraint"); | ||||
| ▲ Show 20 Lines • Show All 2,158 Lines • ▼ Show 20 Lines | static void rna_def_constraint_object_solver(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); | ||||
| /* use default clip */ | /* use default clip */ | ||||
| prop = RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", CAMERASOLVER_ACTIVECLIP); | RNA_def_property_boolean_sdna(prop, NULL, "flag", CAMERASOLVER_ACTIVECLIP); | ||||
| RNA_def_property_ui_text(prop, "Active Clip", "Use active clip defined in scene"); | RNA_def_property_ui_text(prop, "Active Clip", "Use active clip defined in scene"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | ||||
| prop = RNA_def_property(srna, "set_inverse_pending", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", OBJECTSOLVER_SET_INVERSE); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Set Inverse Pending", "Set to true to request recalculation of the inverse matrix"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); | |||||
| /* object */ | /* object */ | ||||
| prop = RNA_def_property(srna, "object", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "object", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_sdna(prop, NULL, "object"); | RNA_def_property_string_sdna(prop, NULL, "object"); | ||||
| RNA_def_property_ui_text(prop, "Object", "Movie tracking object to follow"); | RNA_def_property_ui_text(prop, "Object", "Movie tracking object to follow"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); | ||||
| /* camera */ | /* camera */ | ||||
| prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines | |||||
I think it would be a nice touch to mention that it's automatically set to false when the inverse matrix has been recomputed. I often see this in datasheets of microcontrollers, and it really helps me understand what's going on.