MaterialX: TextureNode does not have nodeType set
Description
When using the MaterialXLoader with TiledImage MaterialX nodes, three creates TextureNodes, however I do not see the output type of the TiledImage as the nodeType of the TextureNode as I'd expect. Typically there is a ConvertNode parenting the TextureNode with the correct type, however I've encountered a situation where the TextureNode is parented by a MathNode in which in1 has type color3 but the TextureNode should export a float type, here it's impossible to know which type should be used. This is an issue when exporting three nodes
Solution
When reading the tiledImage node from the MaterialX file, put the output type as the nodeType on the TextureNode
Alternatives
If there is some reason for this, or if I'm totally missing where this type can be found, please let me know!
Additional context
StackBlitz : https://stackblitz.com/edit/three-mtlx-ptdcen?file=main.js,mtlx%2Fbrick.mtlx&terminal=dev
No response
The node system uses Node.getNodeType() to check the type of node, .nodeType is used only for static types, would not be the case with TextureNode.
The node system uses
Node.getNodeType()to check the type of node,.nodeTypeis used only for static types, would not be the case withTextureNode.
Thanks @sunag, I'm not sure this is exactly what i'm looking for. In MaterialX, I can have a tiledimage node that outputs a float, color3, float3 (maybe others), however this block of code https://github.com/mrdoob/three.js/blob/dev/src/nodes/accessors/TextureNode.js#L72, seems to only output float, uvec4, ivec4, or vec4. Do you know if there's some other field or way to get the float / vector3|float3 / color output from the tiledimage / texture node?