Closed erjiang closed 12 months ago
@erjiang
Can you see if this helps?
With this change, color inputs don't seem to work anymore. As shown in the screenshot in #691, the color inputs have become Blender colors (dark yellow) and I'm not able to do something as simple as create a PxrConstant shader and change the emitColor.
(Just copying what I wrote in #689 regarding this issue)
Unfortunately, this seems to be a limitation of Blender.
We're using a custom class for our node sockets. There doesn't seem to be any way to change the socket's type property when using a custom class. Custom node sockets all get set as 'VALUE' for its type. The group node seems to use this property to figure out what kind of socket it should add for its input/output. If you try to explicitly set the type property, the socket reverts back to the base NodeSocketFloat class, and we lose our custom properties.
We cannot use the base Blender node socket classes, because we want to be able to add our own properties, and override the draw methods for the class. The only thing I can think of that might fix this is to create our own custom group node, but that would be a significant change, and I'm not sure if that will fully solve this.
Gonna close this one. Blender 4.0 has made changes to the way sockets are created for group nodes, and this seems to work now as expected in my testing, after updating our code.
In Blender, complex shader utilities are often put into groups to be reused elsewhere. The group can take custom inputs and outputs such as color, float, etc. The Pxr data types are not supported, however.
Blender 3.6.2 RenderMan for Blender 25.2.0 Linux
To reproduce:
Expected:
Group input is shown as Pxr color, and Pxr color can be input to the group.
Actual:
Node inputs/outputs are of unknown type and Blender defaults to float. Node group is not usable as a result.