Little by little I am making progress, slowly but surely.
At the moment of importing the skinpack file it fails to load with the following code…
import os
import mgear.shifter.custom_step as cstp
from mgear.core import skin
import pymel.core as pm
class CustomShifterStep(cstp.customShifterMainStep):
def __init__(self):
self.name = "import_skinPack"
def run(self, stepDict):
"""
Run method.
i.e: stepDict["mgearRun"].global_ctl gets the global_ctl from
shifter rig on post step
i.e: stepDict["otherCustomStepName"].ctlMesh gets the ctlMesh
from a previous custom step called "otherCustomStepName"
Arguments:
stepDict (dict): Dictionary containing the objects from
the previous steps
Returns:
None: None
"""
path = "\\".join(os.path.abspath(os.path.dirname(__file__)).split("\\")[:-2])
skin.importSkinPack(os.path.join(path, "data", "skin", skin.gSkinPack()))
instead with this simple code it loads it perfectly into the skin.
import os
import mgear.shifter.custom_step as cstp
from mgear.core import skin
import pymel.core as pm
skinpath = os.path.abspath("C:/Users/darwi/Documents/Mgear/Rigging/build/data/skin/skin.gSkinPack")
skin.importSkinPack(skinpath)
The error code of the first script is as follows
= POST CUSTOM STEPS ==============================================
// EXEC: Executing custom step: scripts\post\gimmick_blended_joints.py //
// SUCCEED: Custom Shifter Step Class: scripts\post\gimmick_blended_joints.py. Succeed!! //
// EXEC: Executing custom step: scripts\post\import_skinPack.py //
// Error: An exception of type AttributeError occurred. //
// Error: Traceback (most recent call last):
File "C:\Users\darwi\Documents\maya\modules\scripts\mgear\shifter\guide.py", line 1253, in runStep
cs.run(customStepDic)
File "C:\Users\darwi\Documents\Mgear\Rigging\build\scripts\post\import_skinPack.py", line 27, in run
skin.importSkinPack(os.path.join(path, "data", "skin", skin.gSkinPack()))
AttributeError: 'module' object has no attribute 'gSkinPack'
I would like to understand what is going on, just out of curiosity.
def __init__(self):
self.name = “import_skinPack”.
Maybe it’s this part… but I don’t know for sure.
Greetings and thank you very much