Hi guys, I’m new in mGear framework. It is just a general question. Which File can I directly edit to alter a particular module. For example. I want to to add a nurbscircle when a chain module is built, just for test purpose. Is it at all possible if so please help me get into that file
For the chain_01
component, you would edit this file.
mgear_X.X.X/release/scripts/mgear/shifter_classic_components/chain_01/__init__.py
guide.py is how you edit the guide settings. __init__.py
is where you edit the parts that build. (Usually. It’s possible some components are different.)
But if you want to make custom edits, it is usually better to copy the entire component, rename it (for example “chain_custom” or “chain_02”, and put it in a new custom folder. And set the path to that directory in your Maya.env.
MGEAR_SHIFTER_COMPONENT_PATH = /Users/YourName/yourCustomComponentFolder
Then when you upgrade mGear, you’ll still keep your changes.
Thanks Chris for your valuable reply. We have created a new shifter by copy pasting a folder and renaming it. We have figured out the way to make it work. Now we are in good place with the code edits.
However I have come across a node called the mgear_rollSplineKine. This works well only when any given points aim at each other in x axis. So I’m forced to point an object in x axis only to make this setup work. There are situations where we might need to use a different axis. Is there any way to modify this? Plus this node should have an option to add an uprotation object. I might have known lesser of mgear node function. Let me know what you think and if there is already a solution to this. Again thanks for your valuable time.
It’s a big question. I’m not familiar with that node.
If you can’t find a way to modify the axis, then you could always constrain a secondary/duplicate chain to that x-axis chain. Use your own orientation, and maintainOffset on the constraint.
Thanks for the suggestion. I will definitely try this. While I had this query I had tried just changing the up axis. Say for a leg rig, twist points aiming at x axis to each other and y facing Maya z axis flips the whole setup while z axis facing Maya front z axis works like a charm. I know this is a different aspect but I felt like this should be shared.