fix [#26456] weightpaint mode with armature modifier, armature mode
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Mar 2011 16:05:35 +0000 (16:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Mar 2011 16:05:35 +0000 (16:05 +0000)
disable bone selection in weightpaint mode when the armature is not in pose mode.

source/blender/editors/space_view3d/drawarmature.c

index 701e9f8af0dd9f57a63ff1c12e8dc46ccd986e45..a69ad1c7050d98d2dcf746d11af943f2a5d4dda5 100644 (file)
@@ -2460,12 +2460,16 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, in
                        /* drawing posemode selection indices or colors only in these cases */
                        if(!(base->flag & OB_FROMDUPLI)) {
                                if(G.f & G_PICKSEL) {
+#if 0                          /* nifty but actually confusing to allow bone selection out of posemode */
                                        if(OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) {
                                                if(ob==modifiers_isDeformedByArmature(OBACT))
                                                        arm->flag |= ARM_POSEMODE;
                                        }
-                                       else if(ob->mode & OB_MODE_POSE) 
+                                       else
+#endif
+                                       if(ob->mode & OB_MODE_POSE) {
                                                arm->flag |= ARM_POSEMODE;
+                                       }
                                }
                                else if(ob->mode & OB_MODE_POSE) {
                                        if (arm->ghosttype == ARM_GHOST_RANGE) {