Page MenuHome

Bone Selection problem in weight paint: have to double click bones when obscured by the mesh
Closed, ResolvedPublic


System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 770/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.64

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-12 17:50, hash: rBe3c586e262dd

When you are doing posemode-weight-paint, is it intentional that if the mesh is "physically" above the bone, then you have to double click the bone in order to select the bone?
The mesh is already active, so the first click does nothing (not even deselect the bone)
For example, this video shows where I click (x-ray and not) and when I click once and when I click twice:

Event Timeline

Not sure if this is really meant for this, but isnt this what Edit > Lock Object Modes can be used for?

If Lock Object Modes is ON, bone selection is OK with one click [even with geometry in front]

If Lock Object Modes is OFF [and armatures in In Front is OFF], then I cannot select the bone with one click either, in 2.79 bone picking was working without XRay...
If Lock Object Modes is OFF [and armatures in In Front is ON], then I cannot seem to be able to reproduce the problem here, blender seems to pick the bone no matter how often I clicked the mesh, the empty viewport beforehand (and also no matter where in the bone I clicked -- this seemed to make a difference for you?)

Anybody else can reproduce?

Heh. I have a rule to always disable that.
I forget why but I think it was because it prevents selecting objects in pose mode and at the time, I "wanted" to use objects for constraints (not anymore).
Aside from the bug in T66949, that works great for me beyond this. With it I can stop always using xray for posing.

umm... @Philipp Oeser (lichtwerk) perhaps you misunderstood what was happening in the video when I put the bones in front of the mesh.
I was pressing Alt+Z, which is the [Show Bone XRay] hotkey. It's different from the [Object/Data.show_in_front] property.

If it's not and those properties just tag the object to ALWAYS do it, then it's behaving here different for me, because while that Object-checkbox property works as you say, the hotkey/Scene property does not.

Sebastian Parborg (zeddb) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.

I can confirm that In Front seems to function differently than the pose mode xray.

@Ovionis (Phigon) : sorry for not getting back.. Yes, I can confirm, too

Bone selection overlay was a feature implemented by @Jeroen Bakker (jbakker) and reviewed by @Clément Foucault (fclem) (D3241: T54983: Bone selection overlay).
I started by making a diff for this bug, but I don't understand what the Bone selection overlay really intends to do.
(Apparently it populates objects of the MESH type as well).

Here what I've done so far:

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 2841e017ef6..d443985f37c 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2273,6 +2273,8 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph,
     /* grease pencil selection */
+    /* pose bone selection */
+    use_drw_engine(&draw_engine_pose_type);
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 9fc11e4f36f..d70d82102b0 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -3634,7 +3634,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
         bArmature *arm = ob->data;
         if (arm->edbo == NULL) {
-          if (DRW_state_is_select() || !DRW_pose_mode_armature(ob, draw_ctx->obact)) {
+          if (!DRW_pose_mode_armature(ob, draw_ctx->obact)) {
             bool is_wire = (v3d->shading.type == OB_WIRE) || (ob->dt <= OB_WIRE) ||
             DRWArmaturePasses passes = {

Aha, ok. @Clément Foucault (fclem) told me this was Campbells area. But if @Jeroen Bakker (jbakker) implemented this, then I agree that he is the right person for this.

I looked into this a bit too. I'm not really sure why this doesn't use the same logic as the "In Front" mesh setting.
Now it seems like we have two code paths that does the same thing in practice.

Philipp Oeser (lichtwerk) renamed this task from Weight Paint: have to double click bones when obscured by the mesh to Bone Selection problem in weight paint: have to double click bones when obscured by the mesh.Aug 28 2019, 11:12 AM

Ok, the original usecase for the pose mode bone selection layer was a case for animators. Selecting bones when posing a character, later this features has been made available in weightpaint mode rB1ffb2bf917ac: Pose: make pose-bone xray usable in wpaint mode.
So it is a bit of both :-) Seems like the feature has been enabled in a part, were it was not designed for. Will see what needs to be done to fix this.