def process(self): name = self.data["subset"] selection = [] if (self.options or {}).get("useSelection"): sel_objects = unreal.EditorUtilityLibrary.get_selected_assets() selection = [a.get_path_name() for a in sel_objects] unreal.log("selection: {}".format(selection)) instantiate(self.root, name, self.data, selection, self.suffix)
def process(self): data = self.data name = data["subset"] selection = [] # if (self.options or {}).get("useSelection"): # sel_objects = unreal.EditorUtilityLibrary.get_selected_assets() # selection = [a.get_path_name() for a in sel_objects] data["level"] = ell.get_editor_world().get_path_name() data["members"] = [] if (self.options or {}).get("useSelection"): # Set as members the selected actors for actor in ell.get_selected_level_actors(): data["members"].append("{}.{}".format( actor.get_outer().get_name(), actor.get_name())) instantiate(self.root, name, data, selection, self.suffix)