Change solution for loading rig

This commit is contained in:
Toke Stuart Jepsen 2023-07-13 18:06:35 +01:00
parent 04af219c61
commit 3f10968c95
3 changed files with 6 additions and 9 deletions

View file

@ -27,20 +27,16 @@ from openpype.settings import get_project_settings
from openpype.pipeline import ( from openpype.pipeline import (
get_current_project_name, get_current_project_name,
get_current_asset_name, get_current_asset_name,
get_current_task_name,
discover_loader_plugins, discover_loader_plugins,
loaders_from_representation, loaders_from_representation,
get_representation_path, get_representation_path,
load_container, load_container,
registered_host, registered_host
) )
from openpype.lib import NumberDef from openpype.lib import NumberDef
from openpype.pipeline.context_tools import get_current_project_asset from openpype.pipeline.context_tools import get_current_project_asset
from openpype.pipeline.create import CreateContext from openpype.pipeline.create import CreateContext
from openpype.pipeline.context_tools import (
get_current_asset_name,
get_current_project_name,
get_current_task_name
)
from openpype.lib.profiles_filtering import filter_profiles from openpype.lib.profiles_filtering import filter_profiles
@ -4146,6 +4142,7 @@ def create_rig_animation_instance(
host = registered_host() host = registered_host()
create_context = CreateContext(host) create_context = CreateContext(host)
create_context.creators.update(create_context.disabled_creators)
# Create the animation instance # Create the animation instance
with maintained_selection(): with maintained_selection():

View file

@ -54,8 +54,8 @@ class MayaLegacyConvertor(SubsetConvertorPlugin,
# Consider both disabled and enabled creators # Consider both disabled and enabled creators
# e.g. the "animation" creator is disabled to be hidden # e.g. the "animation" creator is disabled to be hidden
# by the user # by the user
creators = self.create_context.disabled_creators.copy() creators = self.create_context.creators.copy()
creators.update(self.create_context.creators.copy()) creators.update(self.create_context.disabled_creators.copy())
for identifier, creator in creators.items(): for identifier, creator in creators.items():
family = getattr(creator, "family", None) family = getattr(creator, "family", None)
if not family: if not family:

View file

@ -1804,10 +1804,10 @@ class CreateContext:
self, self,
self.headless self.headless
) )
creators[creator_identifier] = creator
if not creator.enabled: if not creator.enabled:
disabled_creators[creator_identifier] = creator disabled_creators[creator_identifier] = creator
continue continue
creators[creator_identifier] = creator
if isinstance(creator, AutoCreator): if isinstance(creator, AutoCreator):
autocreators[creator_identifier] = creator autocreators[creator_identifier] = creator
elif isinstance(creator, Creator): elif isinstance(creator, Creator):