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`.
This commit is contained in:
Sybren A. Stüvel 2019-12-17 17:00:08 +01:00
parent a601f54ba2
commit 5f79e0d8f7
1 changed files with 5 additions and 0 deletions

View File

@ -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