Sourcing Files:
I've been using MEL for a while now and although its works as its supposed to I find the syntax umm... taxing (no pun intended), plus I'd like to start bringing in other modules which just isn't possible from within MEL. Anyway I have a couple of questions:
How do I source files in python? I'm on a mac so i'm using an external editor (BBEdit) and I can load in files using:
[codebox]source "monkeyCode.mel";
blah();
[/codebox]
what is the equivalent within Python? i've tried using this (obviously without the semicolon) to no avail.
Array reference:
If I create a locator and then run this code:
[codebox]locatorPosition = mc.getAttr('locator1.translate')
print(locatorPosition)[/codebox]
-- i get this printed
[(0.37211369512941594, 2.8582850046155164, 5.5760987223407534)]
How do i access each variable separately? I've tried "print(locatorPosition[0])" but it just spits out all three variables.
If anyone knows the solution to these problems it would be great... thanks!