Closed xintang082 closed 1 year ago
Hi @xintang082,
we have this clash, and we are working on this issue. Current workaround is to add this snippet to your script:
ROOT_DIR = f"{ospath.dirname(ospath.abspath(__file__))}/..".replace("\\", "/")
ROOT_LIB_DIR = f"{ROOT_DIR}/lib"
if platform == "win32":
LIB_DIR = f"{ROOT_LIB_DIR}/windows"
elif platform == "linux":
LIB_DIR = f"{ROOT_LIB_DIR}/linux"
else:
raise OSError(
"OS not supported, please compile dependencies and add value to LIB_DIR"
)
# Add bin directory to maya plugin path
if "MAYA_PLUG_IN_PATH" in environ:
separator = ":" if platform == "linux" else ";"
environ["MAYA_PLUG_IN_PATH"] = separator.join([environ["MAYA_PLUG_IN_PATH"], LIB_DIR])
else:
environ["MAYA_PLUG_IN_PATH"] = LIB_DIR
# Adds directories to path
syspath.insert(0, ROOT_DIR)
syspath.insert(0, LIB_DIR)
This snippet is all of our examples.
I will close this issue. If experience similar difficulties please reopen this issue with more details.
hi when I tpyed code import dna
import sys sys.moudles["dna"]
it showed
Error: ImportError: file D:/MegaScanLibrary/support/plugins/maya/7.0/MSLiveLink/DHI/lib/Windows/python3\dna.py line 15: DLL load failed: 找不到指定的模块。
my maya version 2022
anyone knows how to fix this , many thanks