Browse Source

makepanda: enable Assimp in default Confauto.prc if built

rdb 7 years ago
parent
commit
a9ff8a22f0
2 changed files with 8 additions and 0 deletions
  1. 5 0
      makepanda/confauto.in
  2. 3 0
      makepanda/makepanda.py

+ 5 - 0
makepanda/confauto.in

@@ -21,6 +21,11 @@
 
 load-file-type egg pandaegg
 
+# If we built with Assimp support, we can enable the Assimp loader,
+# which allows us to load many model formats natively.
+
+load-file-type p3assimp
+
 # These entries work very similar to load-file-type, except they are
 # used by the MovieVideo and MovieAudio code to determine which module
 # should be loaded in order to decode files of the given extension.

+ 3 - 0
makepanda/makepanda.py

@@ -2882,6 +2882,9 @@ else:
     # otherwise, disable it.
     confautoprc = confautoprc.replace('#st#', '#')
 
+if PkgSkip("ASSIMP"):
+    confautoprc = confautoprc.replace("load-file-type p3assimp", "#load-file-type p3assimp")
+
 if (os.path.isfile("makepanda/myconfig.in")):
     configprc = ReadFile("makepanda/myconfig.in")
 else: