Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
use 'get_legacy_creator_by_name' instead of 'get_creator_by_name'
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Aug 23, 2022
1 parent da80b25 commit fe75b25
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions openpype/hosts/blender/plugins/load/load_layout_blend.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import bpy

from openpype import lib
from openpype.pipeline import (
legacy_create,
get_representation_path,
AVALON_CONTAINER_ID,
)
from openpype.pipeline.create import get_legacy_creator_by_name
from openpype.hosts.blender.api import plugin
from openpype.hosts.blender.api.pipeline import (
AVALON_CONTAINERS,
Expand Down Expand Up @@ -157,7 +157,7 @@ def _process(
t.id = local_obj

elif local_obj.type == 'EMPTY':
creator_plugin = lib.get_creator_by_name("CreateAnimation")
creator_plugin = get_legacy_creator_by_name("CreateAnimation")
if not creator_plugin:
raise ValueError("Creator plugin \"CreateAnimation\" was "
"not found.")
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/blender/plugins/load/load_layout_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _process(self, libpath, asset, asset_group, actions):
# Camera creation when loading a layout is not necessary for now,
# but the code is worth keeping in case we need it in the future.
# # Create the camera asset and the camera instance
# creator_plugin = lib.get_creator_by_name("CreateCamera")
# creator_plugin = get_legacy_creator_by_name("CreateCamera")
# if not creator_plugin:
# raise ValueError("Creator plugin \"CreateCamera\" was "
# "not found.")
Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/blender/plugins/load/load_rig.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import bpy

from openpype import lib
from openpype.pipeline import (
legacy_create,
get_representation_path,
AVALON_CONTAINER_ID,
)
from openpype.pipeline.create import get_legacy_creator_by_name
from openpype.hosts.blender.api import (
plugin,
get_selection,
Expand Down Expand Up @@ -244,7 +244,7 @@ def process_asset(
objects = self._process(libpath, asset_group, group_name, action)

if create_animation:
creator_plugin = lib.get_creator_by_name("CreateAnimation")
creator_plugin = get_legacy_creator_by_name("CreateAnimation")
if not creator_plugin:
raise ValueError("Creator plugin \"CreateAnimation\" was "
"not found.")
Expand Down
10 changes: 6 additions & 4 deletions openpype/hosts/maya/plugins/load/load_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from maya import cmds

from openpype.api import get_project_settings
from openpype.lib import get_creator_by_name
from openpype.pipeline import (
legacy_io,
from openpype.pipeline import legacy_io
from openpype.pipeline.create import (
legacy_create,
get_legacy_creator_by_name,
)
import openpype.hosts.maya.api.plugin
from openpype.hosts.maya.api.lib import maintained_selection
Expand Down Expand Up @@ -153,7 +153,9 @@ def _post_process_rig(self, name, namespace, context, options):
self.log.info("Creating subset: {}".format(namespace))

# Create the animation instance
creator_plugin = get_creator_by_name(self.animation_creator_name)
creator_plugin = get_legacy_creator_by_name(
self.animation_creator_name
)
with maintained_selection():
cmds.select([output, controls] + roots, noExpand=True)
legacy_create(
Expand Down

0 comments on commit fe75b25

Please sign in to comment.