CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 11-22-2011, 10:49 AM   #1
quicknap
New Member
portfolio
Tim Napper
London, GB
 
Join Date: Jul 2009
Posts: 3
animated fur map

Hi,

I'm making a short film inbetween freelancing and I'm hoping it's going to boost my career a bit. I'm trying to find a way to animate my fur baldness and length maps by either connecting an image sequence node to the fur description or by using a more roundabout method with script below. This is my first ever python script and there's still plenty of gaping holes in my knowledge, so all help and criticism is very welcome. Thanks in advance for any advice....

Tim

import maya.cmds as cmds;

def frameCall():
_timeObj = cmds.ls(type='time')[0];
_frame = cmds.getAttr(_timeObj+'.outTime');
print(_frame);
_name = 'baldness_%s.jpg'%_frame;
_mesh = cmds.ls(type='mesh')[0];
print(cmds.getAttr('beastFur01.bm[0]'));
cmds.setAttr('beastFur01.bm[0]',_name);

cmds.expression(n="furUpdate",s='python(\"frameCall()\")');

It keeps telling me that 'baldnessMap' isn't a typical numerical value and I need to use the correct -type flag. I'm so new to Python that that's left me a bit stumped.
Anyway, thanks again for your time,

Tim
 
Old 11-23-2011, 10:14 AM   #2
haggi
Expert
3d freelancer
 
Join Date: Apr 2004
Posts: 953
something like

cmds.setAttr(attName, var, type="string")

should work.
__________________
www.renderwiki.com - www.openmaya.net
 
Old 11-23-2011, 10:14 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 08:40 AM.


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