From 7bd5412fb0062684f65270b188ad6e2c583d9409 Mon Sep 17 00:00:00 2001 From: aardschok Date: Mon, 11 Sep 2017 12:52:12 +0200 Subject: [PATCH] fixed import issues --- colorbleed/plugins/maya/load/load_model.py | 3 +++ colorbleed/plugins/maya/load/load_rig.py | 10 +--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/colorbleed/plugins/maya/load/load_model.py b/colorbleed/plugins/maya/load/load_model.py index 6875125541..91a67b0fd6 100644 --- a/colorbleed/plugins/maya/load/load_model.py +++ b/colorbleed/plugins/maya/load/load_model.py @@ -46,6 +46,9 @@ class ModelGPUCacheLoader(api.Loader): def process(self, name, namespace, context, data): + import maya.cmds as cmds + # from avalon import maya + # todo: This will likely not be entirely safe with "containerize" # also this cannot work in the manager because it only works # on references at the moment! diff --git a/colorbleed/plugins/maya/load/load_rig.py b/colorbleed/plugins/maya/load/load_rig.py index f314468d2c..9fb0ed9981 100644 --- a/colorbleed/plugins/maya/load/load_rig.py +++ b/colorbleed/plugins/maya/load/load_rig.py @@ -52,15 +52,7 @@ class RigLoader(api.Loader): assert output, "No out_SET in rig, this is a bug." assert controls, "No controls_SET in rig, this is a bug." - # To ensure the asset under which is published is actually the shot - # not the asset to which the rig belongs to. - current_task = os.environ["AVALON_TASK"] - asset_name = context["asset"]["name"] - if current_task == "animate": - asset = "{}".format(os.environ["AVALON_ASSET"]) - else: - asset = "{}".format(asset_name) - + asset = os.environ["AVALON_ASSET"] cmds.select([output, controls], noExpand=True) with maya.maintained_selection():