quicknap
11-22-2011, 09:49 AM
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
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
