Welcome Toby,
Yes, first if you don’t know if you make a new script from the mGear GUI, it gives you some automatic boilerplate. Did you do that already?
If yes, you can access the guide like this, in the run method that has “stepDict” as one of the parameters:
myModel = stepDict['mgearRun'].model
If you didn’t create the boilerplate, just make a test script from the GUI and grab what it gives you. Or here is an excerpt of one of my scripts, with some inline comments:
import mgear
import mgear.shifter.custom_step as cstp
import pymel.core as pm
class CustomShifterStep(cstp.customShifterMainStep):
def __init__(self):
# Here I grab the rig name too and store it as a class property:
# I think there is a way to get the name from the stepDict too, but this is what I figured out first and kept using.
self.charName = pm.PyNode('guide').rig_name.get()
self.myModel = stepDict['mgearRun'].model
def run(self, stepDict):
return