Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 5d0b954046c..45605ad472d 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -1,5 +1,5 @@
/**
- * $Id: $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -293,7 +293,7 @@ char *BIF_listTemplates(bContext *C)
while (!BLI_ghashIterator_isDone(&ghi))
{
Object *ob = BLI_ghashIterator_getValue(&ghi);
- int key = (int)BLI_ghashIterator_getKey(&ghi);
+ int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
p += sprintf(p, "|%s%%x%i", ob->id.name+2, key);
@@ -314,7 +314,7 @@ int BIF_currentTemplate(bContext *C)
while (!BLI_ghashIterator_isDone(&ghi))
{
Object *ob = BLI_ghashIterator_getValue(&ghi);
- int key = (int)BLI_ghashIterator_getKey(&ghi);
+ int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
if (ob == scene->toolsettings->skgen_template)
{
@@ -1035,7 +1035,22 @@ void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end)
}
glEnd();
-
+
+#if 0
+ glColor3f(0, 0, 1);
+ glBegin(GL_LINES);
+
+ for (i = 0; i < stk->nb_points; i++)
+ {
+ float *p = stk->points[i].p;
+ float *no = stk->points[i].no;
+ glVertex3fv(p);
+ glVertex3f(p[0] + no[0], p[1] + no[1], p[2] + no[2]);
+ }
+
+ glEnd();
+#endif
+
glColor3f(0, 0, 0);
glBegin(GL_POINTS);
@@ -1998,7 +2013,7 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk)
Mat4MulVecfl(invmat, bone->head);
Mat4MulVecfl(invmat, bone->tail);
- setBoneRollFromNormal(bone, pt->no, invmat, tmat);
+ setBoneRollFromNormal(bone, head->no, invmat, tmat);
}
new_parent = bone;