Browse Source

Fixes for maya on linux

rdb 17 years ago
parent
commit
285a66ac23

+ 14 - 4
doc/makepanda/makepanda.py

@@ -3165,7 +3165,8 @@ for VER in MAYAVERSIONS:
     TargetAdd('mayaeggimport'+VNUM+'.mll', input='mayaeggimport'+VNUM+'_mayaeggimport.obj')
     TargetAdd('mayaeggimport'+VNUM+'.mll', input='libpandaegg.dll')
     TargetAdd('mayaeggimport'+VNUM+'.mll', input=COMMON_PANDA_LIBS)
-    TargetAdd('mayaeggimport'+VNUM+'.mll', input='libp3pystub.dll')
+    if sys.platform == "win32":
+      TargetAdd('mayaeggimport'+VNUM+'.mll', input='libp3pystub.dll')
     TargetAdd('mayaeggimport'+VNUM+'.mll', opts=['ADVAPI', VER])
 
     TargetAdd('mayaloader'+VNUM+'_config_mayaloader.obj', opts=OPTS, input='config_mayaloader.cxx')
@@ -3196,21 +3197,30 @@ for VER in MAYAVERSIONS:
     TargetAdd('libmayapview'+VNUM+'.mll', input='libmayaegg'+VNUM+'.lib')
     TargetAdd('libmayapview'+VNUM+'.mll', input='libmaya'+VNUM+'.lib')
     TargetAdd('libmayapview'+VNUM+'.mll', input='libp3framework.dll')
-    TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS_PYSTUB)
+    if sys.platform == "win32":
+      TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS_PYSTUB)
+    else:
+      TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS)
     TargetAdd('libmayapview'+VNUM+'.mll', opts=['ADVAPI', VER])
     
     TargetAdd('maya2egg'+VNUM+'_mayaToEgg.obj', opts=OPTS, input='mayaToEgg.cxx')
     TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='maya2egg'+VNUM+'_mayaToEgg.obj')
     TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='libmayaegg'+VNUM+'.lib')
     TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='libmaya'+VNUM+'.lib')
-    TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
+    if sys.platform == "win32":
+      TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
+    else:
+      TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS)
     TargetAdd('maya2egg'+VNUM+'-wrapped.exe', opts=['ADVAPI', VER])
     
     TargetAdd('mayacopy'+VNUM+'_mayaCopy.obj', opts=OPTS, input='mayaCopy.cxx')
     TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='mayacopy'+VNUM+'_mayaCopy.obj')
     TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='libcvscopy.lib')
     TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='libmaya'+VNUM+'.lib')
-    TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
+    if sys.platform == "win32":
+      TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
+    else:
+      TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS)
     TargetAdd('mayacopy'+VNUM+'-wrapped.exe', opts=['ADVAPI', VER])
     
     TargetAdd('mayasavepview'+VNUM+'_mayaSavePview.obj', opts=OPTS, input='mayaSavePview.cxx')

+ 7 - 1
pandatool/src/mayaprogs/eggToMaya.cxx

@@ -15,7 +15,9 @@
 #include "eggToMaya.h"
 #include "mayaEggLoader.h"
 #include "mayaApi.h"
-#include "pystub.h"
+#ifdef _WIN32
+  #include "pystub.h"
+#endif
 
 // We must define this to prevent Maya from doubly-declaring its
 // MApiVersion string in this file as well as in libmayaegg.
@@ -120,11 +122,15 @@ run() {
 }
 
 int main(int argc, char *argv[]) {
+  // We don't want pystub on linux, since it gives problems with Maya's python.
+#ifdef _WIN32
   // A call to pystub() to force libpystub.so to be linked in.
   pystub();
+#endif
 
   EggToMaya prog;
   prog.parse_command_line(argc, argv);
   prog.run();
   return 0;
 }
+

+ 7 - 1
pandatool/src/mayaprogs/mayaCopy.cxx

@@ -17,7 +17,9 @@
 #include "cvsSourceDirectory.h"
 #include "mayaShader.h"
 #include "dcast.h"
-#include "pystub.h"
+#ifdef _WIN32
+  #include "pystub.h"
+#endif
 
 #include "pre_maya_include.h"
 #include <maya/MStringArray.h>
@@ -463,11 +465,15 @@ collect_shader_for_node(const MDagPath &dag_path) {
 
 
 int main(int argc, char *argv[]) {
+  // We don't want pystub on linux, since it gives problems with Maya's python.
+#ifdef _WIN32
   // A call to pystub() to force libpystub.so to be linked in.
   pystub();
+#endif
 
   MayaCopy prog;
   prog.parse_command_line(argc, argv);
   prog.run();
   return 0;
 }
+