sinistar
12-18-2010, 04:21 PM
I was hoping someone more educated in scripting could give me some pointers. I'm having a difficult time wrapping my head around scripting.
I think it would help if I knew the thought process that goes into creating one... If someone could tell me the thought process they would follow in creating a script I want to make and give me some pointers on how I could create it, it would really help me out in learning scripting. I'd like to learn Python... I have written simple Maya scripts (copied functions from the script editor) and translated them to python but this would still really help.
The script i'm trying to write is a tool for helping test the skin weights on a selected group of joints by bending them at different times in the timeline. This is how i'd like it to work:
-User selects the joints he'd like to run the script on
-User sets a flag denoting which axis he'd like to rotate each selected joint along and the range he'd like to rotate say from "rx=0 - -90"
-User executes the command
-Each selected joint is allotted 10 seconds of time on the time line for testing. Starting with the first which is keyed at rx=0 at frame 0 on the time line then keyed at rx=-90 at frame 10. Then keyed at rx=0 at frame 11. The next selected joint is keyed at rx=0 on frame 10 and then rx-90 at frame 20 etc etc...
And that's what i'd like it to do. Does anyone have a few minutes to spare explaining what the thought process would be going in to writing something like this?
Thanks a lot!
I think it would help if I knew the thought process that goes into creating one... If someone could tell me the thought process they would follow in creating a script I want to make and give me some pointers on how I could create it, it would really help me out in learning scripting. I'd like to learn Python... I have written simple Maya scripts (copied functions from the script editor) and translated them to python but this would still really help.
The script i'm trying to write is a tool for helping test the skin weights on a selected group of joints by bending them at different times in the timeline. This is how i'd like it to work:
-User selects the joints he'd like to run the script on
-User sets a flag denoting which axis he'd like to rotate each selected joint along and the range he'd like to rotate say from "rx=0 - -90"
-User executes the command
-Each selected joint is allotted 10 seconds of time on the time line for testing. Starting with the first which is keyed at rx=0 at frame 0 on the time line then keyed at rx=-90 at frame 10. Then keyed at rx=0 at frame 11. The next selected joint is keyed at rx=0 on frame 10 and then rx-90 at frame 20 etc etc...
And that's what i'd like it to do. Does anyone have a few minutes to spare explaining what the thought process would be going in to writing something like this?
Thanks a lot!
