how to make maya read updated python files?

how to make maya read updated python files?

5rivamsi
Contributor Contributor
377 Views
2 Replies
Message 1 of 3

how to make maya read updated python files?

5rivamsi
Contributor
Contributor

I created a modules folder and set maya to read while starting up. I then updated the scripts in some of the files and want to see changes in maya. how can i do it? Currently i'm running the whole new script in sript editor. How can i make maya re-read the same file. 

Also where can I start learning to write c++ plugins for maya? 

thanks in advance.

0 Likes
378 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor

Hi!

 

To load a changed python module you need the reload() function.

 

Python 2.7:

import yourModule
reload(yourModule)

 

Python 3:

import yourModule
from importlib import reload
reload(yourModule)

 

No idea about the C++ stuff, sorry

 

I hope it helps!

0 Likes
Message 3 of 3

mcw0
Advisor
Advisor

"C++ for Dummies"

0 Likes