Maya API - Read texture attribute in deform() method?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2013   #1
Maya API - Read texture attribute in deform() method?

Hey guys, so I have a simple deformer node created and basically all it does at the moment is moves the vertices of a mesh up 10 units. I have created a Color attribute and set it to .setUsedAsColor(true); so I can plug a texture map into it.

All is working and good, except now inside the deform() method, how would I go about reading this information form the MDataBlock? I'm not sure what variable type(s) I need in order to get the data out and read it correctly. Could someone point me in the right direction? I've tried searching everywhere and through the examples, but it seems a lot of people use the compute() method instead of the deform() method.

Any information would be much appreciated, THANK YOU!
 
Old 03 March 2013   #2
It doesn't matter whether it's the deform() or compute(), the procedure is the same:
1. get the node, connected to your color plug ( MPlug(thisMObject(), attrMObject)::connectedTo() )
2. call MRenderUtil::sampleShadingNetwork with the proper parameter list.
__________________
..aut inveniam viam aut faciam..
::Copy SOP 4 Maya::
 
Old 03 March 2013   #3
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:32 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.