Standalone C++ Program

Standalone C++ Program

dkimWHMRZ
Explorer Explorer
418 Views
0 Replies
Message 1 of 1

Standalone C++ Program

dkimWHMRZ
Explorer
Explorer

I'm in the process of converting a standalone C/C++ program to work with Maya 2023 from Maya 2019. It is supposed to search for Maya files to export into a proprietary game engine data format using a plug-in also converted to work with Maya 2023 from Maya 2019. The plug-in works and exports data fine when exporting through Maya's GUI or from the command line, but does not work from the standalone C program.

 

The C program first initializes Maya in library mode with MLibrary::initialize(), then ensures the custom plug-in is loaded by running a "loadPlugin" command. Then finally the program loads a specified file with MFileIO::open(fileName), but runs into problems from there.

 

The arnold renderer fails to load and outputs this traceback:

Error: file: /test/test_data.ma line 7: DLL load failed while importing shiboken2: The specified module could not be found.
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# File "C:\Program Files\Autodesk\Arnold\maya2023\scripts\mtoa\cmds\registerArnoldRenderer.py", line 6, in <module>
# import mtoa.utils
# File "C:\Program Files\Autodesk\Arnold\maya2023\scripts\mtoa\utils.py", line 21, in <module>
# from .ui.qt.Qt import *
# File "C:\Program Files\Autodesk\Arnold\maya2023\scripts\mtoa\ui\qt\__init__.py", line 1, in <module>
# from .utils import *
# File "C:\Program Files\Autodesk\Arnold\maya2023\scripts\mtoa\ui\qt\utils.py", line 3, in <module>
# from .Qt import __binding__ as qtBinding
# File "C:\Program Files\Autodesk\Arnold\maya2023\scripts\mtoa\ui\qt\Qt.py", line 47, in <module>
# import PySide2 as module
# File "C:\Program Files\Autodesk\Maya2023\Python\lib\site-packages\PySide2\__init__.py", line 107, in <module>
# _setupQtDirectories()
# File "C:\Program Files\Autodesk\Maya2023\Python\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories
# import shiboken2
# File "C:\Program Files\Autodesk\Maya2023\Python\lib\site-packages\shiboken2\__init__.py", line 27, in <module>
# from .shiboken2 import *
# ImportError: DLL load failed while importing shiboken2: The specified module could not be found.

 

There is also another error message (with paths removed due to its length) :

PySide2/__init__.py: Unable to import shiboken2 from ...

 

I'd imagine those are the causes that are preventing arnold from loading? I already added the following environment paths that were needed to get the program to work with Maya 2016 and 2019:

MAYA_LOCATION=C:\Program Files\Autodesk\Maya2023
PATH=%PATH%;C:\Program Files\Autodesk\Maya2023\bin;

 

Is there anything else that I'm missing that's preventing my program from working?

 

0 Likes
419 Views
0 Replies
Replies (0)