From 54cea98046962a7557ce1b75b4a6146373bdda42 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 4 Aug 2017 15:34:01 +1000 Subject: Manipulator: add manipulator space matrix Render-border & crop-node 2d-cage manipulators where unreasonably complicated to implement because there was no good way to define the sub-region the manipulator was transforming in (render border within the camera's frame for example). Add matrix-space variable, remove scale property from cage2d manipulator, use matrix instead. --- source/blender/makesrna/intern/rna_wm_manipulator.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_wm_manipulator.c b/source/blender/makesrna/intern/rna_wm_manipulator.c index 28821ecb0bd..9334d7da159 100644 --- a/source/blender/makesrna/intern/rna_wm_manipulator.c +++ b/source/blender/makesrna/intern/rna_wm_manipulator.c @@ -359,6 +359,7 @@ RNA_MANIPULATOR_GENERIC_FLOAT_ARRAY_RW_DEF(color_hi, color_hi, 3); RNA_MANIPULATOR_GENERIC_FLOAT_ARRAY_INDEX_RW_DEF(alpha, color, 3); RNA_MANIPULATOR_GENERIC_FLOAT_ARRAY_INDEX_RW_DEF(alpha_hi, color_hi, 3); +RNA_MANIPULATOR_GENERIC_FLOAT_ARRAY_RW_DEF(matrix_space, matrix_space, 16); RNA_MANIPULATOR_GENERIC_FLOAT_ARRAY_RW_DEF(matrix_basis, matrix_basis, 16); RNA_MANIPULATOR_GENERIC_FLOAT_ARRAY_RW_DEF(matrix_offset, matrix_offset, 16); @@ -999,6 +1000,12 @@ static void rna_def_manipulator(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_update(prop, NC_SCREEN | NA_EDITED, NULL); + prop = RNA_def_property(srna, "matrix_space", PROP_FLOAT, PROP_MATRIX); + RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); + RNA_def_property_ui_text(prop, "Space Matrix", ""); + RNA_def_property_float_funcs(prop, "rna_Manipulator_matrix_space_get", "rna_Manipulator_matrix_space_set", NULL); + RNA_def_property_update(prop, NC_SCREEN | NA_EDITED, NULL); + prop = RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX); RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); RNA_def_property_ui_text(prop, "Basis Matrix", ""); -- cgit v1.2.3