I am a beginner and I have started teaching myself python (in maya).
However, I am stuck on this piece of code. I am trying to toggle the visibility of the object.
I have written this:
def function_name ("transform_name"):
if s.visibility.isKeyable() and not s.visibility isLocked():
s.visibility.set(True)
s.visibility.lock()
print s.visibility.type()
return value_of_function
It says that there is a SyntaxError..but I'm not sure why??
I am trying to make a program that will allow me to reveal/hide an object (which I have specified in the transform name) at the command line.
Thanks

New Topic/Question
Reply



MultiQuote






|