set_smart_object_slot_transform
Set a smart object slot's local offset and rotation in a USmartObjectDefinition, then save the asset.
Instructions
Set the local offset and/or rotation (degrees) of the slot at slot_index in a USmartObjectDefinition asset, relative to the smart object's owner, then save it. Each of offset and rotation is written only when given with 3 numbers; otherwise it keeps its value. An invalid slot_index is an error, and a failed save returns an error with the change kept in memory. Undoable (one editor transaction). Read slots back with get_smart_object_slots_detail; set_smart_object_slot_enabled and set_smart_object_slot_activity_tags edit other slot fields.
Returns: { definition_path: string, slot_index: int, offset: [number, number, number], rotation: [number, number, number], saved: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | Optional [x, y, z] local offset | |
| rotation | No | PREFERRED: the OBJECT {"roll":R,"pitch":P,"yaw":Y} (any subset, absent axes are 0). The ARRAY form below is [pitch, yaw, roll] -- its index 2 is ROLL, NOT yaw, which once put a PlayerStart on its side. Optional [pitch, yaw, roll] local rotation (degrees) | |
| slot_index | No | Index of the slot to edit | |
| definition_path | Yes | Path to the USmartObjectDefinition asset |