Chris:
That's what I was looking for. The next best solution I received was
using a dictionary inside the class.
Thanks much.
# Use setattr to 'create an attribute inside the Class:
prefix = 'pre_'
myColors = ['red','yellow','blue']
class makeVars(object):
global red
red = ''
def create (self, prefix,myVars):
for string in myVars:
setattr(makeVars, string, cmds.group(em = 1, n= '%s_%s' %
(prefix, string)))
print 'string: %s. Value: %s' %
(string,getattr(makeVars,string))
cmds.select(makeVars.red)
makeVars().create(prefix,myColors)
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe