Non-active Grease Pencil object stuck in draw mode #66126

Closed
opened 2019-06-25 15:59:00 +02:00 by Riaz Khan Eusouff · 9 comments

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: c0c1b4542f
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)]

brokenGpencil.blend

**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: `c0c1b4542f` 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)] [brokenGpencil.blend](https://archive.blender.org/developer/F7547803/brokenGpencil.blend)

Added subscriber: @Ryu_Vector

Added subscriber: @Ryu_Vector

Added subscribers: @antoniov, @dfelinto

Added subscribers: @antoniov, @dfelinto
Dalai Felinto self-assigned this 2019-06-25 20:35:26 +02:00

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']

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']`

Added subscriber: @ideasman42

Added subscriber: @ideasman42

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 @ideasman42 ]

  • 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.

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 @ideasman42 ] * 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 changed title from Broken Grease Pencil to Non-active Grease Pencil object stuck in draw mode 2019-06-25 23:02:40 +02:00
Dalai Felinto removed their assignment 2019-06-25 23:06:10 +02:00
Antonio Vazquez was assigned by Dalai Felinto 2019-06-25 23:06:10 +02:00

@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.

@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.

@dfelinto Proposed fix in D5138

I have tested and the bug has gone.

@dfelinto Proposed fix in [D5138](https://archive.blender.org/developer/D5138) I have tested and the bug has gone.

This issue was referenced by 4f3f68df30

This issue was referenced by 4f3f68df300539472264412f3b79e1024f70eb0d

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#66126
No description provided.