Cosmetic changes in etch-a-ton drawing code, mostly.
This commit is contained in:
parent
93428ff82a
commit
304cbc09ab
|
@ -88,6 +88,7 @@ typedef struct BArcIterator {
|
|||
StoppedFct stopped;
|
||||
|
||||
float *p, *no;
|
||||
float size;
|
||||
|
||||
int length;
|
||||
int index;
|
||||
|
|
|
@ -285,6 +285,8 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
|
|||
EditBone *lastBone = NULL;
|
||||
EditBone *child = NULL;
|
||||
EditBone *parent = NULL;
|
||||
float *normal = NULL;
|
||||
float size_buffer = 1.2;
|
||||
int bone_start = 0;
|
||||
int end = iter->length;
|
||||
int index;
|
||||
|
@ -294,6 +296,13 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
|
|||
parent = addEditBone(arm, "Bone");
|
||||
VECCOPY(parent->head, iter->p);
|
||||
|
||||
if (iter->size > 0)
|
||||
{
|
||||
parent->rad_head = iter->size * size_buffer;
|
||||
}
|
||||
|
||||
normal = iter->no;
|
||||
|
||||
index = next_subdividion(toolsettings, iter, bone_start, end, parent->head, parent->tail);
|
||||
while (index != -1)
|
||||
{
|
||||
|
@ -304,21 +313,33 @@ EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *
|
|||
child->parent = parent;
|
||||
child->flag |= BONE_CONNECTED;
|
||||
|
||||
if (iter->size > 0)
|
||||
{
|
||||
child->rad_head = iter->size * size_buffer;
|
||||
parent->rad_tail = iter->size * size_buffer;
|
||||
}
|
||||
|
||||
/* going to next bone, fix parent */
|
||||
Mat4MulVecfl(invmat, parent->tail);
|
||||
Mat4MulVecfl(invmat, parent->head);
|
||||
setBoneRollFromNormal(parent, iter->no, invmat, tmat);
|
||||
setBoneRollFromNormal(parent, normal, invmat, tmat);
|
||||
|
||||
parent = child; // new child is next parent
|
||||
bone_start = index; // start next bone from current index
|
||||
|
||||
normal = iter->no; /* use normal at head, not tail */
|
||||
|
||||
index = next_subdividion(toolsettings, iter, bone_start, end, parent->head, parent->tail);
|
||||
}
|
||||
|
||||
iter->tail(iter);
|
||||
|
||||
VECCOPY(parent->tail, iter->p);
|
||||
|
||||
if (iter->size > 0)
|
||||
{
|
||||
parent->rad_tail = iter->size * size_buffer;
|
||||
}
|
||||
|
||||
/* fix last bone */
|
||||
Mat4MulVecfl(invmat, parent->tail);
|
||||
Mat4MulVecfl(invmat, parent->head);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3179,6 +3179,7 @@ static void setIteratorValues(ReebArcIterator *iter, EmbedBucket *bucket)
|
|||
iter->p = NULL;
|
||||
iter->no = NULL;
|
||||
}
|
||||
iter->size = 0;
|
||||
}
|
||||
|
||||
void initArcIterator(BArcIterator *arg, ReebArc *arc, ReebNode *head)
|
||||
|
@ -3276,6 +3277,7 @@ static void* headNode(void *arg)
|
|||
|
||||
iter->p = node->p;
|
||||
iter->no = node->no;
|
||||
iter->size = 0;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
@ -3296,6 +3298,7 @@ static void* tailNode(void *arg)
|
|||
|
||||
iter->p = node->p;
|
||||
iter->no = node->no;
|
||||
iter->size = 0;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ typedef struct ReebArcIterator {
|
|||
StoppedFct stopped;
|
||||
|
||||
float *p, *no;
|
||||
float size;
|
||||
|
||||
int length;
|
||||
int index;
|
||||
|
|
Loading…
Reference in New Issue