[Bf-blender-cvs] [1b51c34e8bc] blender2.8: Manipulator: correct cage-2d scale update

Campbell Barton noreply at git.blender.org
Wed Aug 2 00:20:20 CEST 2017


Commit: 1b51c34e8bcfcc4fb618e2a456bd641045886d51
Author: Campbell Barton
Date:   Wed Aug 2 08:34:59 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB1b51c34e8bcfcc4fb618e2a456bd641045886d51

Manipulator: correct cage-2d scale update

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

M	source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c

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

diff --git a/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c
index c3e42c74488..ea868e6b2b3 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c
@@ -379,13 +379,13 @@ static bool manipulator_rect_transform_get_prop_value(
 	PropertyType type = RNA_property_type(mpr_prop->prop);
 
 	if (type != PROP_FLOAT) {
-		fprintf(stderr, "Rect Transform manipulator can only be bound to float properties");
+		fprintf(stderr, "Rect Transform manipulator can only be bound to float properties\n");
 		return false;
 	}
 	else {
 		if (STREQ(mpr_prop->type->idname, "offset")) {
 			if (RNA_property_array_length(&mpr_prop->ptr, mpr_prop->prop) != 2) {
-				fprintf(stderr, "Rect Transform manipulator offset not only be bound to array float property");
+				fprintf(stderr, "Rect Transform manipulator offset not only be bound to array float property\n");
 				return false;
 			}
 			RNA_property_float_get_array(&mpr_prop->ptr, mpr_prop->prop, value);
@@ -397,7 +397,7 @@ static bool manipulator_rect_transform_get_prop_value(
 			}
 			else {
 				if (RNA_property_array_length(&mpr_prop->ptr, mpr_prop->prop) != 2) {
-					fprintf(stderr, "Rect Transform manipulator scale not only be bound to array float property");
+					fprintf(stderr, "Rect Transform manipulator scale not only be bound to array float property\n");
 					return false;
 				}
 				RNA_property_float_get_array(&mpr_prop->ptr, mpr_prop->prop, value);
@@ -538,8 +538,8 @@ static void manipulator_rect_transform_property_update(wmManipulator *mpr, wmMan
 	}
 	else if (STREQ(mpr_prop->type->idname, "scale")) {
 		float scale[2];
-		RNA_float_get_array(mpr->ptr, "scale", scale);
 		manipulator_rect_transform_get_prop_value(mpr, mpr_prop, scale);
+		RNA_float_set_array(mpr->ptr, "scale", scale);
 	}
 	else {
 		BLI_assert(0);




More information about the Bf-blender-cvs mailing list