mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge branch 'chore/houdini_remove_legacy_creator' of https://github.com/BigRoy/ayon-core into chore/houdini_remove_legacy_creator
This commit is contained in:
commit
49b12cc887
11 changed files with 13 additions and 98 deletions
|
|
@ -6,7 +6,7 @@ import logging
|
|||
import hou # noqa
|
||||
|
||||
from ayon_core.host import HostBase, IWorkfileHost, ILoadHost, IPublishHost
|
||||
|
||||
from ayon_core.tools.utils import host_tools
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core.pipeline import (
|
||||
|
|
@ -23,6 +23,7 @@ from ayon_houdini.api import lib, shelves, creator_node_shelves
|
|||
from ayon_core.lib import (
|
||||
register_event_callback,
|
||||
emit_event,
|
||||
env_value_to_bool,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -85,10 +86,9 @@ class HoudiniHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost):
|
|||
# initialization during start up delays Houdini UI by minutes
|
||||
# making it extremely slow to launch.
|
||||
hdefereval.executeDeferred(shelves.generate_shelves)
|
||||
|
||||
if not IS_HEADLESS:
|
||||
import hdefereval # noqa, hdefereval is only available in ui mode
|
||||
hdefereval.executeDeferred(creator_node_shelves.install)
|
||||
if env_value_to_bool("AYON_WORKFILE_TOOL_ON_START"):
|
||||
hdefereval.executeDeferred(lambda: host_tools.show_workfiles(parent=hou.qt.mainWindow()))
|
||||
|
||||
def workfile_has_unsaved_changes(self):
|
||||
return hou.hipFile.hasUnsavedChanges()
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Creator plugin for creating pointcache alembics."""
|
||||
from ayon_houdini.api import plugin
|
||||
from ayon_core.lib import BoolDef
|
||||
|
||||
|
||||
class CreateMantraIFD(plugin.HoudiniCreator):
|
||||
"""Mantra .ifd Archive"""
|
||||
identifier = "io.openpype.creators.houdini.mantraifd"
|
||||
label = "Mantra IFD"
|
||||
product_type = "mantraifd"
|
||||
icon = "gears"
|
||||
|
||||
def create(self, product_name, instance_data, pre_create_data):
|
||||
import hou
|
||||
instance_data.pop("active", None)
|
||||
instance_data.update({"node_type": "ifd"})
|
||||
creator_attributes = instance_data.setdefault(
|
||||
"creator_attributes", dict())
|
||||
creator_attributes["farm"] = pre_create_data["farm"]
|
||||
instance = super(CreateMantraIFD, self).create(
|
||||
product_name,
|
||||
instance_data,
|
||||
pre_create_data)
|
||||
|
||||
instance_node = hou.node(instance.get("instance_node"))
|
||||
|
||||
filepath = "{}{}".format(
|
||||
hou.text.expandString("$HIP/pyblish/"),
|
||||
"{}.$F4.ifd".format(product_name))
|
||||
parms = {
|
||||
# Render frame range
|
||||
"trange": 1,
|
||||
# Arnold ROP settings
|
||||
"soho_diskfile": filepath,
|
||||
"soho_outputmode": 1
|
||||
}
|
||||
|
||||
instance_node.setParms(parms)
|
||||
|
||||
# Lock any parameters in this list
|
||||
to_lock = ["soho_outputmode", "productType", "id"]
|
||||
self.lock_parameters(instance_node, to_lock)
|
||||
|
||||
def get_instance_attr_defs(self):
|
||||
return [
|
||||
BoolDef("farm",
|
||||
label="Submitting to Farm",
|
||||
default=False)
|
||||
]
|
||||
|
||||
def get_pre_create_attr_defs(self):
|
||||
attrs = super().get_pre_create_attr_defs()
|
||||
# Use same attributes as for instance attributes
|
||||
return attrs + self.get_instance_attr_defs()
|
||||
|
|
@ -12,9 +12,7 @@ class CollectDataforCache(plugin.HoudiniInstancePlugin):
|
|||
|
||||
# Run after Collect Frames
|
||||
order = pyblish.api.CollectorOrder + 0.11
|
||||
families = ["ass", "pointcache",
|
||||
"mantraifd", "redshiftproxy",
|
||||
"vdbcache", "model"]
|
||||
families = ["ass", "pointcache", "redshiftproxy", "vdbcache", "model"]
|
||||
targets = ["local", "remote"]
|
||||
label = "Collect Data for Cache"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ class CollectChunkSize(plugin.HoudiniInstancePlugin,
|
|||
"""Collect chunk size for cache submission to Deadline."""
|
||||
|
||||
order = pyblish.api.CollectorOrder + 0.05
|
||||
families = ["ass", "pointcache",
|
||||
"vdbcache", "mantraifd",
|
||||
"redshiftproxy", "model"]
|
||||
families = ["ass", "pointcache", "vdbcache", "redshiftproxy", "model"]
|
||||
targets = ["local", "remote"]
|
||||
label = "Collect Chunk Size"
|
||||
chunk_size = 999999
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class CollectFrames(plugin.HoudiniInstancePlugin):
|
|||
# this plugin runs after CollectRopFrameRange
|
||||
order = pyblish.api.CollectorOrder + 0.1
|
||||
label = "Collect Frames"
|
||||
families = ["camera", "vdbcache", "imagesequence", "ass", "mantraifd",
|
||||
families = ["camera", "vdbcache", "imagesequence", "ass",
|
||||
"redshiftproxy", "review", "pointcache", "fbx"]
|
||||
|
||||
def process(self, instance):
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ class CreatePluginsModel(BaseSettingsModel):
|
|||
CreateKarmaROP: CreatorModel = SettingsField(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Karma ROP")
|
||||
CreateMantraIFD: CreatorModel = SettingsField(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Mantra IFD")
|
||||
CreateMantraROP: CreatorModel = SettingsField(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Mantra ROP")
|
||||
|
|
@ -119,10 +116,6 @@ DEFAULT_HOUDINI_CREATE_SETTINGS = {
|
|||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateMantraIFD": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateMantraROP": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ from .pipeline import (
|
|||
MayaHost,
|
||||
)
|
||||
from .plugin import (
|
||||
Creator,
|
||||
Loader
|
||||
)
|
||||
|
||||
|
|
@ -45,7 +44,6 @@ __all__ = [
|
|||
"containerise",
|
||||
"MayaHost",
|
||||
|
||||
"Creator",
|
||||
"Loader",
|
||||
|
||||
# Workfiles API
|
||||
|
|
|
|||
|
|
@ -1733,7 +1733,7 @@ def is_valid_reference_node(reference_node):
|
|||
"""
|
||||
# maya 2022 is missing `isValidReference` so the check needs to be
|
||||
# done in different way.
|
||||
if cmds.about(version=True) < 2023:
|
||||
if int(cmds.about(version=True)) < 2023:
|
||||
try:
|
||||
cmds.referenceQuery(reference_node, filename=True)
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -15,10 +15,9 @@ from ayon_core.pipeline import (
|
|||
Anatomy,
|
||||
AutoCreator,
|
||||
CreatedInstance,
|
||||
Creator as NewCreator,
|
||||
Creator,
|
||||
CreatorError,
|
||||
HiddenCreator,
|
||||
LegacyCreator,
|
||||
LoaderPlugin,
|
||||
get_current_project_name,
|
||||
get_representation_path,
|
||||
|
|
@ -70,22 +69,6 @@ def get_reference_node_parents(*args, **kwargs):
|
|||
return lib.get_reference_node_parents(*args, **kwargs)
|
||||
|
||||
|
||||
class Creator(LegacyCreator):
|
||||
defaults = ['Main']
|
||||
|
||||
def process(self):
|
||||
nodes = list()
|
||||
|
||||
with lib.undo_chunk():
|
||||
if (self.options or {}).get("useSelection"):
|
||||
nodes = cmds.ls(selection=True)
|
||||
|
||||
instance = cmds.sets(nodes, name=self.name)
|
||||
lib.imprint(instance, self.data)
|
||||
|
||||
return instance
|
||||
|
||||
|
||||
@six.add_metaclass(ABCMeta)
|
||||
class MayaCreatorBase(object):
|
||||
|
||||
|
|
@ -274,7 +257,7 @@ class MayaCreatorBase(object):
|
|||
|
||||
|
||||
@six.add_metaclass(ABCMeta)
|
||||
class MayaCreator(NewCreator, MayaCreatorBase):
|
||||
class MayaCreator(Creator, MayaCreatorBase):
|
||||
|
||||
settings_category = "maya"
|
||||
|
||||
|
|
@ -381,7 +364,7 @@ def ensure_namespace(namespace):
|
|||
return cmds.namespace(add=namespace)
|
||||
|
||||
|
||||
class RenderlayerCreator(NewCreator, MayaCreatorBase):
|
||||
class RenderlayerCreator(Creator, MayaCreatorBase):
|
||||
"""Creator which creates an instance per renderlayer in the workfile.
|
||||
|
||||
Create and manages renderlayer product per renderLayer in workfile.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring AYON addon 'maya' version."""
|
||||
__version__ = "0.2.4"
|
||||
__version__ = "0.2.6"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name = "maya"
|
||||
title = "Maya"
|
||||
version = "0.2.4"
|
||||
version = "0.2.6"
|
||||
client_dir = "ayon_maya"
|
||||
|
||||
ayon_required_addons = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue