Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

OpenMaya plugin use texture as color input

mvn882
Explorer

OpenMaya plugin use texture as color input

mvn882
Explorer
Explorer

Hey,
I'm trying to write a plugin that takes the color out from a file texture as input.
I'm using the new openmaya api in python and just cant get it to work even just setting the output to the input just results in all black pixels, maybe im doing something wrong:
I'm doing the following:

OpenMaya.MFnNumericAttribute()
numeric_attr_fn.createColor(...)
then taking the input asFloatVector()
and setting the output with setMFloatVector(...)

I also tried adding UV coordinates which seemed to do something as it's now calling compute for each pixel it seems but still just outputs (0,0,0).
anybody have experience with this? thanks!

0 Likes
Reply
793 Views
2 Replies
Replies (2)

mvn882
Explorer
Explorer

After messing around with it more I found I have to make an MPxShadingNodeOverride for it to work, not the most elegant solution though 😕

0 Likes

revoconner
Participant
Participant

I tried to implement your solution but it didnt work, I am still getting black, trying to make a reconstruct blue channel node for normal maps that are packed to only R and G.
Any pointer in the right direction would be helpful @mvn882 

0 Likes