import { commonSchemas } from '../../catalog/tool-definition-utils.js'; import type { ToolDefinition } from '../shared/tool-definition.js'; import { SKELETON_ACTIONS } from '../shared/action-sets.js'; export const animationPhysicsToolDefinition: ToolDefinition = { name: 'animation_physics', category: 'gameplay', description: 'Author animation and physics assets: Animation Blueprints, blend spaces, montages, Control Rig/IK, skeletons, sockets, physics assets, cloth, ragdolls, and vehicles.', inputSchema: { type: 'object', properties: { action: { type: 'string', enum: [ 'create_animation_blueprint', 'create_animation_bp', 'create_anim_blueprint', 'create_blend_space', 'create_blend_space_1d', 'create_blend_space_2d', 'create_blend_tree', 'create_procedural_anim', 'create_aim_offset', 'add_aim_offset_sample', 'create_state_machine', 'add_state_machine', 'add_state', 'add_transition', 'set_transition_rules', 'add_blend_node', 'add_cached_pose', 'add_slot_node', 'create_control_rig', 'create_ik_rig', 'create_ik_retargeter', 'setup_ik', 'create_pose_library', 'create_animation_asset', 'create_animation_sequence', 'set_sequence_length', 'add_bone_track', 'set_bone_key', 'set_curve_key', 'add_notify_state', 'add_sync_marker', 'set_root_motion_settings', 'set_additive_settings', 'create_montage', 'add_montage_section', 'add_montage_slot', 'set_section_timing', 'add_montage_notify', 'set_blend_in', 'set_blend_out', 'link_sections', 'add_notify', 'play_montage', 'play_anim_montage', 'setup_ragdoll', 'activate_ragdoll', 'configure_vehicle', 'setup_physics_simulation', 'add_blend_sample', 'force_rebuild_blend_space', 'set_axis_settings', 'set_interpolation_settings', 'setup_retargeting', 'add_layered_blend_per_bone', 'set_anim_graph_node_value', 'set_retarget_chain_mapping', 'get_animation_info', 'cleanup' , ...SKELETON_ACTIONS], description: 'Action' }, name: commonSchemas.name, path: commonSchemas.directoryPathForCreation, assetPath: commonSchemas.assetPath, animationPath: commonSchemas.assetPath, savePath: commonSchemas.savePath, skeletonPath: commonSchemas.assetPath, parentClass: commonSchemas.stringProp, actorName: commonSchemas.actorName, targetSkeleton: commonSchemas.assetPath, slotName: commonSchemas.stringProp, sectionName: commonSchemas.stringProp, notifyName: commonSchemas.stringProp, boneName: commonSchemas.boneName, curveName: commonSchemas.stringProp, stateName: commonSchemas.stringProp, machineName: commonSchemas.stringProp, numFrames: commonSchemas.numberProp, frameRate: commonSchemas.numberProp, interpolationType: commonSchemas.stringProp, axisName: commonSchemas.stringProp, playRate: commonSchemas.numberProp, frame: commonSchemas.numberProp, time: commonSchemas.numberProp, length: commonSchemas.numberProp, location: commonSchemas.location, rotation: commonSchemas.rotation, scale: commonSchemas.scale, value: commonSchemas.value, vehicleType: commonSchemas.stringProp, mass: commonSchemas.numberProp, dragCoefficient: commonSchemas.numberProp, artifacts: commonSchemas.arrayOfStrings, sourceSkeleton: commonSchemas.assetPath, sourceIKRigPath: commonSchemas.assetPath, targetIKRigPath: commonSchemas.assetPath, save: commonSchemas.save, additiveAnimType: commonSchemas.stringProp, angularDamping: commonSchemas.numberProp, assets: commonSchemas.arrayOfStrings, assignToMesh: commonSchemas.booleanProp, attachBoneName: commonSchemas.boneName, axis: commonSchemas.stringProp, basePoseFrame: commonSchemas.numberProp, basePoseType: commonSchemas.stringProp, blendTime: commonSchemas.numberProp, blendType: commonSchemas.stringProp, blueprintPath: commonSchemas.blueprintPath, bodyA: commonSchemas.stringProp, bodyB: commonSchemas.stringProp, bodyType: commonSchemas.stringProp, boneTracks: commonSchemas.arrayOfObjects, cacheName: commonSchemas.stringProp, center: commonSchemas.location, collisionEnabled: commonSchemas.booleanProp, compileReferencers: { ...commonSchemas.booleanProp, description: 'force_rebuild_blend_space: after rebuilding the BS, cascade-compile every AnimBlueprint that references it (via IAssetRegistry referencers). Response returns referencersCompiled count + compiledAnimBlueprints path list. Default true.' }, constraintName: commonSchemas.stringProp, deltas: commonSchemas.arrayOfObjects, enableRootMotion: commonSchemas.booleanProp, endFrame: commonSchemas.numberProp, forceRootLock: commonSchemas.booleanProp, fromSection: commonSchemas.stringProp, fromState: commonSchemas.stringProp, layerSetup: commonSchemas.arrayOfObjects, limits: commonSchemas.objectProp, linearDamping: commonSchemas.numberProp, lodIndex: commonSchemas.numberProp, markerName: commonSchemas.stringProp, maxValue: commonSchemas.numberProp, minValue: commonSchemas.numberProp, montagePath: commonSchemas.assetPath, morphTargetName: commonSchemas.stringProp, morphTargetPath: commonSchemas.assetPath, newBoneName: commonSchemas.boneName, nodeName: commonSchemas.nodeName, outputPath: commonSchemas.outputPath, overwrite: commonSchemas.overwrite, parentBoneName: commonSchemas.boneName, physicsAssetName: commonSchemas.stringProp, physicsAssetPath: commonSchemas.physicsAssetPath, pitch: commonSchemas.numberProp, profileName: commonSchemas.stringProp, propertyName: commonSchemas.propertyName, radius: commonSchemas.numberProp, rebuildBlendParameters: { ...commonSchemas.booleanProp, description: 'force_rebuild_blend_space: also trigger PostEditChangeProperty for the BlendParameters UPROPERTY (axis min/max changed). Default false.' }, relativeLocation: commonSchemas.location, relativeRotation: commonSchemas.rotation, relativeScale: commonSchemas.scale, removeChildren: commonSchemas.booleanProp, rootBoneName: commonSchemas.boneName, rootMotionRootLock: commonSchemas.stringProp, sampleValue: commonSchemas.numberProp, simulatePhysics: commonSchemas.booleanProp, skeletalMeshPath: commonSchemas.skeletalMeshPath, socketName: commonSchemas.socketName, sourceBoneName: commonSchemas.boneName, sourceChain: commonSchemas.stringProp, sourceMeshPath: commonSchemas.meshPath, startFrame: commonSchemas.numberProp, startTime: commonSchemas.numberProp, stateMachineName: commonSchemas.stringProp, suffix: commonSchemas.stringProp, targetBoneName: commonSchemas.boneName, targetChain: commonSchemas.stringProp, targetMeshPath: commonSchemas.meshPath, threshold: commonSchemas.numberProp, toSection: commonSchemas.stringProp, toState: commonSchemas.stringProp, trackIndex: commonSchemas.numberProp, weights: commonSchemas.arrayOfNumbers, yaw: commonSchemas.numberProp }, required: ['action'] }, outputSchema: { type: 'object', properties: { ...commonSchemas.outputBase, assetPath: commonSchemas.assetPath, animPath: commonSchemas.assetPath, montagePath: commonSchemas.assetPath, blendSpacePath: commonSchemas.assetPath, // force_rebuild_blend_space response fields: rebuiltBlendParameters: { ...commonSchemas.booleanProp, description: 'force_rebuild_blend_space: echoes whether BlendParameters PostEditChangeProperty was also triggered.' }, referencersCompiled: { ...commonSchemas.numberProp, description: 'force_rebuild_blend_space (compileReferencers=true): count of referencing AnimBlueprints that compiled successfully after the BS rebuild.' }, compiledAnimBlueprints: { ...commonSchemas.arrayOfStrings, description: 'force_rebuild_blend_space (compileReferencers=true): asset paths of AnimBlueprints whose compile succeeded.' }, referencersFailed: { ...commonSchemas.numberProp, description: 'force_rebuild_blend_space (compileReferencers=true): count of referencing AnimBlueprints that failed to compile (or to load).' }, failedAnimBlueprints: { ...commonSchemas.arrayOfStrings, description: 'force_rebuild_blend_space (compileReferencers=true): asset paths of AnimBlueprints that failed to compile or load.' } } } };