INNER CODE UNIT · Python
exec_tool
kevinpbuckley/VibeUE · Content/Python/vibeue.py:193
def exec_tool(toolset_name, tool_name, args=None, unwrap=True):
"""Execute a ToolsetRegistry tool with schema-aware arg filling and normalized decoding.
Returns the tool's decoded returnValue (or the whole decoded result dict if unwrap=False /
there is no returnValue key). Raises RuntimeError on tool errors.
"""
args = dict(args or {})
try:
tool_schema = _find_tool_schema(get_toolset_schema(toolset_name), tool_name)
except KeyError:
raise
if tool_schema is not None:
_fill_args_from_schema(tool_schema, args)
res = unreal.ToolsetRegistry.execute_tool(toolset_name, tool_name, json.dumps(args))
if res.error:
raise RuntimeError("{}::{} failed: {}".format(toolset_name, tool_name, res.error))
if not res.is_complete: