mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
restored unrelated code
This commit is contained in:
parent
bd08219a41
commit
87df73da22
12 changed files with 35 additions and 58 deletions
|
|
@ -242,20 +242,3 @@ def get_previous_loaded_object(container: str):
|
|||
if str(obj) in sel_list:
|
||||
node_list.append(obj)
|
||||
return node_list
|
||||
|
||||
|
||||
def remove_container_data(container: str):
|
||||
"""Function to remove container data after updating, switching or deleting it.
|
||||
|
||||
Args:
|
||||
container (str): container
|
||||
"""
|
||||
if container.modifiers[0].name == "OP Data":
|
||||
all_set_members_names = [
|
||||
member.node for member
|
||||
in container.modifiers[0].openPypeData.all_handles]
|
||||
for current_set_member in all_set_members_names:
|
||||
rt.Delete(current_set_member)
|
||||
rt.deleteModifier(container, container.modifiers[0])
|
||||
|
||||
rt.Delete(container)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
|
||||
from ayon_core.hosts.max.api import lib
|
||||
from ayon_core.hosts.max.api import lib, maintained_selection
|
||||
from ayon_core.hosts.max.api.lib import (
|
||||
unique_namespace,
|
||||
get_namespace,
|
||||
|
|
@ -9,8 +9,7 @@ from ayon_core.hosts.max.api.lib import (
|
|||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
update_custom_attribute_data
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path, load
|
||||
|
||||
|
|
@ -95,5 +94,6 @@ class FbxLoader(load.LoaderPlugin):
|
|||
|
||||
def remove(self, container):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
|
|
@ -7,10 +7,8 @@ from ayon_core.hosts.max.api.lib import (
|
|||
object_transform_set
|
||||
)
|
||||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
containerise, get_previous_loaded_object,
|
||||
update_custom_attribute_data
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path, load
|
||||
|
||||
|
|
@ -95,5 +93,6 @@ class MaxSceneLoader(load.LoaderPlugin):
|
|||
|
||||
def remove(self, container):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@ import os
|
|||
from ayon_core.pipeline import load, get_representation_path
|
||||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
remove_container_data
|
||||
get_previous_loaded_object
|
||||
)
|
||||
from ayon_core.hosts.max.api import lib
|
||||
from ayon_core.hosts.max.api.lib import (
|
||||
maintained_selection,
|
||||
unique_namespace
|
||||
maintained_selection, unique_namespace
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -101,7 +99,7 @@ class ModelAbcLoader(load.LoaderPlugin):
|
|||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
||||
@staticmethod
|
||||
def get_container_children(parent, type_name):
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import os
|
||||
from ayon_core.pipeline import load, get_representation_path
|
||||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
containerise, get_previous_loaded_object,
|
||||
update_custom_attribute_data
|
||||
)
|
||||
from ayon_core.hosts.max.api import lib
|
||||
from ayon_core.hosts.max.api.lib import (
|
||||
|
|
@ -94,5 +92,6 @@ class FbxModelLoader(load.LoaderPlugin):
|
|||
|
||||
def remove(self, container):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ from ayon_core.hosts.max.api.lib import maintained_selection
|
|||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
update_custom_attribute_data
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path, load
|
||||
|
||||
|
|
@ -85,5 +84,6 @@ class ObjLoader(load.LoaderPlugin):
|
|||
|
||||
def remove(self, container):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ from ayon_core.hosts.max.api.lib import maintained_selection
|
|||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
update_custom_attribute_data
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path, load
|
||||
|
||||
|
|
@ -115,4 +114,4 @@ class ModelUSDLoader(load.LoaderPlugin):
|
|||
|
||||
def remove(self, container):
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ from ayon_core.hosts.max.api import lib, maintained_selection
|
|||
from ayon_core.hosts.max.api.lib import unique_namespace
|
||||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
remove_container_data
|
||||
get_previous_loaded_object
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -106,7 +105,7 @@ class AbcLoader(load.LoaderPlugin):
|
|||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
||||
@staticmethod
|
||||
def get_container_children(parent, type_name):
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ from ayon_core.pipeline.load import LoadError
|
|||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
update_custom_attribute_data
|
||||
)
|
||||
|
||||
from ayon_core.hosts.max.api.lib import (
|
||||
|
|
@ -106,4 +105,4 @@ class OxAbcLoader(load.LoaderPlugin):
|
|||
|
||||
def remove(self, container):
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ from ayon_core.hosts.max.api.lib import (
|
|||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
update_custom_attribute_data
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path, load
|
||||
|
||||
|
|
@ -64,5 +63,6 @@ class PointCloudLoader(load.LoaderPlugin):
|
|||
def remove(self, container):
|
||||
"""remove the container"""
|
||||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ from ayon_core.pipeline.load import LoadError
|
|||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
update_custom_attribute_data,
|
||||
get_previous_loaded_object,
|
||||
remove_container_data
|
||||
get_previous_loaded_object
|
||||
)
|
||||
from ayon_core.hosts.max.api import lib
|
||||
from ayon_core.hosts.max.api.lib import (
|
||||
|
|
@ -73,5 +72,6 @@ class RedshiftProxyLoader(load.LoaderPlugin):
|
|||
|
||||
def remove(self, container):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.getNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.delete(node)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import os
|
||||
from ayon_core.hosts.max.api import lib, maintained_selection
|
||||
from ayon_core.hosts.max.api.lib import (
|
||||
unique_namespace
|
||||
unique_namespace,
|
||||
|
||||
)
|
||||
from ayon_core.hosts.max.api.pipeline import (
|
||||
containerise,
|
||||
get_previous_loaded_object,
|
||||
update_custom_attribute_data,
|
||||
remove_container_data
|
||||
update_custom_attribute_data
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path, load
|
||||
|
||||
|
|
@ -59,5 +59,6 @@ class TyCacheLoader(load.LoaderPlugin):
|
|||
def remove(self, container):
|
||||
"""remove the container"""
|
||||
from pymxs import runtime as rt
|
||||
|
||||
node = rt.GetNodeByName(container["instance_node"])
|
||||
remove_container_data(node)
|
||||
rt.Delete(node)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue