[Bf-committers] Transform Properties for armatures, bug?

Anders Nilsson bf-committers@blender.org
21 Jun 2004 01:13:28 +0200


--=-VYRVtB7bM8Ncn/WQ9VWB
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I'm not 100% sure about this one so I just mention it and you can say if
I'm crazy or not.

When a bone is animated the "transform properties" for the bone has the
wrong names for the values being animated, for instance "QuatX" is
"QuatW". No biggy, but all strange things makes understanding what
really happens very hard, especially for people writing exporters!

I might be wrong about this one, someone who knows how quaternions work
in Blender should comment on this one. Sorry if I'm at fault.

The problem seems to appear in the following two files:
* src/drawview.c, v3d_posearmature_buts
* src/editarmature.c, clever_numbuts_posearmature

I've made a patch.txt that fixes (?) this and also correct a typo in
drawview.c.

Anders Nilsson (breakin)

--=-VYRVtB7bM8Ncn/WQ9VWB
Content-Disposition: attachment; filename=patch.txt
Content-Type: text/plain; name=patch.txt; charset=UTF-8
Content-Transfer-Encoding: 7bit

? blender
? config.opts
Index: source/blender/src/drawview.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawview.c,v
retrieving revision 1.69
diff -u -2 -r1.69 drawview.c
--- source/blender/src/drawview.c	16 Jun 2004 20:25:56 -0000	1.69
+++ source/blender/src/drawview.c	20 Jun 2004 23:16:39 -0000
@@ -1241,13 +1241,13 @@
 		return;
 	uiBlockBeginAlign(block);
-	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatX:",	10, 120, 140, 19, bone->quat, -100.0, 100.0, 10, 3, "");
-	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatZ:",	10, 100, 140, 19, bone->quat+2, -100.0, 100.0, 10, 3, "");
+	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatW:",	10, 120, 140, 19, bone->quat, -100.0, 100.0, 10, 3, "");
+	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatY:",	10, 100, 140, 19, bone->quat+2, -100.0, 100.0, 10, 3, "");
 	uiBlockBeginAlign(block);
-	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatY:",	160, 120, 140, 19, bone->quat+1, -100.0, 100.0, 10, 3, "");
-	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatW:",	160, 100, 140, 19, bone->quat+3, -100.0, 100.0, 10, 3, "");
+	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatX:",	160, 120, 140, 19, bone->quat+1, -100.0, 100.0, 10, 3, "");
+	uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatZ:",	160, 100, 140, 19, bone->quat+3, -100.0, 100.0, 10, 3, "");
 	uiBlockBeginAlign(block);
 	uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocX:",	10, 70, 140, 19, bone->loc, -lim, lim, 100, 3, "");
 	uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocY:",	10, 50, 140, 19, bone->loc+1, -lim, lim, 100, 3, "");
-	uiDefButF(block, NUM, B_ARMATUREPANEL2, "locZ:",	10, 30, 140, 19, bone->loc+2, -lim, lim, 100, 3, "");
+	uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocZ:",	10, 30, 140, 19, bone->loc+2, -lim, lim, 100, 3, "");
 	uiBlockBeginAlign(block);
 	uiDefButF(block, NUM, B_ARMATUREPANEL2, "SizeX:",	160, 70, 140, 19, bone->size, -lim, lim, 100, 3, "");
Index: source/blender/src/editarmature.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/editarmature.c,v
retrieving revision 1.31
diff -u -2 -r1.31 editarmature.c
--- source/blender/src/editarmature.c	5 Jun 2004 05:55:14 -0000	1.31
+++ source/blender/src/editarmature.c	20 Jun 2004 23:16:39 -0000
@@ -270,8 +270,8 @@
 	add_numbut(2, NUM|FLO, "Loc Z:", -G.vd->far, G.vd->far, bone->loc+2, 0);
 
-	add_numbut(3, NUM|FLO, "Quat X:", -G.vd->far, G.vd->far, bone->quat, 0);
-	add_numbut(4, NUM|FLO, "Quat Y:", -G.vd->far, G.vd->far, bone->quat+1, 0);
-	add_numbut(5, NUM|FLO, "Quat Z:", -G.vd->far, G.vd->far, bone->quat+2, 0);
-	add_numbut(6, NUM|FLO, "Quat W:", -G.vd->far, G.vd->far, bone->quat+3, 0);
+	add_numbut(3, NUM|FLO, "Quat W:", -G.vd->far, G.vd->far, bone->quat, 0);
+	add_numbut(4, NUM|FLO, "Quat X:", -G.vd->far, G.vd->far, bone->quat+1, 0);
+	add_numbut(5, NUM|FLO, "Quat Y:", -G.vd->far, G.vd->far, bone->quat+2, 0);
+	add_numbut(6, NUM|FLO, "Quat Z:", -G.vd->far, G.vd->far, bone->quat+3, 0);
 
 	add_numbut(7, NUM|FLO, "Size X:", -G.vd->far, G.vd->far, bone->size, 0);

--=-VYRVtB7bM8Ncn/WQ9VWB--