Grease Pencil selection order is wrong #62101
Labels
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#62101
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: macOS 10.14.3
Graphics card: AMD Radeon R9 M395X 4096 MB
Blender Version
Broken: Blender 2.80 beta, 2019-03-01
Short description of error
Grease Pencil selection order is wrong. Grease Pencil objects will always be selected last, even if they are in front.
Exact steps for others to reproduce the error
In the blend file below, there's a simple example of a bunch of GP objects in front of a mesh:
Click over the Grease Pencil monkey objects to select them. Rather than the GP objects being selected, the mesh object behind them will be selected instead.
GP_selection_order_bug.blend
Added subscriber: @WilliamReynish
Added subscriber: @fclem
We need @fclem help here.
I only add the render section for select, but I did not make any code of the selection itself. No idea why is working in this way.
Added subscriber: @antoniov
Added subscriber: @mano-wii
Is this bug still reproducible in the latest builds?
I tried again by disabling the
OpenGL Depth Picking
option and I was able to reproduce the bug.The problem is that gpencil calls
gpencil_free_runtime_data(stl)
insideGPENCIL_draw_scene()
thus releasing some resources in the first call fromDRW_draw_select_loop(...)
.However,
DRW_draw_select_loop(...)
callsdrw_engines_draw_scene()
at least three consecutive times.I don't know if the solution has to be done in the
DRW_manager
itself or in theGPencil engine
.I also noticed an efficiency issue.
gpu_select_query_load_id(id)
is called several times consecutively for the sameid
.This forces the creation and use of more
glQueries
.It would be good to investigate this too.
If I remember correctly, Similar queries are merged together.
Best way of fixing it would be to introduce a post draw callback in the draw engine struct and free the runtime data here. But that maybe a bit too big of a modification at this time.
Other possible fix is to move all these resources to a per layer storage (DRW_view_layer_engine_data_get) and discard only in cache_init.
Is there any way to recreate the entire runtime_data within
GPENCIL_draw_scene(...)
?It would be another possible fix.
I think this can be complex...you have a list of object sorted by z-depth, the layers, the strokes with different types, etc...not sure what really you need, but maybe could be possible if you give me more details of what you want to do.
Have you checked
drw_gpencil_select_render(stl, psl);
function?@antoniov would be nice to remove that
gpencil_free_runtime_data(stl)
fromGPENCIL_draw_scene(...)
.At least for selection.
This issue was referenced by
a0f3ea7da3
Changed status from 'Open' to: 'Resolved'