ECToo / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

recurseMayaScriptPath #238

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the problem.

recurseMayaScriptPath does not return expected result.

What Version of Maya are you using?

Maya2009

On what operating system? (be as specific as possible and include service
packs, 64bit vs 32bit, etc)

Windows XP 32-bit sp3

What Version of PyMEL are you using?

1.0.2

What is the expected output? What do you see instead?

Expected to see a list of recursive paths get added to 'Maya_Script_Path' env, 
instead only see at most 1 path get added and deletes paths currently in the 
env.

If possible, provide a few lines of code to reproduce the problem. It helps
us if your code will reproduce the problem from a new scene.

import pymel.mayautils as mutil
import pymel.util as util
dirs = util.getEnvs('Maya_Script_Path')
for d in dirs: print d
C:/Documents and Settings/jonasa/My Documents/maya/2009/scripts
C:/Documents and Settings/jonasa/My Documents/maya/scripts
C:/Documents and Settings/jonasa/My Documents/maya/2009/presets
C:/Documents and Settings/jonasa/My Documents/maya/2009/prefs/shelves
C:/Documents and Settings/jonasa/My Documents/maya/2009/prefs/markingMenus
C:/Documents and Settings/jonasa/My Documents/maya/2009/prefs/scripts
C:/Program Files/Autodesk/Maya2009/scripts
C:/Program Files/Autodesk/Maya2009/scripts/startup
C:/Program Files/Autodesk/Maya2009/scripts/others
C:/Program Files/Autodesk/Maya2009/scripts/AETemplates
C:/Program Files/Autodesk/Maya2009/scripts/unsupported
C:/Program Files/Autodesk/Maya2009/scripts/paintEffects
C:/Program Files/Autodesk/Maya2009/scripts/fluidEffects
C:/Program Files/Autodesk/Maya2009/scripts/hair
C:/Program Files/Autodesk/Maya2009/scripts/cloth
C:/Program Files/Autodesk/Maya2009/scripts/live
C:/Program Files/Autodesk/Maya2009/scripts/fur
C:/Program Files/Autodesk/Maya2009/scripts/muscle

mutil.recurseMayaScriptPath('I:\Scripts\Maya\Python')
# pymel.mayautils : Added 1 directories to Maya script path # 
dirs = util.getEnvs('Maya_Script_Path')
for d in dirs: print d
I:\Scripts\Maya\Python
I:\Scripts\Maya\Python\Bungie_Halo_Reach\rigging\tools\scripts

Does maya.cmds exhibit the same problem?

getenv "Maya_Script_Path";
// Result: 
I:/Scripts/Maya/Python;I:/Scripts/Maya/Python/Bungie_Halo_Reach/rigging/tools/sc
ripts // 

Please provide any additional information below.

Original issue reported on code.google.com by tradigi...@gmail.com on 12 Mar 2011 at 2:12

GoogleCodeExporter commented 9 years ago
the fact that only 1 path was added may be due to the fact that only 
directories that actually contain .mel scripts are added to the path; the 
docstring has been updated to note this fact
as for all other paths being removed - this was a bug, and has been fixed in 
the latest on github

Original comment by elron...@gmail.com on 30 Mar 2011 at 7:51