Python API: Draw handle will not work in custom drag operator in Custom AssetToolShelf #115082

Open
opened 2023-11-18 05:09:08 +01:00 by yonghao lv · 4 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.42

Blender Version
Broken: version: 4.0.0, branch: blender-v4.0-release, commit date: 2023-11-13 17:26, hash: 878f71061b8e
Worked:

Short description of error
use handle in the modal operator will draw nothing
using global handle will draw something for a second(in my test file, it did not draw anything, but print something for a second), then stop for no reason
please check the video

Exact steps for others to reproduce the error
run the test_file.blend
test_file.blend

**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.42 **Blender Version** Broken: version: 4.0.0, branch: blender-v4.0-release, commit date: 2023-11-13 17:26, hash: `878f71061b8e` Worked: **Short description of error** use handle in the modal operator will draw nothing using global handle will draw something for a second(in my test file, it did not draw anything, but print something for a second), then stop for no reason please check the video <video src="/attachments/cd4c61ba-c1a0-4798-91ad-1335f5687987" title="2023-11-18 12-04-11.mp4" controls></video> **Exact steps for others to reproduce the error** run the test_file.blend [test_file.blend](/attachments/450f3146-6b78-478e-b201-db00cd7fefcd)
yonghao lv added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-11-18 05:09:09 +01:00
Author
@JulianEisel
Author

Solved method: add bpy.context.area.tag_redraw() in the modal function, helps refresh the drawing

Solved method: add `bpy.context.area.tag_redraw()` in the modal function, helps refresh the drawing
Member

Solved method: add bpy.context.area.tag_redraw() in the modal function, helps refresh the drawing

Good you found a workaround.

However it would still be good to check why this is not working as expected without the manual redraw tag

> Solved method: add `bpy.context.area.tag_redraw()` in the modal function, helps refresh the drawing Good you found a workaround. However it would still be good to check why this is not working as expected without the manual redraw tag
Philipp Oeser added
Status
Confirmed
Module
Python API
Interest
User Interface
and removed
Status
Needs Triage
labels 2023-12-22 11:09:23 +01:00

Not sure if this looks like #115549 ?

Not sure if this looks like https://projects.blender.org/blender/blender/issues/115549 ?
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
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#115082
No description provided.