Heya
I'm battling with a part of my script... I want to cmds.ls certain items
and then remove part of their name. After that I want the resulting name to
be used for next part of the script. The wall I hit is with .format
string... I got an working example but somehow it makes no sense to me
whh... anyway have a look, if any1 could push me to the right direction
that would be great ! I should be able to pick it up after hehe :)
Here is example of working script:
fn = "LN0001_07272010_3.dat".split('_')
new_fn = '{0}_JY_{1}'.format(fn[0], fn[1])
print new_fn
but he uses premade name...
and here is my try
list = cmds.ls('*_set*')
for objects in list:
t = cmds.ls(objects)[0].split('_')[-1]
new_fn = objects.format( t[0], t[1] )
print new_fn
I just want to be able to remove _set and use the new name to select nodes
and run next script...
Thanks in advance! :)
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe