Maniphest T66126

Non-active Grease Pencil object stuck in draw mode
Closed, Resolved

Assigned To
Antonio Vazquez (antoniov)
Authored By
Riaz Khan Eusouff (Ryu_Vector)
Jun 25 2019, 3:59 PM
Tags
  • BF Blender
Subscribers
Antonio Vazquez (antoniov)
Campbell Barton (campbellbarton)
Dalai Felinto (dfelinto)
Riaz Khan Eusouff (Ryu_Vector)

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GT 710/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 416.94

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-24 18:46, hash: rBc0c1b4542f39
Worked: (optional)

Short description of error
Unable to select, edit object or draw.

Exact steps for others to reproduce the error
not sure how this error was produced since i didnt tamper with any setting.

[Based on the default startup or an attached .blend file (as simple as possible)]

Revisions and Commits

rB Blender
D5138

Related Objects

Mentioned In
T66356: Runtime tool system assert when disabling a collection with an active grease pencil object in draw mode
rB7037ff920447: Partial fix to T66126: Non-Active Grease Pencil object stuck in drawmode
Mentioned Here
D5138: Proposed fix for T66126

Event Timeline

Riaz Khan Eusouff (Ryu_Vector) created this task.Jun 25 2019, 3:59 PM
Dalai Felinto (dfelinto) updated the task description.Jun 25 2019, 8:29 PM
Dalai Felinto (dfelinto) claimed this task.Jun 25 2019, 8:35 PM
Dalai Felinto (dfelinto) lowered the priority of this task from 90 to 30.
Dalai Felinto (dfelinto) added subscribers: Antonio Vazquez (antoniov), Dalai Felinto (dfelinto).

The object in question is stuck in the 'PAINT_GPENCIL' mode.
I tried to reproduce it from scratch and fail. Can you recall what you were doing before this issue?

Quick user support: You can fix this if you type in the blender console editor:
C.view_layer.objects.active = D.objetcs['GPencil.001']

Dalai Felinto (dfelinto) raised the priority of this task from 30 to 50.Jun 25 2019, 8:51 PM
Dalai Felinto (dfelinto) added a subscriber: Campbell Barton (campbellbarton).

Actually I managed to reproduce it:
[run a release build otherwise you will run in a BLI_assert failed: //source/blender/windowmanager/intern/wm_toolsystem.c:86, WM_toolsystem_ref_from_context(), at 'tref == sa->runtime.tool' assert - cc @Campbell Barton (campbellbarton) ]

  • Delete all objects
  • Add a stroke object to the default collection Collection.
  • Go to Draw mode
  • Disable the Collection
  • Re-Enable the collection

Now you can not make the object active because it is stuck in the draw mode. The same does not happen with mesh objects.

Dalai Felinto (dfelinto) renamed this task from Broken Grease Pencil to Non-active Grease Pencil object stuck in draw mode.Jun 25 2019, 11:02 PM
Dalai Felinto (dfelinto) mentioned this in rB7037ff920447: Partial fix to T66126: Non-Active Grease Pencil object stuck in drawmode.Jun 25 2019, 11:03 PM
Dalai Felinto (dfelinto) reassigned this task from Dalai Felinto (dfelinto) to Antonio Vazquez (antoniov).Jun 25 2019, 11:06 PM

@Antonio Vazquez (antoniov) the issue here is that greasepencil is treated as a special case and fails to leave draw mode when we call e.g., ED_object_mode_generic_exit().
I addressed this partially by setting the mode to object mode when the object is not active on load time (ED_editors_init()).

However a proper fix need to account for do_outliner_item_activate_tree_element() and ed_object_select_pick() as well. So if users run into this mid-section things still work.

I believe that if we integrate greasepencil in ED_object_mode_generic_exit() most of the issues go away.

Antonio Vazquez (antoniov) added a comment.Jun 26 2019, 11:55 AM

@Dalai Felinto (dfelinto) Proposed fix in D5138

I have tested and the bug has gone.

Antonio Vazquez (antoniov) changed the task status from Unknown Status to Resolved by committing rB4f3f68df3005: Fix T66126: Non-active Grease Pencil object stuck in draw mode.Jun 28 2019, 1:58 PM
Antonio Vazquez (antoniov) added a commit: rB4f3f68df3005: Fix T66126: Non-active Grease Pencil object stuck in draw mode.