ya2 · news · projects · code · about

side panel
[pmachines.git] / pmachines / pmachines.py
index 7e309e5adef96eb1fbd1bfb249403ad6e6c4706e..fdd1fa097b25c96f3ca5e00357fe811065c59b29 100755 (executable)
@@ -65,6 +65,7 @@ class Pmachines:
             'settings': {
                 'volume': 1},
             'development': {
             'settings': {
                 'volume': 1},
             'development': {
+                'simplepbr': 1,
                 'verbose_log': 0,
                 'physics_debug': 0}}
         opt_path = LibP3d.fixpath(data_path + '/' + optfile) if data_path else optfile
                 'verbose_log': 0,
                 'physics_debug': 0}}
         opt_path = LibP3d.fixpath(data_path + '/' + optfile) if data_path else optfile
@@ -75,11 +76,12 @@ class Pmachines:
         if not opt_exists:
             self._options.store()
         gltf.patch_loader(base.loader)
         if not opt_exists:
             self._options.store()
         gltf.patch_loader(base.loader)
-        pipeline = simplepbr.init(
-            use_normal_maps=True,
-            use_emission_maps=False,
-            use_occlusion_maps=True,
-            msaa_samples=4)
+        if self._options['development']['simplepbr']:
+            pipeline = simplepbr.init(
+                use_normal_maps=True,
+                use_emission_maps=False,
+                use_occlusion_maps=True
+            )
         render.setAntialias(AntialiasAttrib.MAuto)
         self.base.set_background_color(0, 0, 0, 1)
         self.base.disable_mouse()
         render.setAntialias(AntialiasAttrib.MAuto)
         self.base.set_background_color(0, 0, 0, 1)
         self.base.disable_mouse()