-
I have a script that has both options to run with real I used to just Any ideas of some handy way to distinguish between fake |
Beta Was this translation helpful? Give feedback.
Answered by
Andrej730
Jul 22, 2024
Replies: 1 comment
-
This snippet seems to work: try:
import bpy
# Ensure it's not fake-bpy-module.
if not hasattr(bpy, "context"):
raise ModuleNotFoundError
BPY_IS_LOADED = True
except ModuleNotFoundError:
BPY_IS_LOADED = False |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Andrej730
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This snippet seems to work: