diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-11 03:11:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-11 03:11:34 +0400 |
commit | bf4075236fe2aa011d7bab26358e55883ffa0248 (patch) | |
tree | 73e9c5fa7c42471da15c207f28173ab44731e2b6 /source/blender/editors/transform/transform_conversions.c | |
parent | 1579c1a5c90219777e8291f39564739509c579d7 (diff) |
bugfix [#23412] Weightpaint and rotate around bones
fixed by allowing an unselected armature to have its pose bones used in weightpaint mode.
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 01404603b86..0c0912a4ad6 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5318,19 +5318,19 @@ void createTransData(bContext *C, TransInfo *t) createTransPose(C, t, ob); } else if (ob && (ob->mode & OB_MODE_WEIGHT_PAINT)) { - /* exception, we look for the one selected armature */ - CTX_DATA_BEGIN(C, Object*, ob_armature, selected_objects) - { - if(ob_armature->type==OB_ARMATURE) - { - if((ob_armature->mode & OB_MODE_POSE) && ob_armature == modifiers_isDeformedByArmature(ob)) - { + /* important that ob_armature can be set even when its not selected [#23412] + * lines below just check is also visible */ + Object *ob_armature= modifiers_isDeformedByArmature(ob); + if(ob_armature && ob_armature->mode & OB_MODE_POSE) { + Base *base_arm= object_in_scene(ob_armature, t->scene); + if(base_arm) { + View3D *v3d = t->view; + if(BASE_VISIBLE(v3d, base_arm)) { createTransPose(C, t, ob_armature); - break; } } + } - CTX_DATA_END; } else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT) && PE_start_edit(PE_get_current(scene, ob))) { |