diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-31 23:24:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-31 23:55:53 +0300 |
commit | eb8ddaee4cd2cd93a6590e4ba73652628961df57 (patch) | |
tree | a065f5bd72859df0828f0ba6adf9737a28cbecb5 /source/blender/editors/transform/transform_ops.c | |
parent | 798cd8a7230dba1a0aead06bb82857b881a42f95 (diff) |
Transform: support for custom matrix property
Needed for situations when we can't use the orientation.
With extrude the initial extrusion recalculates normals for edges
and vertices which then don't give a useful axis.
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 6979fe73cec..ee0b11ead11 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -563,9 +563,15 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) if (flags & P_CONSTRAINT) { RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", ""); + + /* Set by 'constraint_orientation' or gizmo which acts on non-standard orientation. */ + prop = RNA_def_float_matrix(ot->srna, "constraint_matrix", 3, 3, NULL, 0.0f, 0.0f, "Matrix", "", 0.0f, 0.0f); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + prop = RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE); RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation"); RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf); + } if (flags & P_MIRROR) { |