View Full Version : function to select/deselect/add/

11 November 2010, 11:36 PM
Hi, i have to write a function so that when i enter

"function_name (“transform_name”, “mode”)"
"function1("pCube1", "s")"

so that when i put in the function name, an argument, which will specify the object i want to use and a "s" for select, "d" for deselect and "a" for add it will select, deselect and add each item in the workspace respectively. I really dont know how to go about this, would someone be able to show me how to do this? Any help would be greatly appreciated. Thanks

11 November 2010, 10:57 AM
Maya already has a function that does this, it's called "select". ;)
I assume you are being tasked with all these totally unnecessary tasks to help you learn python for school or college right? in that case are you supposed to just ask someone else to provide you with the solution? ;)

what are you actually having difficulty with here Jacob.. this is extremely basic stuff if you know any python (which you obviously do already). do you know how to declare a function? do you know how to use the select command?


CGTalk Moderation
11 November 2010, 10:57 AM
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.