[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60717] trunk/blender/source/blender: code cleanup: use more obvious assignments for transform snapping angles.
Campbell Barton
ideasman42 at gmail.com
Sun Oct 13 00:31:03 CEST 2013
Revision: 60717
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60717
Author: campbellbarton
Date: 2013-10-12 22:31:02 +0000 (Sat, 12 Oct 2013)
Log Message:
-----------
code cleanup: use more obvious assignments for transform snapping angles.
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform.c
trunk/blender/source/blender/makesrna/intern/makesrna.c
Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c 2013-10-12 20:01:17 UTC (rev 60716)
+++ trunk/blender/source/blender/editors/transform/transform.c 2013-10-12 22:31:02 UTC (rev 60717)
@@ -2600,8 +2600,8 @@
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
- t->snap[1] = 5.0f / 180.0f * (float)M_PI;
- t->snap[2] = 1.0f / 180.0f * (float)M_PI;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
@@ -3369,8 +3369,8 @@
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
@@ -3701,8 +3701,8 @@
t->idx_max = 1;
t->num.idx_max = 1;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
@@ -4149,8 +4149,8 @@
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = t->snap[1];
@@ -6435,8 +6435,8 @@
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/makesrna.c 2013-10-12 20:01:17 UTC (rev 60716)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2013-10-12 22:31:02 UTC (rev 60717)
@@ -82,7 +82,7 @@
fprintf(f, param); \
} (void)0
-static int replace_if_different(char *tmpfile, const char *dep_files[])
+static int replace_if_different(const char *tmpfile, const char *dep_files[])
{
/* return 0; *//* use for testing had edited rna */
More information about the Bf-blender-cvs
mailing list