From 47af343b6137e4290cc4a842daac25ff8d8cb65f Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Tue, 24 Jul 2018 18:53:22 +0300 Subject: Implement multiplicative Copy Scale and make it the new default. Scale is a multiplicative quantity, so adding it doesn't make sense. However, for backward compatibility reasons, and in case somebody actually desires the old additive behavior, the old way remains as an option. Without this change the only way to properly combine scale is via parenting or the complicated Transformation constraint. The new mode is turned on by a flag for file compatibility, but the RNA option is reversed so that the new behavior feels more default. Reviewers: aligorith Differential Revision: https://developer.blender.org/D3558 --- source/blender/makesrna/intern/rna_constraint.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_constraint.c') diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 6cc9d1ef5a6..6f7580a3944 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -961,7 +961,12 @@ static void rna_def_constraint_size_like(BlenderRNA *brna) prop = RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_OFFSET); - RNA_def_property_ui_text(prop, "Offset", "Add original scale into copied scale"); + RNA_def_property_ui_text(prop, "Offset", "Combine original scale with copied scale"); + RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + prop = RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIZELIKE_MULTIPLY); + RNA_def_property_ui_text(prop, "Additive", "Use addition instead of multiplication to combine scale (2.7 compatibility)"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); } -- cgit v1.2.3