Scene.callback_add/remove() #23582
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#23582
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?
%%%The first patch (BPy_scene_callback.patch) adds the callback stuff to the Scene type and also includes a 'FRAME_CHANGE' event that calls a python callable object on a frame change.
Demo of the frame change feature -> http://vimeo.com/14510810
The second patch (BPy_scene_rendercall.patch, applies on top of the first one) adds 'PRE_RENDER' and 'POST_RENDER' events and is mainly to demonstrate how easy it is to add new event types -- which turns out to be a three or four line patch (ignoring the change to bpy_rna_callback.c for having a default type).
Works in the same way as the current region.callback_add/remove() methods;
handle = C.scene.callback_add(print, ('hello, world',), 'FRAME_CHANGE')
C.scene.callback_remove(handle)
Yep, I know 'the plan' is to have the event system handle this but I figured since it was super simple to implement, may be useful to someone and works now I may as well share...%%%
Changed status to: 'Open'
Changed status from 'Open' to: 'Archived'
Seems to be time to archive…