diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-23 04:52:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-23 04:52:44 +0300 |
commit | fad0c336e44bdb4910c6dbeb8e2973f3695689f1 (patch) | |
tree | 39fcf68d24dcf50d141e3d80a65054d9112af4bd /source | |
parent | 475b7f5a2cadd2e7ec71c8ba9fa5dad97f4c2afa (diff) |
RNA: Expose hook inverse matrix
Needed so scripts don't need to use operators to adjust hook modifiers.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 5a2113f3f95..a7c9f29e7d3 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1826,6 +1826,12 @@ static void rna_def_modifier_hook(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Hook Center", ""); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "matrix_inverse", PROP_FLOAT, PROP_MATRIX); + RNA_def_property_float_sdna(prop, NULL, "parentinv"); + RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); + RNA_def_property_ui_text(prop, "Matrix", "Reverse the transformation between this object and its target"); + RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Modifier_update"); + prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); |