def process(self):
        from maya import cmds

        renderlayer = cmds.editRenderLayerGlobals(query=True,
                                                  currentRenderLayer=True)
        self.data["renderlayer"] = renderlayer
        return put_instance_icon(super(LookCreator, self).process())
示例#2
0
    def process(self):
        variant = None

        for var in self.defaults:
            prefix = "xgen" + var
            if self.data["subset"].lower().startswith(prefix):
                variant = var
                break

        if variant is None:
            msg = error__invalid_name.format(self.data["subset"],
                                             ", ".join(self.defaults))
            message_box_error("Invalid Subset Name", msg)
            raise RuntimeError(msg)

        self.data["XGenType"] = variant

        if variant == "legacy":
            self.data["step"] = [
                legacy.SHAPING,
                legacy.BAKED,
                legacy.WIRED,
            ]

        instance = super(XGenCreator, self).process()

        cmds.setAttr(instance + ".XGenType", lock=True)

        return put_instance_icon(instance)
示例#3
0
    def process(self):
        self.data["bakeStep"] = 1.0
        # Apply Euler filter to rotations for Alembic
        self.data["eulerFilter"] = False

        self.data["deadlinePriority"] = 80
        self.data["deadlinePool"] = lib.get_deadline_pools()

        return put_instance_icon(super(CameraCreator, self).process())
示例#4
0
    def process(self):
        import maya.cmds as cmds

        scene_start = cmds.playbackOptions(query=True, minTime=True)
        scene_end = cmds.playbackOptions(query=True, maxTime=True)

        self.data["useCustomRange"] = False
        self.data["startFrame"] = scene_start
        self.data["endFrame"] = scene_end

        return put_instance_icon(super(AtomsCrowdCreator, self).process())
示例#5
0
    def process(self):

        # (NOTE) objectSet's 'motionBlur' attribute can affect object's
        #        motionBlur state in Arnold.

        self.data["staticCache"] = True

        self.data["deadlinePriority"] = 80
        self.data["deadlinePool"] = lib.get_deadline_pools()

        return put_instance_icon(super(ArnoldStandInCreator, self).process())
示例#6
0
    def process(self):
        from maya import cmds

        # Build pipeline render settings

        project = avalon.io.find_one({"type": "project"},
                                     projection={"data": True})
        deadline = project["data"]["deadline"]["maya"]
        variant = None

        for var in self.defaults:
            prefix = "imgseq" + var
            if self.data["subset"].lower().startswith(prefix):
                priority = deadline["priorities"][var]
                variant = var
                break

        if variant is None:
            msg = error__invalid_name.format(self.data["subset"],
                                             ", ".join(self.defaults))
            message_box_error("Invalid Subset Name", msg)
            raise RuntimeError(msg)

        # Return if existed
        instance = lib.lsAttrs({
            "id": avalon_instance_id,
            "family": self.family,
            "subset": self.data["subset"],
            "renderType": variant
        })
        if instance:
            self.log.warning("Already existed.")
            return instance[0]

        self.data["deadlineEnable"] = False
        self.data["deadlinePriority"] = priority
        self.data["deadlinePool"] = ["none"] + deadline["pool"]
        self.data["deadlineGroup"] = deadline["group"]
        self.data["deadlineFramesPerTask"] = 1
        self.data["renderType"] = variant
        self.data["publishOrder"] = 999

        instance = super(RenderCreator, self).process()

        # (TODO) Currently, force using Deadline to render
        if variant == "render":
            cmds.setAttr(instance + ".deadlineEnable", True, lock=True)

        return put_instance_icon(instance)
示例#7
0
    def process(self):
        from maya import cmds

        # Return if existed
        exists = cmds.ls("renderglobalsDefault")
        assert len(exists) <= 1, (
            "More than one renderglobal exists, this is a bug")

        if exists:
            instance = exists[0]
            cmds.warning("%s already exists." % instance)
        else:
            instance = put_instance_icon(super(RenderCreator, self).process())

        return instance
    def process(self):

        # (NOTE) objectSet's 'motionBlur' attribute can affect object's
        #        motionBlur state in Arnold.

        self.data["staticCache"] = True

        project = avalon.io.find_one({"type": "project"},
                                     projection={"data": True})
        deadline = project["data"]["deadline"]["maya"]
        priority = deadline["priorities"]["pointcache"]

        self.data["deadlinePriority"] = priority
        self.data["deadlinePool"] = ["none"] + deadline["pool"]

        return put_instance_icon(super(ArnoldStandInCreator, self).process())
示例#9
0
    def process(self):
        # Build pipeline render settings

        self.data["exportAlembic"] = True
        self.data["exportGPUCache"] = False
        self.data["exportFBXCache"] = False

        self.data["staticCache"] = False
        self.data["isDummy"] = False

        self.data["deadlinePriority"] = 80
        self.data["deadlinePool"] = lib.get_deadline_pools()

        # Apply Euler filter to rotations for Alembic
        self.data["eulerFilter"] = True

        return put_instance_icon(super(PointCacheCreator, self).process())
示例#10
0
    def process(self):
        self.build_base()

        instance = super(RigCreator, self).process()
        self.log.info("Creating Rig instance set up ...")

        for attr in TRANSFORM_ATTRS:
            cmds.setAttr("|ROOT." + attr, keyable=False)
        cmds.setAttr("|ROOT.visibility", keyable=False)

        sub_object_sets = ["OutSet", "ControlSet"]

        for set_name in sub_object_sets:
            cmds.sets(cmds.sets(name=set_name, empty=True),
                      forceElement=instance)

        return put_instance_icon(instance)
示例#11
0
    def process(self):
        # Build pipeline render settings

        project = avalon.io.find_one({"type": "project"},
                                     projection={"data": True})
        pipeline = project["data"]["pipeline"]["maya"]
        deadline = project["data"]["deadline"]["maya"]

        cache_type = pipeline["pointcache"]
        priority = deadline["priorities"]["pointcache"]

        self.data["extractType"] = cache_type[:]

        self.data["staticCache"] = False

        self.data["deadlineEnable"] = False
        self.data["deadlinePriority"] = priority
        self.data["deadlinePool"] = ["none"] + deadline["pool"]
        self.data["deadlineGroup"] = deadline["group"]

        return put_instance_icon(super(PointCacheCreator, self).process())
示例#12
0
    def process(self):
        # Build pipeline render settings

        project = avalon.io.find_one({"type": "project"},
                                     projection={"data": True})
        pipeline = project["data"]["pipeline"]["maya"]
        deadline = project["data"]["deadline"]["maya"]

        cache_type = pipeline["pointcache"]
        priority = deadline["priorities"]["pointcache"]

        self.data["extractType"] = cache_type[:]

        self.data["staticCache"] = False
        self.data["isDummy"] = False

        self.data["deadlinePriority"] = priority
        self.data["deadlinePool"] = ["none"] + deadline["pool"]

        # Apply Euler filter to rotations for Alembic
        self.data["eulerFilter"] = False

        return put_instance_icon(super(PointCacheCreator, self).process())
示例#13
0
 def process(self):
     self.data["bakeStep"] = 1.0
     return put_instance_icon(super(CameraCreator, self).process())
示例#14
0
    def process(self):
        self.data["bakeStep"] = 1.0
        # Apply Euler filter to rotations for Alembic
        self.data["eulerFilter"] = False

        return put_instance_icon(super(CameraCreator, self).process())
示例#15
0
 def process(self):
     return put_instance_icon(super(AtomsCrowdCreator, self).process())
    def process(self):

        self.data["staticCache"] = True

        return put_instance_icon(super(ArnoldStandInCreator, self).process())
示例#17
0
 def process(self):
     return put_instance_icon(super(MayaShareCreator, self).process())
 def process(self):
     return put_instance_icon(super(SetDressCreator, self).process())
 def process(self):
     return put_instance_icon(super(LightSetCreator, self).process())
 def process(self):
     return put_instance_icon(super(AnimationCreator, self).process())
示例#21
0
    def process(self):

        self.build_base()

        return put_instance_icon(super(ModelCreator, self).process())