Fix: GPv3: Retrieving drawings for layer returns invalid layer index #120722
No reviewers
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120722
Loading…
Reference in New Issue
No description provided.
Delete Branch "SietseB/blender:gpv3-fix-invalid-layer-index"
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?
The utility function
retrieve_editable_drawings_from_layer()
returneda drawing index instead of a layer index. This PR fixes that.
Hi, looks correct.
Falk is on holidays this week. Fix is quite straightforward so I think we can merge this directly :)
@blender-bot build
@PratikPB2123 @SietseB please revert this. This change breaks Separate by Layer operator (grease_pencil_separate_layer)
The operator needs all the drawings in a particular layer not the layer index.
I think the function name retrieve_editable_drawings_from_layer is clear. it is not?
@mendio I don't have the rights to revert, we need @PratikPB2123 for that.
But what is the issue in
grease_pencil_separate_layer
?The definition of
MutableDrawingInfo
is this:So the second field should be filled with the layer index. E.g. the Tint tool uses that and crashes when the second field is filled with the drawing index.
If
grease_pencil_separate_layer
is somehow expecting thatdrawing_info.layer_index
holds a drawing index, it should be fixed in there.Hi, I dont understand why we need to revert this. As @SietseB explained, second member of MutableDrawingInfo is layer_index.
On phone right now, as far as I remember
grease_pencil_separate_layer
did not uselayer_index
I'll check
grease_pencil_separate_layer
tomorrow and let you knowYou were right, it's not an issue generated by this change. Sorry for the confussion.
I get an assert in all the Separate operators (selected, by layer and by material) but only with drawings automatically converted from GPv2. The Separate operators work well for GPv3 objects created from scratch. I'd need to investigate what causes it
No problem. At least we don't have to revert this commit 😃
@mendio Could you create a bug report for it? Then we don't loose track of the bug and can investigate together :)
Bug report: #120926: GPv3: Blender crash using Separate Operators on converted files from GPv2