Cleanup: Geometry Nodes: Debug print for bNodeTreeZones #116903

Merged
Jacques Lucke merged 6 commits from mod_moder/blender:tmp_zones_print into main 2024-01-12 13:56:36 +01:00

Std out operator overload for debug printing info about zones of node tree.
Common info about in/out nodes, border links and parent zone.

Example of print format:

0: Parent index: *; Input: Repeat Input, Output: Repeat Output; Border Links: {Index of Nearest: Index -> Evaluate at Index.001: Index, Vector Math: Value -> Compare: A}.
1: Parent index: *; Input: Repeat Input.001, Output: Repeat Output.001; Border Links: {Compare.001: Result -> Attribute Statistic.001: Attribute, Math.003: Value -> Switch.004: False, Reroute.001: Output -> Switch.004: True}.
Std out operator overload for debug printing info about zones of node tree. Common info about in/out nodes, border links and parent zone. Example of print format: ``` 0: Parent index: *; Input: Repeat Input, Output: Repeat Output; Border Links: {Index of Nearest: Index -> Evaluate at Index.001: Index, Vector Math: Value -> Compare: A}. 1: Parent index: *; Input: Repeat Input.001, Output: Repeat Output.001; Border Links: {Compare.001: Result -> Attribute Statistic.001: Attribute, Math.003: Value -> Switch.004: False, Reroute.001: Output -> Switch.004: True}. ```
Iliya Katushenock added 2 commits 2024-01-08 16:05:32 +01:00
Iliya Katushenock added 1 commit 2024-01-08 16:09:03 +01:00
Iliya Katushenock requested review from Jacques Lucke 2024-01-08 16:09:11 +01:00
Member

Generally seems fine, but what do you think about printing the info on multiple lines. Seems like that would increase readability quite a bit.

Generally seems fine, but what do you think about printing the info on multiple lines. Seems like that would increase readability quite a bit.
Author
Member

It's make sense, just didn't figure out about format for multiline lists.

It's make sense, just didn't figure out about format for multiline lists.
Member

@mod_moder not sure what you mean, just also print some \n between list elements.

@mod_moder not sure what you mean, just also print some `\n` between list elements.
Author
Member

I change this to:

0: Parent index: 1; Input: Repeat Input, Output: Repeat Output; Border Links: {
  Separate XYZ: X -> Math.001: Value;
  Group Input: Module -> Math.002: Value;
  Group Input: Mods Min -> Random with seed change: Min;
  Group Input: Mods Max -> Random with seed change: Max;
}.
I change this to: ``` 0: Parent index: 1; Input: Repeat Input, Output: Repeat Output; Border Links: { Separate XYZ: X -> Math.001: Value; Group Input: Module -> Math.002: Value; Group Input: Mods Min -> Random with seed change: Min; Group Input: Mods Max -> Random with seed change: Max; }. ```
Iliya Katushenock added 2 commits 2024-01-10 15:39:29 +01:00
Jacques Lucke approved these changes 2024-01-10 16:22:46 +01:00
@ -351,6 +353,7 @@ static std::unique_ptr<bNodeTreeZones> discover_tree_zones(const bNodeTree &tree
update_zone_border_links(tree, *tree_zones);
std::cout << *tree_zones << std::endl;
Member

remove debug print

remove debug print
mod_moder marked this conversation as resolved
@ -525,0 +530,4 @@
for (const std::unique_ptr<bNodeTreeZone> &zone : zones.zones) {
stream << *zone;
if (zones.zones.last().get() != zone.get()) {
stream << std::endl;
Member

Use \n instead of std::endl.

Use `\n` instead of `std::endl`.
mod_moder marked this conversation as resolved
Iliya Katushenock added 1 commit 2024-01-10 17:45:55 +01:00
Jacques Lucke merged commit 23122338cb into main 2024-01-12 13:56:36 +01:00
Iliya Katushenock deleted branch tmp_zones_print 2024-01-12 14:03:01 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
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#116903
No description provided.