Yes, that is also a way to do it, but I find it hard to manage when dealing 
with lots of dependencies, because it often means you have to go through all 
your altered files at the end and remove the reloads ( because you don't really 
want them released to your team as it just slows things down ). I guess it 
depends a lot on your module dependency complexity.

As a side note, if you do do that, you can skip the final import and do this :

import m1
m1 = reload(m1)

From: python_inside_maya@googlegroups.com 
[mailto:python_inside_maya@googlegroups.com] On Behalf Of kimmo ala-ojala
Sent: 30 August 2012 12:58
To: python_inside_maya@googlegroups.com
Subject: Re: [Maya-Python] How to get the updated module everytime in maya

import m1
reload(m1)
import m1

# imports the module
# reloads the module
# imports the reloaded module
On 30.8.2012 14:15, Mike Malinowski (LIONHEAD) wrote:
We have a 'tech deployment tool' that we run within Maya for this. Essentially 
it's a python script which runs through all our tech directly and looks for 
python modules, for each one it will then attempt to reload the module. It will 
also attempt to resource mel files, and unload/sync/reload mll plugins.

The downside is that as your toolset grows the process becomes a little slower, 
which is a hassle when you know you have only altered x amount of files, but it 
does ensure you're working with the latest versions from the point you called 
the script. This is then implemented into our menu so our TA's can update all 
plugins on demand whilst they develop. This is only triggered manually by our 
TA's, so once we release our tools there is no overhead for our Art/Animation 
teams, except on the initial load of Maya where all the tools are initially 
sourced.

Mike.

From: 
python_inside_maya@googlegroups.com<mailto:python_inside_maya@googlegroups.com> 
[mailto:python_inside_maya@googlegroups.com] On Behalf Of PBLN RAO
Sent: 30 August 2012 12:09
To: 
python_inside_maya@googlegroups.com<mailto:python_inside_maya@googlegroups.com>
Subject: [Maya-Python] How to get the updated module everytime in maya

Hi All,

i am developing a tool which has so-many modules to be imported within the 
modules.

for suppose if i have below 3 modules
m1,m2,m3.

py is my python file used in maya

py imports m1
m1 imports m2
m2 imports m3

while developing we will be coming across some errors, which we will be 
correcting where it is required.

so here when i execute the py file.
if i got an error at m2 module. we will be fixing the issue in an IDE.
after correcting the module if we run py file it uses the same old m2 module 
which was imported 1st. for that to get effected i need to close maya and 
reopen and run py again.

i want to skip this closing and opening maya every time i do a change in any 
module.

How can i overcome this...?

Can any one give any idea.
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to