-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add contextual menu to bind materials #2287
Changes from all commits
874d91a
8c1c837
29769ab
7abdfa5
d764d99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,12 @@ Ufe::ConstAttributeDefs getAttrs(const PXR_NS::SdrShaderNodeConstPtr& shaderNode | |
for (const PXR_NS::TfToken& name : names) { | ||
PXR_NS::SdrShaderPropertyConstPtr property | ||
= input ? shaderNodeDef->GetShaderInput(name) : shaderNodeDef->GetShaderOutput(name); | ||
if (!property) { | ||
// Cannot do much if the pointer is null. This can happen if the type_info for a | ||
// class derived from SdrProperty is hidden inside a plugin library since | ||
// SdrNode::GetShaderInput has to downcast a NdrProperty pointer. | ||
continue; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have third-party shaders crashing here. They registered the input names, but did not register a SdrShaderProperty. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be a great code comment. |
||
} | ||
std::ostringstream defaultValue; | ||
defaultValue << property->GetDefaultValue(); | ||
Ufe::Attribute::Type type = getUfeTypeForAttribute(property); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea how to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afraid not.