Browse Source

Added a flag to override the forced 32-bit lookup in GetRegistryKey method.
make use of override in the Maya path lookup call to GetRegistryKey, thus allowing finding the 64-bit libraries

Chris Brunner 14 years ago
parent
commit
5916dc9912
1 changed files with 3 additions and 3 deletions
  1. 3 3
      makepanda/makepandacore.py

+ 3 - 3
makepanda/makepandacore.py

@@ -601,8 +601,8 @@ def ListRegistryValues(path):
         _winreg.CloseKey(key)
     return result
 
-def GetRegistryKey(path, subkey):
-    if (platform.architecture()[0]=="64bit"):
+def GetRegistryKey(path, subkey, override64=True):
+    if (platform.architecture()[0]=="64bit" and override64==True):
         path = path.replace("SOFTWARE\\", "SOFTWARE\\Wow6432Node\\")
     k1=0
     key = TryRegistryKey(path)
@@ -1356,7 +1356,7 @@ def SdkLocateMaya():
                 if (sys.platform == "win32"):
                     for dev in ["Alias|Wavefront","Alias","Autodesk"]:
                         fullkey="SOFTWARE\\"+dev+"\\Maya\\"+key+"\\Setup\\InstallPath"
-                        res = GetRegistryKey(fullkey, "MAYA_INSTALL_LOCATION")
+                        res = GetRegistryKey(fullkey, "MAYA_INSTALL_LOCATION", override64=False)
                         if (res != 0):
                             res = res.replace("\\", "/").rstrip("/")
                             SDK[ver] = res