Fix: change poll function for add and remove layer operators #109238

Merged
Falk David merged 1 commits from PratikPB2123/blender:grease-pencil-ar-layer-poll into main 2023-06-22 13:04:53 +02:00
Member

Current poll functions allows to use these operator only in edit mode.
Correct function would be active_grease_pencil_poll (check for active grease
pencil object instead of the context mode)

Current poll functions allows to use these operator only in edit mode. Correct function would be `active_grease_pencil_poll` (check for active grease pencil object instead of the context mode)
Pratik Borhade added 1 commit 2023-06-22 13:00:13 +02:00
fbeb6f6a43 Fix: change poll function for add and remove layer operators
Current poll functions allows to use these operator only in edit mode.
Correct function would be `active_grease_pencil_poll`
Pratik Borhade requested review from Falk David 2023-06-22 13:00:22 +02:00
Falk David approved these changes 2023-06-22 13:04:37 +02:00
Falk David merged commit c1d6f8b567 into main 2023-06-22 13:04:53 +02:00
Pratik Borhade deleted branch grease-pencil-ar-layer-poll 2023-06-22 13:07:09 +02:00
Member

This doesnt work with pinned GP (and crashes)

This doesnt work with pinned GP (and crashes)
Author
Member

@lichtwerk , neither works for old Grease pencil object.
Layers are only allowed to add/remove when grease pencil object is active (this can be improved though)

(and crashes)

Unable to replicate the crash :)

@lichtwerk , neither works for old Grease pencil object. Layers are only allowed to add/remove when grease pencil object is active (this can be improved though) > (and crashes) Unable to replicate the crash :)
Member

Oh, sorry crash is not related to this PR, related to undo:

  • add GP Suzanne
  • select cube
  • undo (GP Suzanne vanishes from viewport? but is still selected and present in the Outliner etc)
  • remove GP Suzanne layer
  • crash
Oh, sorry crash is not related to this PR, related to undo: - add GP Suzanne - select cube - undo (GP Suzanne vanishes from viewport? but is still selected and present in the Outliner etc) - remove GP Suzanne layer - crash
Sign in to join this conversation.
No reviewers
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
3 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#109238
No description provided.