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:
authorJoshua Leung <aligorith@gmail.com>2013-03-08 06:23:43 +0400
committerJoshua Leung <aligorith@gmail.com>2013-03-08 06:23:43 +0400
commitd9ec7e235401a97764a177b6722af54ff83660c3 (patch)
tree44183a3f5629e58ffd544951265092f9eb69574d /source/blender/editors/armature/editarmature_generate.c
parentbed8efb8e8893427fdb02e23c10bf0c631e7ff86 (diff)
[#34541] Sketching bones created bones with 0 radius for envelope
This commit is just a stopgap measure (i.e. it fixes the symptoms but not the real underlying cause) of this bug. For some reason, iter->size is nearly always an "effectively zero but not truly zero" value. Hence, the envelope sizes would get adjusted, but would be scaled to an impossibly small value (taken from iter->size). From my investigations so far, iter->size is mostly either set to (or left as) 0, except in a rare case when dealing with volume snapping, when the values somehow get propagated there from various intermediate data points. But, that almost never works either.
Diffstat (limited to 'source/blender/editors/armature/editarmature_generate.c')
-rw-r--r--source/blender/editors/armature/editarmature_generate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index 89772d38e8f..bade93af8c1 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -263,7 +263,7 @@ EditBone *subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *U
parent = ED_armature_edit_bone_add(arm, "Bone");
copy_v3_v3(parent->head, iter->p);
- if (iter->size > 0) {
+ if (iter->size > FLT_EPSILON) {
parent->rad_head = iter->size * size_buffer;
}
@@ -278,7 +278,7 @@ EditBone *subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *U
child->parent = parent;
child->flag |= BONE_CONNECTED;
- if (iter->size > 0) {
+ if (iter->size > FLT_EPSILON) {
child->rad_head = iter->size * size_buffer;
parent->rad_tail = iter->size * size_buffer;
}
@@ -299,7 +299,7 @@ EditBone *subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *U
iter->tail(iter);
copy_v3_v3(parent->tail, iter->p);
- if (iter->size > 0) {
+ if (iter->size > FLT_EPSILON) {
parent->rad_tail = iter->size * size_buffer;
}