Revision: 23351 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23351 Author: blendix Date: 2009-09-19 17:48:47 +0200 (Sat, 19 Sep 2009)
Log Message: ----------- Fix combined pose + weight paint mode, was using wrong object in a few places, missing some checks. Modified Paths: -------------- trunk/blender/source/blender/editors/armature/editarmature.c trunk/blender/source/blender/editors/space_view3d/drawarmature.c trunk/blender/source/blender/editors/space_view3d/view3d_select.c trunk/blender/source/blender/editors/transform/transform_conversions.c Modified: trunk/blender/source/blender/editors/armature/editarmature.c =================================================================== --- trunk/blender/source/blender/editors/armature/editarmature.c 2009-09-19 14:16:02 UTC (rev 23350) +++ trunk/blender/source/blender/editors/armature/editarmature.c 2009-09-19 15:48:47 UTC (rev 23351) @@ -4333,7 +4333,7 @@ } /* in weightpaint we select the associated vertex group too */ - if (ob->mode & OB_MODE_WEIGHT_PAINT) { + if (OBACT && OBACT->mode & OB_MODE_WEIGHT_PAINT) { if (nearBone->flag & BONE_ACTIVE) { ED_vgroup_select_by_name(OBACT, nearBone->name); DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA); Modified: trunk/blender/source/blender/editors/space_view3d/drawarmature.c =================================================================== --- trunk/blender/source/blender/editors/space_view3d/drawarmature.c 2009-09-19 14:16:02 UTC (rev 23350) +++ trunk/blender/source/blender/editors/space_view3d/drawarmature.c 2009-09-19 15:48:47 UTC (rev 23351) @@ -2513,7 +2513,11 @@ /* drawing posemode selection indices or colors only in these cases */ if(!(base->flag & OB_FROMDUPLI)) { if(G.f & G_PICKSEL) { - if(ob->mode & OB_MODE_POSE) + if(OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) { + if(ob==modifiers_isDeformedByArmature(OBACT)) + arm->flag |= ARM_POSEMODE; + } + else if(ob->mode & OB_MODE_POSE) arm->flag |= ARM_POSEMODE; } else if(ob->mode & OB_MODE_POSE) { @@ -2530,8 +2534,8 @@ if ((flag & DRAW_SCENESET)==0) { if(ob==OBACT) arm->flag |= ARM_POSEMODE; - else if(ob->mode & OB_MODE_WEIGHT_PAINT) { - if(OBACT && ob==modifiers_isDeformedByArmature(OBACT)) + else if(OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) { + if(ob==modifiers_isDeformedByArmature(OBACT)) arm->flag |= ARM_POSEMODE; } draw_pose_paths(scene, v3d, rv3d, ob); Modified: trunk/blender/source/blender/editors/space_view3d/view3d_select.c =================================================================== --- trunk/blender/source/blender/editors/space_view3d/view3d_select.c 2009-09-19 14:16:02 UTC (rev 23350) +++ trunk/blender/source/blender/editors/space_view3d/view3d_select.c 2009-09-19 15:48:47 UTC (rev 23351) @@ -1148,7 +1148,7 @@ WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, basact->object); /* in weightpaint, we use selected bone to select vertexgroup, so no switch to new active object */ - if(basact->object->mode & OB_MODE_WEIGHT_PAINT) { + if(BASACT && BASACT->object->mode & OB_MODE_WEIGHT_PAINT) { /* prevent activating */ basact= NULL; } Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c =================================================================== --- trunk/blender/source/blender/editors/transform/transform_conversions.c 2009-09-19 14:16:02 UTC (rev 23350) +++ trunk/blender/source/blender/editors/transform/transform_conversions.c 2009-09-19 15:48:47 UTC (rev 23351) @@ -5289,7 +5289,7 @@ { if(ob_armature->type==OB_ARMATURE) { - if(ob_armature->mode & OB_MODE_POSE) + if((ob_armature->mode & OB_MODE_POSE) && ob_armature == modifiers_isDeformedByArmature(ob)) { createTransPose(C, t, ob_armature); break; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs