[Bf-blender-cvs] [fad0c33] master: RNA: Expose hook inverse matrix

Campbell Barton noreply at git.blender.org
Thu Jun 23 03:47:37 CEST 2016


Commit: fad0c336e44bdb4910c6dbeb8e2973f3695689f1
Author: Campbell Barton
Date:   Thu Jun 23 11:52:22 2016 +1000
Branches: master
https://developer.blender.org/rBfad0c336e44bdb4910c6dbeb8e2973f3695689f1

RNA: Expose hook inverse matrix

Needed so scripts don't need to use operators to adjust hook modifiers.

===================================================================

M	source/blender/makesrna/intern/rna_modifier.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5a2113f..a7c9f29 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);




More information about the Bf-blender-cvs mailing list