Home Website Youtube GitHub

Tutorial for Building Custom Modules in Shifter?

Hi Miquel,

Firstly, I want to thank you for such an awesome tool as it is vital for making my project a reality.
I’ve purchased all the tutorials from Gumroad and appreciate them very much as they have helped me a ton.

I want to push my rigs a bit further and I realize that scripting is a necessary aspect of the mGear environment. I am wondering if, like the previous tutorials on Gumroad, you would be willing to make a series on how to make custom modules for Shifter? I’d be more than happy to pay for such a series if you consider it.

Thanks!

Also, just as a side note, I think it would be a great idea if mGear had a discord server so we can ask questions and share progress in real-time with those in the community. I would like to think that it would be beneficial for everyone involved.

2 Likes

A tutorial would be nice. In the meantime, what I did and what I recommend is to take some existing components, copy them into a custom component directory, rename them, and then edit them. It’s a good first step and you’ll learn the basic flow of how they work from guide to built rig.

That said, I didn’t get very far, and I still couldn’t write one from scratch. I rely more on post python scripts.

1 Like

I share the same sentiment with Chris. While more documentation would be amazing, that documentation can come not only from Miquel and the team but from any user that decides to experiment with this. You might find several threads regarding this subject, where folks share their modules (that might end up in the main branch). I’ve been adding some features to our mGear-based rig using Python modules on top of an already built rig rather than extending the Shifter modules. At some point I would like to look into it.

Regarding the Discord server, and please note that this is just an opinion, I’m strongly opposed to it as a way of managing data. Mainly to avoid fragmentation of information. The beauty of the forum is that is a gold mine, the information is very well organized and it’s relatively easy finding if someone had the same issues/questions you have. Finding information in a place like Slack/Discord is, compared to a forum, a nightmare in my opinion.

In addition to that, I found the team and the community to be very responsive and in a very timely manner here in the forum. A chat format enables a sense of ‘urgency’, both from the person that asks the question and those who might jump to answer it. I assume everyone here is more or less busy with their day to day job, so to me it is far from an ideal format. Someone explains it really well here:

I am aware this is a bit of confirmation bias self-exercise, and while I’m not an active part of the mGear development team nor the forum, I’ve seen several communities ‘die’ because moving to other platforms where the real time interaction is favored. Good for solving individual problems, bad for letting users be aware of those, hence the same basic questions being repeated over and over and over. Facebook Groups, I’m looking at you :slight_smile:

Sorry for the rant!

5 Likes

I agree with Iker, I’m against the idea of moving to chat, or splitting the community by having both. I’m on another forum where there is a Discord community. The forum is luckily still vibrant, but there is a ton of activity in the Discord, and it all gets lost in the noise. They needs bots just to answer questions that people keep asking over and over. It’s fun to hang out sometimes, but it isn’t good for building a store of knowledge.

(You certainly are. You’re one of the most active this year, you’ve given good tips and unearthed good bugs!)

4 Likes

I agree with Chris, I think the best way is to copy one component and edit them.

Maybe this video can help you to start.

1 Like

I think the issue with just copy/pasting a module. From what I read from other users on this forum, is that you’re going in without much of an idea or context as to what each class does or what is being called and why. I’m seeing a lot of folks making python scripts to build things over top mGear rather then being integrated as a custom module.

The idea, or so I thought was to improve on what was already here or make custom things to suit pipeline needs. Others have done it and provided their custom modules but the issue remains. Without some kind of effort to document and tutorialize on what the mGear core classes do, what each function is is trying to replace in Maya. Aka trying to follow the logic of how things need to be integrated into mGear. It’s just going to be a lot of work around and shooting in the dark for every person trying to integrate this into their pipeline.

I understand being opposed to discord groups, I’ve been using them since 2016 and have had good experiences in 3D servers. The idea isn’t to replace a forum but to get feedback, ask questions and directly share information on what does what. My goal was to write up documentation. Even with a forum it’s still a bit cryptic to go searching on it. I point to places like CGSociety as in someone asking the same question you have and not getting a direct answer for it.

I do also understand the issue with people having day jobs and work to attend but considering discord has reply functions that aren’t reliant on directly messaging people or @ing them it turns things into more casual conversation about what they are struggling with.

Hi dew
Actually this part of documentation exists.

http://www.mgear-framework.com/mgear_dist/framework.html

What you are probably looking for is Shifter docs. In my personal experience it is jut matter of search in code. Use Pycharm or other IDE that helps search/track inherited classes, methods and variables. Shortly you will understand how Shifter code is structured.

2 Likes

Maybe this overview video may help to start

Please ask questions or ask for feedback here and we will try to reply as best as we can :slight_smile:

Not all the forums are the same :wink:

1 Like

Ty Miquel, I’ll give that video a look. I’ve installed pycharm as well. I’ll do my best with trying to figure things out in shifter.

1 Like

check this to configure pycharm

1 Like

Thank you so much Miquel! I def need to set that up through pycharm so I can get familiarized with it.

Having issues setting up mGear in pycharm. Getting these errors when it’s trying to find calls to other parts of the code.

I set up my pycharm to read pyMel in the settings and I copied over the mGear python script componants into a new project.

I’m not sure what im doing wrong. Any help would be greatly appreciated.

I guess the environment cant find the modules. I didn’t use pycharm since some ago, so not sure how to configure now.

I don’t know if this is what you’re looking for.

1 Like

This should do the trick, it would be what I would suggest as well! :+1:

I think that did it, but for some reason it’s now not picking pymel.core

Ah I figured it out, for some reason it went back to using python 3.8 as well

Do you guys know how to get the QtWidgets and stuff to be found?

Hey guys would using Visual studio for this be a better option. I’m having issues figuring out how to highlight something in pycharm and getting it to tell me where in the mGear core things are being called from. What classes ect. Any advice before I start diving deeply into this?

Hi dew! What exactly you are trying to do?
Qt.py enables you to write software that runs on any of the 4 supported bindings - PySide2, PyQt5, PySide and PyQt4.

If you want to write code using PySide2/PyQt5 I would suggest to use Qt Classes reference. It’s more complete and logic than PyQt one.
https://doc.qt.io/archives/qt-5.9/classes.html

If you just want autocomplete for Qt.py than you should read this thread :

I’m used to scripting my own auto rig parts. I’d like to make my own spine, wing and specific body parts that aren’t included in mGear. I’m very unfamiliar with scripting using a specific custom API. I was just wondering what would be the easiest way to get into creating something custom from the ground up using mGears api. I have pyCharm installed and set up but it doesn’t work how something like visual studio does where it knows where each call and iteration comes from in the entire sourced code. What would, as a beginner to this whole system, be the best program to use to write custom modules in? Just so I can better understand logically what the shifter components are doing and how they function.