From acd695060b43ba62cde46a5e8165a702ab211597 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Wed, 17 Mar 2021 15:22:33 -0400 Subject: [PATCH] Disable 3D-only modules when 3D is disabled --- modules/bullet/config.py | 1 + modules/csg/config.py | 2 +- modules/gridmap/config.py | 2 +- modules/meshoptimizer/config.py | 2 +- modules/mobile_vr/config.py | 2 +- modules/vhacd/config.py | 2 +- modules/webxr/config.py | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/bullet/config.py b/modules/bullet/config.py index be7cf74f6ff..83605f1f9b8 100644 --- a/modules/bullet/config.py +++ b/modules/bullet/config.py @@ -1,6 +1,7 @@ def can_build(env, platform): # API Changed and bullet is disabled at the moment return False + # Later change to return not env["disable_3d"] def configure(env): diff --git a/modules/csg/config.py b/modules/csg/config.py index 9106cbceca1..3991b846f96 100644 --- a/modules/csg/config.py +++ b/modules/csg/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return not env["disable_3d"] def configure(env): diff --git a/modules/gridmap/config.py b/modules/gridmap/config.py index a6319fe1ea0..720401b92d8 100644 --- a/modules/gridmap/config.py +++ b/modules/gridmap/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return not env["disable_3d"] def configure(env): diff --git a/modules/meshoptimizer/config.py b/modules/meshoptimizer/config.py index 82e4e43397c..b7e69569b9c 100644 --- a/modules/meshoptimizer/config.py +++ b/modules/meshoptimizer/config.py @@ -1,6 +1,6 @@ def can_build(env, platform): # Having this on release by default, it's small and a lot of users like to do procedural stuff - return True + return not env["disable_3d"] def configure(env): diff --git a/modules/mobile_vr/config.py b/modules/mobile_vr/config.py index ee401c1a2a0..f6b64fb690b 100644 --- a/modules/mobile_vr/config.py +++ b/modules/mobile_vr/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return not env["disable_3d"] def configure(env): diff --git a/modules/vhacd/config.py b/modules/vhacd/config.py index d22f9454ed2..a42f27fbe12 100644 --- a/modules/vhacd/config.py +++ b/modules/vhacd/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return not env["disable_3d"] def configure(env): diff --git a/modules/webxr/config.py b/modules/webxr/config.py index 9efebed4e67..f676ef3483a 100644 --- a/modules/webxr/config.py +++ b/modules/webxr/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return not env["disable_3d"] def configure(env):