mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Fix UnrealActorCreator when getting actors from the scene
This commit is contained in:
parent
637c1c0806
commit
e958a69289
1 changed files with 3 additions and 6 deletions
|
|
@ -217,12 +217,9 @@ class UnrealActorCreator(UnrealBaseCreator):
|
||||||
# Check if instance data has members, filled by the plugin.
|
# Check if instance data has members, filled by the plugin.
|
||||||
# If not, use selection.
|
# If not, use selection.
|
||||||
if not instance_data.get("members"):
|
if not instance_data.get("members"):
|
||||||
selection = []
|
actor_subsystem = unreal.EditorActorSubsystem()
|
||||||
|
sel_actors = actor_subsystem.get_selected_level_actors()
|
||||||
if pre_create_data.get("use_selection"):
|
selection = [a.get_path_name() for a in sel_actors]
|
||||||
utility_lib = unreal.EditorUtilityLibrary
|
|
||||||
sel_objects = utility_lib.get_selected_assets()
|
|
||||||
selection = [a.get_path_name() for a in sel_objects]
|
|
||||||
|
|
||||||
instance_data["members"] = selection
|
instance_data["members"] = selection
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue