CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-19-2013, 07:10 PM   #1
AtrusDni
Maya Monkey
 
AtrusDni's Avatar
portfolio
Michael Cook
TD
Stargate Digital
Pasadena, California, USA
 
Join Date: Feb 2003
Posts: 468
Send a message via AIM to AtrusDni Send a message via Yahoo to AtrusDni
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-25-2013, 09:39 AM   #2
ntashev
apiApe
 
ntashev's Avatar
portfolio
Nikolay Tashev
Lighting/Rendering Artist
www.cinemotion.bg
Sofia, Bulgaria
 
Join Date: Nov 2005
Posts: 326
Send a message via ICQ to ntashev
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..

 
Old 03-25-2013, 09:39 AM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:05 PM.


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