0

I wrote this Python script that should run when I use my MEL command. It worked before when I tested it on my school computer. But now it doesn't seem to work, I don't know if it's changed since last, I can't see that it is either.

When I run it now, it says it can't find the path of the module. Here's the correct error line.

Error: ImportError: No module named inlupp3

I have the script on: D:\Autodesk\maya2012\script

Here's my Python script:

import maya.cmds as mc
import math
import random as rdm
import inlupp3 as in3
reload(mm)

def Spiral():
    currentFrame = mc.currentTime( q = True )
    startFr =  mc.currentTime( 1 )
    endFr = 200
    qtyPlap = 5
    aspPlap = 15
    rad = 10
    origObj = "pCube1"

if currentFrame % 10 == 0:
   mm.clickOK() 

rdmX = rdm.uniform( -0.8, 0.8 )
rdmY = rdm.uniform( -0.8, 0.8 )
rdmZ = rdm.uniform( -0.8, 0.8 )
mc.move( rdmX, rdmY, rdmZ, "pCube1", relative = True, localSpace = True )

And here's my MEL command:

python( "import inlupp3 as inl3" ) ;
python( "reload( mm )" ) ;
python( "inl3.clickOK( 1, 200, 5, 15, 10, 'pCube1' )" ) ;
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
Illscha
  • 33
  • 1
  • 2
  • 6

1 Answers1

0

first and foremost put your script is in the right file path which is in your C:\Users[username]\Documents\maya\scripts

next if the first snippet you provided has import inlupp3 as in3 you cannot import it to itself

your reload(mm) im not sure what this is referring to but if your trying to reload your module you need to have then it should be reload(inl3)

you also have in3 as the module in the top snippet and inl3 in the second snippet

i also reccomend taking out numbers in your file name

cronicryo
  • 437
  • 1
  • 4
  • 15
  • Thank you for your answer. I figured out some of the stuff you mentioned before you answered. The problem I have now is that "in3.clickOk" gets an error. It's pasted right here: # Error: AttributeError: 'module' object has no attribute 'clickOK' # – Illscha Apr 01 '14 at 16:34
  • this means that the the function or attribute you are trying to call doesnt exist check the name and capitilization – cronicryo Apr 01 '14 at 19:09