fixed import issues

This commit is contained in:
aardschok 2017-09-11 12:52:12 +02:00
parent ca87224413
commit 7bd5412fb0
2 changed files with 4 additions and 9 deletions

View file

@ -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!

View file

@ -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():