[PY API Documentation] bpy.app.handlers.scene_update_{pre,post} documentation needs clarification #46329

Closed
opened 2015-09-30 15:13:49 +02:00 by Sybren A. Stüvel · 9 comments

Blender Version
Broken: 2.76-rc2

Short description of error
The documentation for the bpy.app.handlers.scene_update_{pre,post} handlers states that they're called "on updating the scenes data". However, they're called even when the data hasn't changed. Of course such handlers are useful, but the documentation should reflect the current behaviour. I would suggest something along the lines of:

Called on every (possible) scene data update. Does not imply that anything changed in the scene, just that the dependency graph {is about to be,was} reevaluated, and the scene {is about to be,was} updated by Blender's animation system.

Exact steps for others to reproduce the error
Open the attached blend file test-scene-update-handler.blend, run the script, inspect the console. Even though nothing changes in the scene, the callback is called 200+ times a second (at least on my machine).

**Blender Version** Broken: 2.76-rc2 **Short description of error** The documentation for the `bpy.app.handlers.scene_update_{pre,post}` handlers states that they're called "on updating the scenes data". However, they're called even when the data hasn't changed. Of course such handlers are useful, but the documentation should reflect the current behaviour. I would suggest something along the lines of: > Called on every (possible) scene data update. Does not imply that anything changed in the scene, just that the dependency graph {is about to be,was} reevaluated, and the scene {is about to be,was} updated by Blender's animation system. **Exact steps for others to reproduce the error** Open the attached blend file [test-scene-update-handler.blend](https://archive.blender.org/developer/F241139/test-scene-update-handler.blend), run the script, inspect the console. Even though nothing changes in the scene, the callback is called 200+ times a second (at least on my machine).
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Bastien Montagne changed title from bpy.app.handlers.scene_update_{pre,post} documentation needs clarification to [PY API Documentation] bpy.app.handlers.scene_update_{pre,post} documentation needs clarification 2015-10-01 12:25:03 +02:00
David Campbell was assigned by Bastien Montagne 2015-10-01 12:25:03 +02:00

Added subscriber: @mont29

Added subscriber: @mont29
David Campbell was unassigned by Bastien Montagne 2015-10-01 12:25:17 +02:00
Campbell Barton was assigned by Bastien Montagne 2015-10-01 12:25:17 +02:00

Mmmmh… not quite sure I agree here, “scene update” does not mean “scene change”… Let’s see what @ideasman42 says here. :)

Mmmmh… not quite sure I agree here, “scene update” does not mean “scene change”… Let’s see what @ideasman42 says here. :)
Author
Member

I was thinking about something along the lines of D1535.

I was thinking about something along the lines of [D1535](https://archive.blender.org/developer/D1535).
Campbell Barton removed their assignment 2016-08-03 06:34:41 +02:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Sybren A. Stüvel was assigned by Bastien Montagne 2016-08-03 17:27:01 +02:00

@dr.sybren just go ahead and commit, find the new version a bit verbose, but those two hooks can indeed be confusing… :|

@dr.sybren just go ahead and commit, find the new version a bit verbose, but those two hooks can indeed be confusing… :|

This issue was referenced by blender/blender@01ee88563b

This issue was referenced by blender/blender@01ee88563b64e8f381bbbe9f54894ad27541f050
Author
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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-addons#46329
No description provided.