Use the node name as the default label in the graph editor#3157
Use the node name as the default label in the graph editor#3157Alxiice wants to merge 6 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3157 +/- ##
===========================================
+ Coverage 85.75% 85.78% +0.03%
===========================================
Files 78 78
Lines 12087 12087
===========================================
+ Hits 10365 10369 +4
+ Misses 1722 1718 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors node renaming and labeling in Meshroom. It removes the nameToLabel helper, updates the name property to be writable, and introduces a renameNode method in the task manager. Additionally, it updates the unique node name generation format to omit the underscore separator and allows resetting a node's name to its default label by passing an empty string. The reviewer identified two critical issues: first, calling _taskManager.renameNode directly in UIGraph.renameNode breaks undo/redo functionality, which should instead be handled within RenameNodeCommand; second, removing the underscore separator in unique node names breaks getNodeIndexFromName, which relies on splitting by _ to parse the node index.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
3c43a38 to
b0f11d3
Compare
|
|
||
|
|
||
| class Input_Int2(desc.InitNode, desc.InputNode): | ||
| """ | ||
| This node is an init node that receives an Integer. | ||
| """ | ||
|
|
||
| category = "Other" | ||
|
|
||
| inputs = [ | ||
| desc.IntParam( | ||
| name="integer", | ||
| label="Input Integer", | ||
| description="An integer.", | ||
| value=0, | ||
| exposed=True | ||
| ) | ||
| ] | ||
|
|
||
| class Input_Int_3(desc.InitNode, desc.InputNode): | ||
| """ | ||
| This node is an init node that receives an Integer. | ||
| """ | ||
|
|
||
| category = "Other" | ||
|
|
||
| inputs = [ | ||
| desc.IntParam( | ||
| name="integer", | ||
| label="Input Integer", | ||
| description="An integer.", | ||
| value=0, | ||
| exposed=True | ||
| ) | ||
| ] |
There was a problem hiding this comment.
This should be removed, I'm assuming it was intended to be used for tests prior to creating the PR.
| class Input_Int2(desc.InitNode, desc.InputNode): | |
| """ | |
| This node is an init node that receives an Integer. | |
| """ | |
| category = "Other" | |
| inputs = [ | |
| desc.IntParam( | |
| name="integer", | |
| label="Input Integer", | |
| description="An integer.", | |
| value=0, | |
| exposed=True | |
| ) | |
| ] | |
| class Input_Int_3(desc.InitNode, desc.InputNode): | |
| """ | |
| This node is an init node that receives an Integer. | |
| """ | |
| category = "Other" | |
| inputs = [ | |
| desc.IntParam( | |
| name="integer", | |
| label="Input Integer", | |
| description="An integer.", | |
| value=0, | |
| exposed=True | |
| ) | |
| ] |
d60be93 to
0c03ff2
Compare
Description
_1, then_2, and so on (Fig. 2).Fig. 1: Before (top) / After (bottom)
Fig. 2: Nodes have no more index suffix by default
Important
Even though the node name edition box blocks typing underscores, nodes can technically have underscores in their names : if the underscore character is c/p in the node name; if we edit the graph on disk; or if the node description class name have the symbol.
Now the unique name generation rely on removing the end
_Nsuffix, so underscores are preserved.The only exception are node types named "
XXX_N" (e.g.NodeType_Test_3) : if nodes with this node type are created, the name will be stripped from the_Nprefix (in our case:NodeType_Testfor the first instance, thenNodeType_Test_1, etc)