Commit: 03b0495d041da3789012d00624d56de2503abec1
Author: Joshua Leung
Date: Tue May 29 12:26:59 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB03b0495d041da3789012d00624d56de2503abec1
Fix: Only change transform mode from translation to rotation/scale when no
valid bones were found in an armature
This commit fixes a problem the Spring team were having in the shot files
01_030/050 with
the camera rig, where when you tried grabbing/translating the bones of the
camera rig,
they would only keep rotating/scaling instead.
The reason for this is that with the multi-object editing support added into
the transform
system, this code would now get run for all the other objects that were being
included
in Pose Mode, even if no bones from those armatures were selected. Since no
valid translatable
bones were found in those other armatures, the transform mode would get reset
upon
encountering one of those other bones.
===================================================================
M source/blender/editors/transform/transform_conversions.c
===================================================================
diff --git a/source/blender/editors/transform/transform_conversions.c
b/source/blender/editors/transform/transform_conversions.c
index c8b09eef04b..49ac60df315 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -810,13 +810,18 @@ int count_set_pose_transflags(int *out_mode, short
around, Object *ob)
}
}
- /* if there are no translatable bones, do rotation */
- if (mode == TFM_TRANSLATION && !has_translation) {
- if (has_rotation) {
- *out_mode = TFM_ROTATION;
- }
- else {
- *out_mode = TFM_RESIZE;
+ /* only modify transform mode if there are bones here that do
something...
+ * otherwise we get problems when multiple objects are selected
+ */
+ if (total) {
+ /* if there are no translatable bones, do rotation */
+ if (mode == TFM_TRANSLATION && !has_translation) {
+ if (has_rotation) {
+ *out_mode = TFM_ROTATION;
+ }
+ else {
+ *out_mode = TFM_RESIZE;
+ }
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs