Skip to content

Consolidate ClosureCompound with Compound C++ node#2410

Merged
jstone-lucasfilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
ld-kerley:consolidate-compound-node
May 27, 2025
Merged

Consolidate ClosureCompound with Compound C++ node#2410
jstone-lucasfilm merged 2 commits into
AcademySoftwareFoundation:mainfrom
ld-kerley:consolidate-compound-node

Conversation

@ld-kerley

Copy link
Copy Markdown
Contributor

Similar to the recent work in #2400.

This PR consolidates the few minor differences left between the ClosureCompound and Compound C++ nodes., further reducing the complexity of the C++ implementation nodes.

Also consolidates the logic used to determine if the output is a closure, to be shared here and with the SourceCode node.

shadergen.emitString(_functionName + "(", stage);

string delim = "";
// Check if we have a closure context to modify the function call.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to your changes, but perhaps it's a good opportunity to improve this old code comment. Since the closure context is not visible here anymore this comment is a bit confusing.

So could be changed to something like: "Add an argument for closure data if needed"

return outputs[0]->getType().isClosure();
}


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Extra newline

@niklasharrysson niklasharrysson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just added two minor comments above.

ld-kerley added 2 commits May 25, 2025 17:42
… the previous work done for SourceCodeNode.cpp. Also added an additional helper call to consolidate the logic.
@ld-kerley ld-kerley force-pushed the consolidate-compound-node branch from cb45447 to ef4440b Compare May 26, 2025 00:42

@jstone-lucasfilm jstone-lucasfilm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@jstone-lucasfilm jstone-lucasfilm merged commit 6e2c64d into AcademySoftwareFoundation:main May 27, 2025
32 checks passed
@ld-kerley ld-kerley deleted the consolidate-compound-node branch November 21, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants