Home Website Youtube GitHub

Help compiling mGear dist

I could really use some help learning how to compile plugins. I have used cMake before, so I know a little about compiling. I want to learn how to compile the mGear solvers, so I can include the spring collision work here → Mgear springnode gravity

I finally have the correct version of visual studio redistrib installed. I also installed VS Community 2017, and made sure to include the C++ compiler options during the install. I installed scons using the pip installer. And I downloaded excons and included it in the mgear dist folder - C:\mgear_dist-3.7.9\excons. I’ve edited the buildAll.bat file included with the mGear dist to read:
C:\Python27\Scripts\scons.bat -j8 no-cache=1 with-maya=2020 with-mayadevkit=“C:\Program Files\Autodesk\Maya2020\devkit” mscver=14.1

I am using the native tools command prompt to run buildAll.bat. As well as just running the scons line directly. I’ve been able to work through several errors. But now I am stuck. I could use any help I can get. Thanks!

C:\mgear_dist-3.7.9>buildAll.bat
scons: Reading SConscript files …
Using msvc 14.1
[excons] Install ‘colorama’ python module for colored output (‘pip install colorama’).
Invalid ‘install’ item: [‘vendor/QJsonModel/qjsonmodel.py’]
Invalid ‘install’ item: [‘Qtdotpy/Qt.py’]
Invalid ‘install’ item: [‘framework/scripts/mgear/vendor/init.py’]

I’ve tried copying the missing files qjsonmodel.py & Qt.py from my current working mGear installation, to the new dist folder. But I am still getting this error.

hi izze,

dont quite understand what you are after…
do you want to compile the above solvers (with gravity+collision) in vs 2017?
if so you can download my vs-project here mgear-solvers-src-soulcage and replace the springNode.cpp from aeyrs github-link…
in my vs-project the dependencies (maya sdk) are hardcoded, so you have to point to yours…

Hey thanks! I’m looking to learn how to compile the mgear solvers, from the source files. I’m learning, so bare with me.

The thread you linked to, has two downloads.
One is mgear_src_soulcage.rar,
The other is mgear_2.5.24_soulcage.rar.

So you take the cpp files (first rar), and compile them to usable Maya plugins (second rar).

I am trying to do this as well. Using scons, and the SConstruct file supplied in the mGear distribution download. (https://github.com/mgear-dev/mgear_dist/archive/refs/tags/3.7.9.zip)

sorry…had problems with the upload…
try the link again (maybe refresh this site in your browser)
or this mgear-solvers-src-soulcage

so if you open the .sln from my zip and point the maya sdk dependencies in the project options under c++ and linker, then you should be able to build the solvers…

the new springnode then contains some extra inputs (gravity+collision). you have also to modify the component script (chain_spring_01), so mgear can make this connections to the “new” springnode…(therefor i provided also the mgear scripts in this link http://www.soulcage-department.de/mgear_2.5.24_soulcage.rar)

Okay, this is starting to make a little sense. Thank you so much for the help!

So I will now abandon scons, and move to VS. Now getting new errors when trying to build. But I think I will be able to start working through them. If I have any questions, I hope you are available for further query.

The component portion makes perfect sense. I started modifying some components of my own. So I will be able to get in there and see what you changed, and understand it properly.

Okay. Diving into VS now. Thank you very much!

yeah, good luck…
its a bit of trial and error…i had once the problem that the builded solver wont load in maya, then i found out that i used a wrong win sdk in vs…so if you run in same problem try 10.0.14393

Yes, that is my first error :slight_smile:

I tried installing the version that comes with vs 2017 community. 10.0.17xxx, assuming it would work as it is above 10.0.14. But to no avail. Feels like I spent the whole day trying to track down specific versions of VS, and Scons, and excons, and vs redsitrib. It’s exhausting.

on which version of maya are you?
for maya 2018-2020, i compile the solvers with vs2015-desktop (former express) and the win sdk 10.0.14393

i think maya is there a bit picky about vs versions (compiler)

here a thread where i also asked compiling in vs2017