[Bf-blender-cvs] [5f79e0d8f70] master: USD: Only show in experimental features when built with USD support

Sybren A. Stüvel noreply at git.blender.org
Tue Dec 17 17:00:42 CET 2019


Commit: 5f79e0d8f7090cb1b6f456924d3f8124f5965c75
Author: Sybren A. Stüvel
Date:   Tue Dec 17 17:00:08 2019 +0100
Branches: master
https://developer.blender.org/rB5f79e0d8f7090cb1b6f456924d3f8124f5965c75

USD: Only show in experimental features when built with USD support

Previously the USD Exporter was always visible in the Experimental Features
user preferences tab, even when Blender was built with `WITH_USD=OFF`.

===================================================================

M	release/scripts/startup/bl_ui/space_userpref.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 3aecd7b9775..ae77b9df01b 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2225,6 +2225,11 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel):
 class USERPREF_PT_experimental_usd(ExperimentalPanel, Panel):
     bl_label = "Universal Scene Description"
 
+    @classmethod
+    def poll(cls, context):
+        # Only show the panel if Blender was actually built with USD support.
+        return getattr(bpy.app.build_options, 'usd', False)
+
     def draw_props(self, context, layout):
         prefs = context.preferences



More information about the Bf-blender-cvs mailing list