diff options
author | Ton Roosendaal <ton@blender.org> | 2011-07-13 21:20:20 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-07-13 21:20:20 +0400 |
commit | 91a6e434855621eb53a29c9c2d5d95350732b566 (patch) | |
tree | 2dc14459d68ea2d5a00352f9e5a107db10c7c025 /source/blender/makesrna/intern/rna_constraint.c | |
parent | 83ca561b6283b20c23b8ae453b91e6bfdfc6836d (diff) |
Adding Child Of constraint "inverse parent matrix" to rna, so it
can be set via Python.
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index a75ff601d08..0163dd5db32 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -357,6 +357,7 @@ static void rna_def_constrainttarget(BlenderRNA *brna) static void rna_def_constraint_childof(BlenderRNA *brna) { + static int rna_matrix_dimsize_4x4[]= {4, 4}; StructRNA *srna; PropertyRNA *prop; @@ -419,6 +420,13 @@ static void rna_def_constraint_childof(BlenderRNA *brna) 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_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); + + prop= RNA_def_property(srna, "inverse_matrix", PROP_FLOAT, PROP_MATRIX); + RNA_def_property_float_sdna(prop, NULL, "invmat"); + RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_ui_text(prop, "Inverse Matrix", "Transformation matrix to apply before"); + } static void rna_def_constraint_python(BlenderRNA *brna) |