diff options
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 11 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 63b55a3f1b8..cd299906b4c 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -381,8 +381,12 @@ void armature_tag_unselect(bArmature *arm) void ED_armature_ebone_transform_mirror_update(bArmature *arm, EditBone *ebo, bool check_select) { - /* TODO When this function is called by property updates, cancelling the value change will not restore mirrored bone correctly. */ - /* Currently check_select==true when this function is called from a transform operator, eg. from 3d viewport. */ + /* TODO When this function is called by property updates, + * cancelling the value change will not restore mirrored bone correctly. */ + + /* Currently check_select==true when this function is called from a transform operator, + * eg. from 3d viewport. */ + /* no layer check, correct mirror is more important */ if (!check_select || ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) { EditBone *eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo); @@ -440,7 +444,8 @@ void ED_armature_ebone_transform_mirror_update(bArmature *arm, EditBone *ebo, bo if (!check_select || ebo->flag & BONE_SELECTED) { /* Mirror bone body properties (both head and tail are selected). */ - /* TODO: These values can also be changed from pose mode, so only mirroring them in edit mode is not ideal. */ + /* TODO: These values can also be changed from pose mode, + * so only mirroring them in edit mode is not ideal. */ eboflip->dist = ebo->dist; eboflip->weight = ebo->weight; diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 5ec24ec7086..acd28789364 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -400,7 +400,8 @@ void map_range( } } -vec3 safe_divide(vec3 a, vec3 b) { +vec3 safe_divide(vec3 a, vec3 b) +{ return vec3((b.x != 0.0) ? a.x / b.x : 0.0, (b.y != 0.0) ? a.y / b.y : 0.0, (b.z != 0.0) ? a.z / b.z : 0.0); |