Loading Python script on a Mac?

Loading Python script on a Mac?

Anonymous
Not applicable
661 Views
4 Replies
Message 1 of 5

Loading Python script on a Mac?

Anonymous
Not applicable
I found a cool free little script for creating a dynamic chain in Maya called "Create Dynamic Chain From Curve 1.2.1". However, it's a Python script and I'm just not familiar enough with Python to be able to get it to work. I'm not a scripts guy. I'm kind of ok with MEL, but Python ... not so much. Can anyone walk me through getting this script to function on my Mac? Feel free to treat me like a 6 year old since my adventures into Python have pretty much knocked me down to about that level anyway (apologies to all you Python writing 6 year olds). A step-by step outline would be great.
Thanks in advance to anyone who would waste time on this.
0 Likes
662 Views
4 Replies
Replies (4)
Message 2 of 5

n8skow
Collaborator
Collaborator
Same as with MEL, you have to source it first, and then execute it (per the "How to use.txt"):

from chainCreator import *
chainCreator()

However, I downloaded the script from CreativeCrash - and it appears to be corrupted, bunch of gibberish in the file... Did you happen to download it from a different source?
0 Likes
Message 3 of 5

lee.dunham
Collaborator
Collaborator
as long as chainCreator.pyc is in your scripts folder then
from chainCreator import *
chainCreator()

should work fine.

n8skow -
Thats because its the .pyc file 🙂
0 Likes
Message 4 of 5

n8skow
Collaborator
Collaborator
ahhh
fairly Python ignorant myself 😃
0 Likes
Message 5 of 5

lee.dunham
Collaborator
Collaborator
haha no worries.
I definitely recommend a good look-in, very powerful when used right 🙂
i couldn't do without nested dictionaries and list comprehension now!
0 Likes