Skip to content
Snippets Groups Projects
Commit bb587e5b authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Pose Library: transparently handle removal of experimental flag

Add code to deal with the future removal of the experimental flag
`context.preferences.experimental.use_asset_browser`.

If the `use_asset_browser` attribute is no longer there, allow the pose
library UI elements to be shown.
parent 78107f78
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,12 @@ class VIEW3D_PT_pose_library(Panel):
@classmethod
def poll(cls, context: Context) -> bool:
return context.preferences.experimental.use_asset_browser
exp_prefs = context.preferences.experimental
try:
return exp_prefs.use_asset_browser
except AttributeError:
# The 'use_asset_browser' experimental option was removed from Blender.
return True
def draw(self, context: Context) -> None:
layout = self.layout
......@@ -172,7 +177,12 @@ class DOPESHEET_PT_asset_panel(Panel):
@classmethod
def poll(cls, context: Context) -> bool:
return context.preferences.experimental.use_asset_browser
exp_prefs = context.preferences.experimental
try:
return exp_prefs.use_asset_browser
except AttributeError:
# The 'use_asset_browser' experimental option was removed from Blender.
return True
def draw(self, context: Context) -> None:
layout = self.layout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment