[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29406] trunk/blender/source/blender/ editors/object/object_transform.c: Deny applying location/ rotation to 2D curve - such transformation could

Sergey Sharybin g.ulairi at gmail.com
Fri Jun 11 15:00:24 CEST 2010


Revision: 29406
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29406
Author:   nazgul
Date:     2010-06-11 15:00:24 +0200 (Fri, 11 Jun 2010)

Log Message:
-----------
Deny applying location/rotation to 2D curve - such transformation could
make points have non-zero local z-coordinates, which is confusing for 2D.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/object/object_transform.c

Modified: trunk/blender/source/blender/editors/object/object_transform.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_transform.c	2010-06-11 12:40:22 UTC (rev 29405)
+++ trunk/blender/source/blender/editors/object/object_transform.c	2010-06-11 13:00:24 UTC (rev 29406)
@@ -432,6 +432,10 @@
 				BKE_report(reports, RPT_ERROR, "Can't apply to a multi user curve, doing nothing.");
 				return OPERATOR_CANCELLED;
 			}
+			if(!(cu->flag & CU_3D) && (apply_rot || apply_loc)) {
+				BKE_report(reports, RPT_ERROR, "Neither rotation nor location could be applied to a 2d curve, doing nothing.");
+				return OPERATOR_CANCELLED;
+			}
 			if(cu->key) {
 				BKE_report(reports, RPT_ERROR, "Can't apply to a curve with vertex keys, doing nothing.");
 				return OPERATOR_CANCELLED;
@@ -498,7 +502,7 @@
 			cu= ob->data;
 
 			scale = mat3_to_scale(rsmat);
-			
+
 			for(nu=cu->nurb.first; nu; nu=nu->next) {
 				if(nu->type == CU_BEZIER) {
 					a= nu->pntsu;





More information about the Bf-blender-cvs mailing list