Blender internals tracing #6161
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#6161
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?
%%%==== Purpose: ====
This patch introduces 3 Blender.Set-based variables to allow python scripts to get verbose feedback of the progress of certain functions sent to the terminal/console . It is designed to be extensible, filterable, and quiet by default.
Why?
The initial set of traces provided in the patch are useful for producing highly verbose progress messages during a render session. These can be captured on a render farm and sent to a central render log for later analysis, for example.
It is our hope that additional trace groups are added by developers of various subsystems in the future, e.g., for fluidsim, physics calculations, etc., so that if somebody wants verbose progress messages, they can get them.
Usage:
To turn on tracing, one would write a Python script similar to this:
To turn tracing off, the script would then do this:
You can enable/disable specific groups of callbacks as well:
There are 3 groups provided in this patch:
0 - debug
1 - render progress
2 - unpack progress
Patch Details:
This patch comes in the form of a .zip file, because I assume I do not have permission to add a .h file to the repository. unzip it in the root of the blender source tree (right above the blender and lib folders), and the Blender_Trace.h file should go in the right spot.
The other file in the patch is a standard cvs diff -b -u > blender_trace.patch
The main file affected is the python/2_2x/Blender.c file. This patch adds 2 global variables: g_blender_trace_callback, and g_blender_trace_filter- [ ]. It also adds a function, Blender_Trace, that can be called like printf to route messages to g_blender_trace_callback (a python function), and the hooks to access this functionality from Python.
Rationale
I originally planned to have traceFilter take a "bitwise-or"'d group of flags that would then be stored and compared during a call to Blender_Trace. Upon further consideration, I decided to have traceFilter represent an array of groups rather than a bit-flag since there is the potential for wanting more than 32 or even 64 individual groups.
%%%
Changed status to: 'Open'
%%%for 2.6x we have a progress callback in the render api. further, I find this patch more intrusive then I'd like to be adding into blenders code.
closing.%%%
Changed status from 'Open' to: 'Archived'