Grease pencil draw operator is not working in the sequencer #49378
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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-addons#49378
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
Win 10 / Quadro 4000
Blender Version
Broken: (example: 2.78 RC2)
Short description of error
The draw operator of the grease pencil is not working in the sequencer area.
layout.operator("gpencil.draw").mode = 'DRAW' enable the draw cursor, but stop as soon as the button is pressed.
bpy.ops.gpencil.draw(mode='DRAW') does nothing at all.
The only thing that is working is to draw with the "D" shortcut.
Exact steps for others to reproduce the error
Load the .blend, execute the script and try to use the draw buttons in the properties panel of the VSE.
sequencer_gp_draw_bug.blend
Changed status to: 'Open'
Added subscriber: @VincentGires
Added subscribers: @JoshuaLeung, @antoniov
I not sure we can consider this as a bug. The draw button is not available for some reasons in the sequence panel. If you create a new panel yourself, we maybe can support this, but need review.
@JoshuaLeung what do you think? I have checked the code and the trick is that BLI_rcti_isect_pt_v function return false because the visble rect in ED_region_visible_rect is (0, 0 ,0, 0).
Added subscriber: @lichtwerk
Changed status from 'Open' to: 'Archived'
Not a bug.
The toolshelf in the 3D view is only for the 3D view, and nothing else. Occasionally you might get lucky with an operator that doesn't care about which editor it's called from. But for everything else where the editor does matter (e.g. the draw operator here, most of the other Grease Pencil operators, and anything in the animation editors are good examples), those operators won't really work because when you click on the button in the toolshelf, you're activating the operator in the 3D view that hosts the button + region that the button lives in. By and large, there isn't really any way to really know with any certainty which editor you had been intending the action to get directed to.
The Grease Pencil draw operator needs to know about which editor it's working in, as each editor could have a different GP datablock active (e.g. if you have both a 3D view + a sequencer view open at the same time)
The behaviour you're seeing where the operator exits as soon as you click somewhere in the sequencer is a consequence of a very deliberate feature to make the draw operator usable for people using a tablet only (without easy/convenient access to a keyboard). Namely, the operator is set up so that if you click outside the region (or the same area/editor, when invoking from the toolshelf/header) in which the operator was invoked, that is taken a sign that you've finished drawing and want to exit drawmode. Without this feature, it was impossible for some users to get out of draw mode when drawing with just a tablet (and the keyboard is out of reach for various reasons).
On a more serious note, that's why for the most critical settings, we have a special panel (the "Grease Pencil Settings") panel. If you really need to have a button to launch this operator, I suggest putting it there. (Also, watch out for which "operator_context" the button will be executing stuff with...