unreal-engine-mcp-server 0.5.21 → 0.5.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +247 -4
- package/README.md +140 -85
- package/dist/automation/bridge.d.ts +8 -0
- package/dist/automation/bridge.d.ts.map +1 -1
- package/dist/automation/bridge.js +94 -14
- package/dist/automation/bridge.js.map +1 -1
- package/dist/automation/connection-manager.d.ts.map +1 -1
- package/dist/automation/connection-manager.js +13 -5
- package/dist/automation/connection-manager.js.map +1 -1
- package/dist/automation/handshake.d.ts.map +1 -1
- package/dist/automation/handshake.js +40 -27
- package/dist/automation/handshake.js.map +1 -1
- package/dist/automation/index.d.ts +1 -1
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.js +0 -1
- package/dist/automation/index.js.map +1 -1
- package/dist/automation/message-handler.d.ts.map +1 -1
- package/dist/automation/message-handler.js +13 -9
- package/dist/automation/message-handler.js.map +1 -1
- package/dist/automation/message-schema.d.ts.map +1 -1
- package/dist/automation/message-schema.js +19 -18
- package/dist/automation/message-schema.js.map +1 -1
- package/dist/automation/request-tracker.d.ts +1 -0
- package/dist/automation/request-tracker.d.ts.map +1 -1
- package/dist/automation/request-tracker.js +30 -31
- package/dist/automation/request-tracker.js.map +1 -1
- package/dist/automation/types.d.ts +38 -32
- package/dist/automation/types.d.ts.map +1 -1
- package/dist/cli.js +14 -16
- package/dist/cli.js.map +1 -1
- package/dist/config/class-aliases.d.ts.map +1 -1
- package/dist/config/class-aliases.js +10 -2
- package/dist/config/class-aliases.js.map +1 -1
- package/dist/config.d.ts +9 -8
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +58 -32
- package/dist/config.js.map +1 -1
- package/dist/handlers/resource-handlers.d.ts +15 -2
- package/dist/handlers/resource-handlers.d.ts.map +1 -1
- package/dist/handlers/resource-handlers.js +46 -63
- package/dist/handlers/resource-handlers.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -48
- package/dist/index.js.map +1 -1
- package/dist/resources/assets.d.ts.map +1 -1
- package/dist/resources/assets.js +34 -9
- package/dist/resources/assets.js.map +1 -1
- package/dist/resources/levels.d.ts +3 -0
- package/dist/resources/levels.d.ts.map +1 -1
- package/dist/resources/levels.js +33 -17
- package/dist/resources/levels.js.map +1 -1
- package/dist/server/resource-registry.d.ts +15 -2
- package/dist/server/resource-registry.d.ts.map +1 -1
- package/dist/server/resource-registry.js +9 -8
- package/dist/server/resource-registry.js.map +1 -1
- package/dist/server/tool-registry.d.ts +0 -1
- package/dist/server/tool-registry.d.ts.map +1 -1
- package/dist/server/tool-registry.js +91 -101
- package/dist/server/tool-registry.js.map +1 -1
- package/dist/server-setup.d.ts +5 -2
- package/dist/server-setup.d.ts.map +1 -1
- package/dist/server-setup.js +15 -19
- package/dist/server-setup.js.map +1 -1
- package/dist/services/health-monitor.d.ts +3 -0
- package/dist/services/health-monitor.d.ts.map +1 -1
- package/dist/services/health-monitor.js +30 -11
- package/dist/services/health-monitor.js.map +1 -1
- package/dist/services/metrics-server.d.ts +1 -1
- package/dist/services/metrics-server.d.ts.map +1 -1
- package/dist/services/metrics-server.js +65 -3
- package/dist/services/metrics-server.js.map +1 -1
- package/dist/tools/base-tool.d.ts.map +1 -1
- package/dist/tools/base-tool.js +14 -16
- package/dist/tools/base-tool.js.map +1 -1
- package/dist/tools/consolidated-tool-definitions.d.ts +16 -1
- package/dist/tools/consolidated-tool-definitions.d.ts.map +1 -1
- package/dist/tools/consolidated-tool-definitions.js +1479 -2538
- package/dist/tools/consolidated-tool-definitions.js.map +1 -1
- package/dist/tools/consolidated-tool-handlers.d.ts.map +1 -1
- package/dist/tools/consolidated-tool-handlers.js +195 -217
- package/dist/tools/consolidated-tool-handlers.js.map +1 -1
- package/dist/tools/dynamic-handler-registry.d.ts +1 -0
- package/dist/tools/dynamic-handler-registry.d.ts.map +1 -1
- package/dist/tools/dynamic-handler-registry.js +15 -7
- package/dist/tools/dynamic-handler-registry.js.map +1 -1
- package/dist/tools/dynamic-tool-manager.d.ts +1 -1
- package/dist/tools/dynamic-tool-manager.d.ts.map +1 -1
- package/dist/tools/dynamic-tool-manager.js +30 -18
- package/dist/tools/dynamic-tool-manager.js.map +1 -1
- package/dist/tools/editor.d.ts +2 -2
- package/dist/tools/editor.d.ts.map +1 -1
- package/dist/tools/editor.js +4 -4
- package/dist/tools/editor.js.map +1 -1
- package/dist/tools/handlers/actor-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/actor-handlers.js +66 -7
- package/dist/tools/handlers/actor-handlers.js.map +1 -1
- package/dist/tools/handlers/ai-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/ai-handlers.js +24 -13
- package/dist/tools/handlers/ai-handlers.js.map +1 -1
- package/dist/tools/handlers/animation-authoring-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/animation-authoring-handlers.js +285 -218
- package/dist/tools/handlers/animation-authoring-handlers.js.map +1 -1
- package/dist/tools/handlers/animation-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/animation-handlers.js +69 -21
- package/dist/tools/handlers/animation-handlers.js.map +1 -1
- package/dist/tools/handlers/asset-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/asset-handlers.js +75 -16
- package/dist/tools/handlers/asset-handlers.js.map +1 -1
- package/dist/tools/handlers/audio-authoring-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/audio-authoring-handlers.js +102 -9
- package/dist/tools/handlers/audio-authoring-handlers.js.map +1 -1
- package/dist/tools/handlers/audio-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/audio-handlers.js +48 -13
- package/dist/tools/handlers/audio-handlers.js.map +1 -1
- package/dist/tools/handlers/blueprint-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/blueprint-handlers.js +28 -48
- package/dist/tools/handlers/blueprint-handlers.js.map +1 -1
- package/dist/tools/handlers/character-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/character-handlers.js +13 -12
- package/dist/tools/handlers/character-handlers.js.map +1 -1
- package/dist/tools/handlers/combat-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/combat-handlers.js +12 -12
- package/dist/tools/handlers/combat-handlers.js.map +1 -1
- package/dist/tools/handlers/common-handlers.d.ts +14 -0
- package/dist/tools/handlers/common-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/common-handlers.js +117 -9
- package/dist/tools/handlers/common-handlers.js.map +1 -1
- package/dist/tools/handlers/editor-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/editor-handlers.js +139 -67
- package/dist/tools/handlers/editor-handlers.js.map +1 -1
- package/dist/tools/handlers/effect-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/effect-handlers.js +324 -36
- package/dist/tools/handlers/effect-handlers.js.map +1 -1
- package/dist/tools/handlers/environment-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/environment-handlers.js +186 -21
- package/dist/tools/handlers/environment-handlers.js.map +1 -1
- package/dist/tools/handlers/game-framework-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/game-framework-handlers.js +10 -12
- package/dist/tools/handlers/game-framework-handlers.js.map +1 -1
- package/dist/tools/handlers/gas-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/gas-handlers.js +136 -20
- package/dist/tools/handlers/gas-handlers.js.map +1 -1
- package/dist/tools/handlers/geometry-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/geometry-handlers.js +130 -7
- package/dist/tools/handlers/geometry-handlers.js.map +1 -1
- package/dist/tools/handlers/graph-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/graph-handlers.js +46 -11
- package/dist/tools/handlers/graph-handlers.js.map +1 -1
- package/dist/tools/handlers/input-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/input-handlers.js +33 -75
- package/dist/tools/handlers/input-handlers.js.map +1 -1
- package/dist/tools/handlers/inspect-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/inspect-handlers.js +136 -39
- package/dist/tools/handlers/inspect-handlers.js.map +1 -1
- package/dist/tools/handlers/interaction-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/interaction-handlers.js +14 -12
- package/dist/tools/handlers/interaction-handlers.js.map +1 -1
- package/dist/tools/handlers/inventory-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/inventory-handlers.js +19 -12
- package/dist/tools/handlers/inventory-handlers.js.map +1 -1
- package/dist/tools/handlers/level-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/level-handlers.js +166 -149
- package/dist/tools/handlers/level-handlers.js.map +1 -1
- package/dist/tools/handlers/level-structure-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/level-structure-handlers.js +18 -34
- package/dist/tools/handlers/level-structure-handlers.js.map +1 -1
- package/dist/tools/handlers/manage-tools-handlers.js +3 -3
- package/dist/tools/handlers/manage-tools-handlers.js.map +1 -1
- package/dist/tools/handlers/material-authoring-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/material-authoring-handlers.js +382 -41
- package/dist/tools/handlers/material-authoring-handlers.js.map +1 -1
- package/dist/tools/handlers/navigation-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/navigation-handlers.js +11 -36
- package/dist/tools/handlers/navigation-handlers.js.map +1 -1
- package/dist/tools/handlers/networking-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/networking-handlers.js +17 -15
- package/dist/tools/handlers/networking-handlers.js.map +1 -1
- package/dist/tools/handlers/niagara-authoring-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/niagara-authoring-handlers.js +24 -23
- package/dist/tools/handlers/niagara-authoring-handlers.js.map +1 -1
- package/dist/tools/handlers/pcg-handlers.d.ts +4 -0
- package/dist/tools/handlers/pcg-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/pcg-handlers.js +77 -0
- package/dist/tools/handlers/pcg-handlers.js.map +1 -0
- package/dist/tools/handlers/performance-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/performance-handlers.js +35 -42
- package/dist/tools/handlers/performance-handlers.js.map +1 -1
- package/dist/tools/handlers/pipeline-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/pipeline-handlers.js +157 -39
- package/dist/tools/handlers/pipeline-handlers.js.map +1 -1
- package/dist/tools/handlers/sequence-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/sequence-handlers.js +6 -4
- package/dist/tools/handlers/sequence-handlers.js.map +1 -1
- package/dist/tools/handlers/sessions-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/sessions-handlers.js +7 -15
- package/dist/tools/handlers/sessions-handlers.js.map +1 -1
- package/dist/tools/handlers/spline-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/spline-handlers.js +8 -35
- package/dist/tools/handlers/spline-handlers.js.map +1 -1
- package/dist/tools/handlers/system-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/system-handlers.js +100 -26
- package/dist/tools/handlers/system-handlers.js.map +1 -1
- package/dist/tools/handlers/texture-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/texture-handlers.js +14 -0
- package/dist/tools/handlers/texture-handlers.js.map +1 -1
- package/dist/tools/handlers/volume-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/volume-handlers.js +6 -33
- package/dist/tools/handlers/volume-handlers.js.map +1 -1
- package/dist/tools/handlers/widget-authoring-handlers.d.ts.map +1 -1
- package/dist/tools/handlers/widget-authoring-handlers.js +26 -20
- package/dist/tools/handlers/widget-authoring-handlers.js.map +1 -1
- package/dist/tools/level.d.ts +2 -2
- package/dist/tools/level.d.ts.map +1 -1
- package/dist/tools/level.js +2 -1
- package/dist/tools/level.js.map +1 -1
- package/dist/tools/property-dictionary.js +1 -1
- package/dist/tools/property-dictionary.js.map +1 -1
- package/dist/tools/schemas/core-tools.d.ts +1 -1
- package/dist/tools/schemas/core-tools.d.ts.map +1 -1
- package/dist/tools/schemas/core-tools.js +94 -57
- package/dist/tools/schemas/core-tools.js.map +1 -1
- package/dist/tools/tool-definition-utils.d.ts +8 -0
- package/dist/tools/tool-definition-utils.d.ts.map +1 -1
- package/dist/tools/tool-definition-utils.js +20 -0
- package/dist/tools/tool-definition-utils.js.map +1 -1
- package/dist/types/automation-responses.d.ts +26 -33
- package/dist/types/automation-responses.d.ts.map +1 -1
- package/dist/types/env.d.ts.map +1 -1
- package/dist/types/env.js +7 -6
- package/dist/types/env.js.map +1 -1
- package/dist/types/handler-types.d.ts +41 -20
- package/dist/types/handler-types.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/tool-interfaces.d.ts +5 -873
- package/dist/types/tool-interfaces.d.ts.map +1 -1
- package/dist/types/tool-types.d.ts +35 -1
- package/dist/types/tool-types.d.ts.map +1 -1
- package/dist/unreal-bridge.d.ts.map +1 -1
- package/dist/unreal-bridge.js +16 -6
- package/dist/unreal-bridge.js.map +1 -1
- package/dist/utils/action-constants.d.ts +4 -1
- package/dist/utils/action-constants.d.ts.map +1 -1
- package/dist/utils/action-constants.js +4 -1
- package/dist/utils/action-constants.js.map +1 -1
- package/dist/utils/command-validator.d.ts.map +1 -1
- package/dist/utils/command-validator.js +5 -4
- package/dist/utils/command-validator.js.map +1 -1
- package/dist/utils/elicitation.d.ts +5 -2
- package/dist/utils/elicitation.d.ts.map +1 -1
- package/dist/utils/elicitation.js +38 -21
- package/dist/utils/elicitation.js.map +1 -1
- package/dist/utils/environment-snapshot.d.ts +17 -0
- package/dist/utils/environment-snapshot.d.ts.map +1 -0
- package/dist/utils/environment-snapshot.js +242 -0
- package/dist/utils/environment-snapshot.js.map +1 -0
- package/dist/utils/error-handler.d.ts +1 -11
- package/dist/utils/error-handler.d.ts.map +1 -1
- package/dist/utils/error-handler.js +41 -25
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/ini-reader.js +4 -4
- package/dist/utils/ini-reader.js.map +1 -1
- package/dist/utils/log-reader.d.ts +29 -0
- package/dist/utils/log-reader.d.ts.map +1 -0
- package/dist/utils/log-reader.js +229 -0
- package/dist/utils/log-reader.js.map +1 -0
- package/dist/utils/log-redaction.d.ts +4 -0
- package/dist/utils/log-redaction.d.ts.map +1 -0
- package/dist/utils/log-redaction.js +27 -0
- package/dist/utils/log-redaction.js.map +1 -0
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +20 -7
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/normalize.d.ts.map +1 -1
- package/dist/utils/normalize.js +31 -30
- package/dist/utils/normalize.js.map +1 -1
- package/dist/utils/path-security.d.ts.map +1 -1
- package/dist/utils/path-security.js +20 -11
- package/dist/utils/path-security.js.map +1 -1
- package/dist/utils/response-factory.d.ts +1 -1
- package/dist/utils/response-factory.d.ts.map +1 -1
- package/dist/utils/response-factory.js +17 -3
- package/dist/utils/response-factory.js.map +1 -1
- package/dist/utils/response-validator.d.ts.map +1 -1
- package/dist/utils/response-validator.js +114 -47
- package/dist/utils/response-validator.js.map +1 -1
- package/dist/utils/safe-json.d.ts.map +1 -1
- package/dist/utils/safe-json.js +24 -18
- package/dist/utils/safe-json.js.map +1 -1
- package/dist/utils/type-coercion.d.ts +2 -3
- package/dist/utils/type-coercion.d.ts.map +1 -1
- package/dist/utils/type-coercion.js +42 -14
- package/dist/utils/type-coercion.js.map +1 -1
- package/dist/utils/type-guards.d.ts +2 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +4 -0
- package/dist/utils/type-guards.js.map +1 -0
- package/dist/utils/unreal-command-queue.d.ts +2 -0
- package/dist/utils/unreal-command-queue.d.ts.map +1 -1
- package/dist/utils/unreal-command-queue.js +80 -54
- package/dist/utils/unreal-command-queue.js.map +1 -1
- package/dist/utils/validation.d.ts +2 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +44 -34
- package/dist/utils/validation.js.map +1 -1
- package/package.json +4 -6
- package/server.json +3 -3
- package/dist/graphql/loaders.d.ts +0 -64
- package/dist/graphql/loaders.d.ts.map +0 -1
- package/dist/graphql/loaders.js +0 -117
- package/dist/graphql/loaders.js.map +0 -1
- package/dist/graphql/resolvers.d.ts +0 -373
- package/dist/graphql/resolvers.d.ts.map +0 -1
- package/dist/graphql/resolvers.js +0 -776
- package/dist/graphql/resolvers.js.map +0 -1
- package/dist/graphql/schema.d.ts +0 -5
- package/dist/graphql/schema.d.ts.map +0 -1
- package/dist/graphql/schema.js +0 -437
- package/dist/graphql/schema.js.map +0 -1
- package/dist/graphql/server.d.ts +0 -25
- package/dist/graphql/server.d.ts.map +0 -1
- package/dist/graphql/server.js +0 -119
- package/dist/graphql/server.js.map +0 -1
- package/dist/graphql/types.d.ts +0 -9
- package/dist/graphql/types.d.ts.map +0 -1
- package/dist/graphql/types.js +0 -2
- package/dist/graphql/types.js.map +0 -1
- package/dist/tools/actors.d.ts +0 -212
- package/dist/tools/actors.d.ts.map +0 -1
- package/dist/tools/actors.js +0 -456
- package/dist/tools/actors.js.map +0 -1
- package/dist/tools/animation.d.ts +0 -274
- package/dist/tools/animation.d.ts.map +0 -1
- package/dist/tools/animation.js +0 -773
- package/dist/tools/animation.js.map +0 -1
- package/dist/tools/assets.d.ts +0 -82
- package/dist/tools/assets.d.ts.map +0 -1
- package/dist/tools/assets.js +0 -383
- package/dist/tools/assets.js.map +0 -1
- package/dist/tools/blueprint.d.ts +0 -271
- package/dist/tools/blueprint.d.ts.map +0 -1
- package/dist/tools/blueprint.js +0 -828
- package/dist/tools/blueprint.js.map +0 -1
- package/dist/tools/environment.d.ts +0 -37
- package/dist/tools/environment.d.ts.map +0 -1
- package/dist/tools/environment.js +0 -338
- package/dist/tools/environment.js.map +0 -1
- package/dist/tools/foliage.d.ts +0 -140
- package/dist/tools/foliage.d.ts.map +0 -1
- package/dist/tools/foliage.js +0 -405
- package/dist/tools/foliage.js.map +0 -1
- package/dist/tools/landscape.d.ts +0 -120
- package/dist/tools/landscape.d.ts.map +0 -1
- package/dist/tools/landscape.js +0 -454
- package/dist/tools/landscape.js.map +0 -1
- package/dist/tools/lighting.d.ts +0 -240
- package/dist/tools/lighting.d.ts.map +0 -1
- package/dist/tools/lighting.js +0 -856
- package/dist/tools/lighting.js.map +0 -1
- package/dist/tools/logs.d.ts +0 -45
- package/dist/tools/logs.d.ts.map +0 -1
- package/dist/tools/logs.js +0 -235
- package/dist/tools/logs.js.map +0 -1
- package/dist/tools/niagara.d.ts +0 -277
- package/dist/tools/niagara.d.ts.map +0 -1
- package/dist/tools/niagara.js +0 -325
- package/dist/tools/niagara.js.map +0 -1
- package/dist/tools/physics.d.ts +0 -191
- package/dist/tools/physics.d.ts.map +0 -1
- package/dist/tools/physics.js +0 -492
- package/dist/tools/physics.js.map +0 -1
- package/dist/tools/sequence.d.ts +0 -139
- package/dist/tools/sequence.d.ts.map +0 -1
- package/dist/tools/sequence.js +0 -261
- package/dist/tools/sequence.js.map +0 -1
|
@@ -14,6 +14,39 @@ function validatePath(path, fieldName) {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
function finiteNumber(value) {
|
|
18
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
19
|
+
}
|
|
20
|
+
function finiteNumberOrDefault(value, fallback) {
|
|
21
|
+
return finiteNumber(value) ?? fallback;
|
|
22
|
+
}
|
|
23
|
+
function positiveNumberOrDefault(value, fallback) {
|
|
24
|
+
const parsed = finiteNumber(value);
|
|
25
|
+
return parsed !== undefined && parsed > 0 ? parsed : fallback;
|
|
26
|
+
}
|
|
27
|
+
function positiveIntegerOrDefault(value, fallback) {
|
|
28
|
+
const parsed = positiveNumberOrDefault(value, fallback);
|
|
29
|
+
return Math.floor(parsed);
|
|
30
|
+
}
|
|
31
|
+
function optionalPositiveNumber(value) {
|
|
32
|
+
const parsed = finiteNumber(value);
|
|
33
|
+
return parsed !== undefined && parsed > 0 ? parsed : undefined;
|
|
34
|
+
}
|
|
35
|
+
function nonNegativeNumberOrDefault(value, fallback) {
|
|
36
|
+
const parsed = finiteNumber(value);
|
|
37
|
+
return parsed !== undefined && parsed >= 0 ? parsed : fallback;
|
|
38
|
+
}
|
|
39
|
+
function optionalNonNegativeNumber(value) {
|
|
40
|
+
const parsed = finiteNumber(value);
|
|
41
|
+
return parsed !== undefined && parsed >= 0 ? parsed : undefined;
|
|
42
|
+
}
|
|
43
|
+
function nonNegativeIntegerOrDefault(value, fallback) {
|
|
44
|
+
return Math.floor(nonNegativeNumberOrDefault(value, fallback));
|
|
45
|
+
}
|
|
46
|
+
function optionalPositiveInteger(value) {
|
|
47
|
+
const parsed = optionalPositiveNumber(value);
|
|
48
|
+
return parsed === undefined ? undefined : Math.floor(parsed);
|
|
49
|
+
}
|
|
17
50
|
export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
18
51
|
try {
|
|
19
52
|
const allPathParams = [
|
|
@@ -35,16 +68,16 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
35
68
|
const params = normalizeArgs(args, [
|
|
36
69
|
{ key: 'name', required: true },
|
|
37
70
|
{ key: 'path', aliases: ['directory'], default: '/Game/Animations' },
|
|
38
|
-
{ key: 'skeletonPath', required:
|
|
71
|
+
{ key: 'skeletonPath', required: false },
|
|
39
72
|
{ key: 'numFrames', default: 30 },
|
|
40
73
|
{ key: 'frameRate', default: 30 },
|
|
41
74
|
{ key: 'save', default: true },
|
|
42
75
|
]);
|
|
43
76
|
const name = extractString(params, 'name');
|
|
44
77
|
const path = extractOptionalString(params, 'path') ?? '/Game/Animations';
|
|
45
|
-
const skeletonPath =
|
|
46
|
-
const numFrames =
|
|
47
|
-
const frameRate =
|
|
78
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
79
|
+
const numFrames = positiveIntegerOrDefault(params['numFrames'], 30);
|
|
80
|
+
const frameRate = positiveNumberOrDefault(params['frameRate'], 30);
|
|
48
81
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
49
82
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
50
83
|
subAction: 'create_animation_sequence',
|
|
@@ -68,13 +101,13 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
68
101
|
{ key: 'save', default: true },
|
|
69
102
|
]);
|
|
70
103
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
73
|
-
return
|
|
104
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
105
|
+
if (!assetPathValidation.valid) {
|
|
106
|
+
return assetPathValidation.error;
|
|
74
107
|
}
|
|
75
|
-
const assetPath =
|
|
76
|
-
const numFrames =
|
|
77
|
-
const frameRate =
|
|
108
|
+
const assetPath = assetPathValidation.sanitized;
|
|
109
|
+
const numFrames = positiveIntegerOrDefault(params['numFrames'], 30);
|
|
110
|
+
const frameRate = optionalPositiveNumber(params['frameRate']);
|
|
78
111
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
79
112
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
80
113
|
subAction: 'set_sequence_length',
|
|
@@ -95,11 +128,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
95
128
|
{ key: 'save', default: true },
|
|
96
129
|
]);
|
|
97
130
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
100
|
-
return
|
|
131
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
132
|
+
if (!assetPathValidation.valid) {
|
|
133
|
+
return assetPathValidation.error;
|
|
101
134
|
}
|
|
102
|
-
const assetPath =
|
|
135
|
+
const assetPath = assetPathValidation.sanitized;
|
|
103
136
|
const boneName = extractString(params, 'boneName');
|
|
104
137
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
105
138
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -124,13 +157,13 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
124
157
|
{ key: 'save', default: true },
|
|
125
158
|
]);
|
|
126
159
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
127
|
-
const
|
|
128
|
-
if (!
|
|
129
|
-
return
|
|
160
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
161
|
+
if (!assetPathValidation.valid) {
|
|
162
|
+
return assetPathValidation.error;
|
|
130
163
|
}
|
|
131
|
-
const assetPath =
|
|
164
|
+
const assetPath = assetPathValidation.sanitized;
|
|
132
165
|
const boneName = extractString(params, 'boneName');
|
|
133
|
-
const frame =
|
|
166
|
+
const frame = nonNegativeIntegerOrDefault(params['frame'], 0);
|
|
134
167
|
const location = extractOptionalObject(params, 'location');
|
|
135
168
|
const rotation = extractOptionalObject(params, 'rotation');
|
|
136
169
|
const scale = extractOptionalObject(params, 'scale');
|
|
@@ -160,14 +193,14 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
160
193
|
{ key: 'save', default: true },
|
|
161
194
|
]);
|
|
162
195
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
165
|
-
return
|
|
196
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
197
|
+
if (!assetPathValidation.valid) {
|
|
198
|
+
return assetPathValidation.error;
|
|
166
199
|
}
|
|
167
|
-
const assetPath =
|
|
200
|
+
const assetPath = assetPathValidation.sanitized;
|
|
168
201
|
const curveName = extractString(params, 'curveName');
|
|
169
|
-
const frame =
|
|
170
|
-
const value =
|
|
202
|
+
const frame = nonNegativeIntegerOrDefault(params['frame'], 0);
|
|
203
|
+
const value = finiteNumberOrDefault(params['value'], 0);
|
|
171
204
|
const createIfMissing = extractOptionalBoolean(params, 'createIfMissing') ?? true;
|
|
172
205
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
173
206
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -187,21 +220,21 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
187
220
|
case 'add_notify': {
|
|
188
221
|
const params = normalizeArgs(args, [
|
|
189
222
|
{ key: 'assetPath', required: true },
|
|
190
|
-
{ key: 'notifyClass', required:
|
|
223
|
+
{ key: 'notifyClass', required: false },
|
|
191
224
|
{ key: 'frame', required: true },
|
|
192
225
|
{ key: 'trackIndex', default: 0 },
|
|
193
226
|
{ key: 'notifyName' },
|
|
194
227
|
{ key: 'save', default: true },
|
|
195
228
|
]);
|
|
196
229
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
197
|
-
const
|
|
198
|
-
if (!
|
|
199
|
-
return
|
|
200
|
-
}
|
|
201
|
-
const assetPath =
|
|
202
|
-
const notifyClass =
|
|
203
|
-
const frame =
|
|
204
|
-
const trackIndex =
|
|
230
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
231
|
+
if (!assetPathValidation.valid) {
|
|
232
|
+
return assetPathValidation.error;
|
|
233
|
+
}
|
|
234
|
+
const assetPath = assetPathValidation.sanitized;
|
|
235
|
+
const notifyClass = extractOptionalString(params, 'notifyClass');
|
|
236
|
+
const frame = nonNegativeIntegerOrDefault(params['frame'], 0);
|
|
237
|
+
const trackIndex = nonNegativeIntegerOrDefault(params['trackIndex'], 0);
|
|
205
238
|
const notifyName = extractOptionalString(params, 'notifyName');
|
|
206
239
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
207
240
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -221,7 +254,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
221
254
|
case 'add_notify_state': {
|
|
222
255
|
const params = normalizeArgs(args, [
|
|
223
256
|
{ key: 'assetPath', required: true },
|
|
224
|
-
{ key: 'notifyClass', required:
|
|
257
|
+
{ key: 'notifyClass', required: false },
|
|
225
258
|
{ key: 'startFrame', required: true },
|
|
226
259
|
{ key: 'endFrame', required: true },
|
|
227
260
|
{ key: 'trackIndex', default: 0 },
|
|
@@ -229,15 +262,15 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
229
262
|
{ key: 'save', default: true },
|
|
230
263
|
]);
|
|
231
264
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
234
|
-
return
|
|
235
|
-
}
|
|
236
|
-
const assetPath =
|
|
237
|
-
const notifyClass =
|
|
238
|
-
const startFrame =
|
|
239
|
-
const endFrame =
|
|
240
|
-
const trackIndex =
|
|
265
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
266
|
+
if (!assetPathValidation.valid) {
|
|
267
|
+
return assetPathValidation.error;
|
|
268
|
+
}
|
|
269
|
+
const assetPath = assetPathValidation.sanitized;
|
|
270
|
+
const notifyClass = extractOptionalString(params, 'notifyClass');
|
|
271
|
+
const startFrame = nonNegativeIntegerOrDefault(params['startFrame'], 0);
|
|
272
|
+
const endFrame = nonNegativeIntegerOrDefault(params['endFrame'], 10);
|
|
273
|
+
const trackIndex = nonNegativeIntegerOrDefault(params['trackIndex'], 0);
|
|
241
274
|
const notifyName = extractOptionalString(params, 'notifyName');
|
|
242
275
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
243
276
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -263,13 +296,13 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
263
296
|
{ key: 'save', default: true },
|
|
264
297
|
]);
|
|
265
298
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
268
|
-
return
|
|
299
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
300
|
+
if (!assetPathValidation.valid) {
|
|
301
|
+
return assetPathValidation.error;
|
|
269
302
|
}
|
|
270
|
-
const assetPath =
|
|
303
|
+
const assetPath = assetPathValidation.sanitized;
|
|
271
304
|
const markerName = extractString(params, 'markerName');
|
|
272
|
-
const frame =
|
|
305
|
+
const frame = nonNegativeIntegerOrDefault(params['frame'], 0);
|
|
273
306
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
274
307
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
275
308
|
subAction: 'add_sync_marker',
|
|
@@ -292,11 +325,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
292
325
|
{ key: 'save', default: true },
|
|
293
326
|
]);
|
|
294
327
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
295
|
-
const
|
|
296
|
-
if (!
|
|
297
|
-
return
|
|
328
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
329
|
+
if (!assetPathValidation.valid) {
|
|
330
|
+
return assetPathValidation.error;
|
|
298
331
|
}
|
|
299
|
-
const assetPath =
|
|
332
|
+
const assetPath = assetPathValidation.sanitized;
|
|
300
333
|
const enableRootMotion = extractOptionalBoolean(params, 'enableRootMotion') ?? true;
|
|
301
334
|
const rootMotionRootLock = extractOptionalString(params, 'rootMotionRootLock') ?? 'RefPose';
|
|
302
335
|
const forceRootLock = extractOptionalBoolean(params, 'forceRootLock') ?? false;
|
|
@@ -324,15 +357,15 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
324
357
|
{ key: 'save', default: true },
|
|
325
358
|
]);
|
|
326
359
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
327
|
-
const
|
|
328
|
-
if (!
|
|
329
|
-
return
|
|
360
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
361
|
+
if (!assetPathValidation.valid) {
|
|
362
|
+
return assetPathValidation.error;
|
|
330
363
|
}
|
|
331
|
-
const assetPath =
|
|
364
|
+
const assetPath = assetPathValidation.sanitized;
|
|
332
365
|
const additiveAnimType = extractOptionalString(params, 'additiveAnimType') ?? 'NoAdditive';
|
|
333
366
|
const basePoseType = extractOptionalString(params, 'basePoseType') ?? 'RefPose';
|
|
334
367
|
const basePoseAnimation = extractOptionalString(params, 'basePoseAnimation');
|
|
335
|
-
const basePoseFrame =
|
|
368
|
+
const basePoseFrame = nonNegativeIntegerOrDefault(params['basePoseFrame'], 0);
|
|
336
369
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
337
370
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
338
371
|
subAction: 'set_additive_settings',
|
|
@@ -352,13 +385,13 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
352
385
|
const params = normalizeArgs(args, [
|
|
353
386
|
{ key: 'name', required: true },
|
|
354
387
|
{ key: 'path', aliases: ['directory'], default: '/Game/Animations' },
|
|
355
|
-
{ key: 'skeletonPath', required:
|
|
388
|
+
{ key: 'skeletonPath', required: false },
|
|
356
389
|
{ key: 'slotName', default: 'DefaultSlot' },
|
|
357
390
|
{ key: 'save', default: true },
|
|
358
391
|
]);
|
|
359
392
|
const name = extractString(params, 'name');
|
|
360
393
|
const path = extractOptionalString(params, 'path') ?? '/Game/Animations';
|
|
361
|
-
const skeletonPath =
|
|
394
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
362
395
|
const slotName = extractOptionalString(params, 'slotName') ?? 'DefaultSlot';
|
|
363
396
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
364
397
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -382,13 +415,13 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
382
415
|
{ key: 'save', default: true },
|
|
383
416
|
]);
|
|
384
417
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
385
|
-
const
|
|
386
|
-
if (!
|
|
387
|
-
return
|
|
418
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
419
|
+
if (!assetPathValidation.valid) {
|
|
420
|
+
return assetPathValidation.error;
|
|
388
421
|
}
|
|
389
|
-
const assetPath =
|
|
422
|
+
const assetPath = assetPathValidation.sanitized;
|
|
390
423
|
const sectionName = extractString(params, 'sectionName');
|
|
391
|
-
const startTime =
|
|
424
|
+
const startTime = nonNegativeNumberOrDefault(params['startTime'], 0);
|
|
392
425
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
393
426
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
394
427
|
subAction: 'add_montage_section',
|
|
@@ -411,19 +444,19 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
411
444
|
{ key: 'save', default: true },
|
|
412
445
|
]);
|
|
413
446
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
414
|
-
const
|
|
415
|
-
if (!
|
|
416
|
-
return
|
|
447
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
448
|
+
if (!assetPathValidation.valid) {
|
|
449
|
+
return assetPathValidation.error;
|
|
417
450
|
}
|
|
418
|
-
const assetPath =
|
|
451
|
+
const assetPath = assetPathValidation.sanitized;
|
|
419
452
|
const rawAnimationPath = extractString(params, 'animationPath');
|
|
420
|
-
const
|
|
421
|
-
if (!
|
|
422
|
-
return
|
|
453
|
+
const animationPathValidation = validatePath(rawAnimationPath, 'animationPath');
|
|
454
|
+
if (!animationPathValidation.valid) {
|
|
455
|
+
return animationPathValidation.error;
|
|
423
456
|
}
|
|
424
|
-
const animationPath =
|
|
457
|
+
const animationPath = animationPathValidation.sanitized;
|
|
425
458
|
const slotName = extractOptionalString(params, 'slotName') ?? 'DefaultSlot';
|
|
426
|
-
const startTime =
|
|
459
|
+
const startTime = nonNegativeNumberOrDefault(params['startTime'], 0);
|
|
427
460
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
428
461
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
429
462
|
subAction: 'add_montage_slot',
|
|
@@ -447,14 +480,14 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
447
480
|
{ key: 'save', default: true },
|
|
448
481
|
]);
|
|
449
482
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
450
|
-
const
|
|
451
|
-
if (!
|
|
452
|
-
return
|
|
483
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
484
|
+
if (!assetPathValidation.valid) {
|
|
485
|
+
return assetPathValidation.error;
|
|
453
486
|
}
|
|
454
|
-
const assetPath =
|
|
487
|
+
const assetPath = assetPathValidation.sanitized;
|
|
455
488
|
const sectionName = extractString(params, 'sectionName');
|
|
456
|
-
const startTime =
|
|
457
|
-
const length =
|
|
489
|
+
const startTime = optionalNonNegativeNumber(params['startTime']);
|
|
490
|
+
const length = optionalPositiveNumber(params['length']);
|
|
458
491
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
459
492
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
460
493
|
subAction: 'set_section_timing',
|
|
@@ -472,21 +505,21 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
472
505
|
case 'add_montage_notify': {
|
|
473
506
|
const params = normalizeArgs(args, [
|
|
474
507
|
{ key: 'assetPath', required: true },
|
|
475
|
-
{ key: 'notifyClass', required:
|
|
508
|
+
{ key: 'notifyClass', required: false },
|
|
476
509
|
{ key: 'time', required: true },
|
|
477
510
|
{ key: 'trackIndex', default: 0 },
|
|
478
511
|
{ key: 'notifyName' },
|
|
479
512
|
{ key: 'save', default: true },
|
|
480
513
|
]);
|
|
481
514
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
482
|
-
const
|
|
483
|
-
if (!
|
|
484
|
-
return
|
|
485
|
-
}
|
|
486
|
-
const assetPath =
|
|
487
|
-
const notifyClass =
|
|
488
|
-
const time =
|
|
489
|
-
const trackIndex =
|
|
515
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
516
|
+
if (!assetPathValidation.valid) {
|
|
517
|
+
return assetPathValidation.error;
|
|
518
|
+
}
|
|
519
|
+
const assetPath = assetPathValidation.sanitized;
|
|
520
|
+
const notifyClass = extractOptionalString(params, 'notifyClass');
|
|
521
|
+
const time = nonNegativeNumberOrDefault(params['time'], 0);
|
|
522
|
+
const trackIndex = nonNegativeIntegerOrDefault(params['trackIndex'], 0);
|
|
490
523
|
const notifyName = extractOptionalString(params, 'notifyName');
|
|
491
524
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
492
525
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -511,12 +544,12 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
511
544
|
{ key: 'save', default: true },
|
|
512
545
|
]);
|
|
513
546
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
514
|
-
const
|
|
515
|
-
if (!
|
|
516
|
-
return
|
|
547
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
548
|
+
if (!assetPathValidation.valid) {
|
|
549
|
+
return assetPathValidation.error;
|
|
517
550
|
}
|
|
518
|
-
const assetPath =
|
|
519
|
-
const blendTime =
|
|
551
|
+
const assetPath = assetPathValidation.sanitized;
|
|
552
|
+
const blendTime = nonNegativeNumberOrDefault(params['blendTime'], 0.25);
|
|
520
553
|
const blendOption = extractOptionalString(params, 'blendOption') ?? 'Linear';
|
|
521
554
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
522
555
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -539,12 +572,12 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
539
572
|
{ key: 'save', default: true },
|
|
540
573
|
]);
|
|
541
574
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
542
|
-
const
|
|
543
|
-
if (!
|
|
544
|
-
return
|
|
575
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
576
|
+
if (!assetPathValidation.valid) {
|
|
577
|
+
return assetPathValidation.error;
|
|
545
578
|
}
|
|
546
|
-
const assetPath =
|
|
547
|
-
const blendTime =
|
|
579
|
+
const assetPath = assetPathValidation.sanitized;
|
|
580
|
+
const blendTime = nonNegativeNumberOrDefault(params['blendTime'], 0.25);
|
|
548
581
|
const blendOption = extractOptionalString(params, 'blendOption') ?? 'Linear';
|
|
549
582
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
550
583
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -567,11 +600,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
567
600
|
{ key: 'save', default: true },
|
|
568
601
|
]);
|
|
569
602
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
570
|
-
const
|
|
571
|
-
if (!
|
|
572
|
-
return
|
|
603
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
604
|
+
if (!assetPathValidation.valid) {
|
|
605
|
+
return assetPathValidation.error;
|
|
573
606
|
}
|
|
574
|
-
const assetPath =
|
|
607
|
+
const assetPath = assetPathValidation.sanitized;
|
|
575
608
|
const fromSection = extractString(params, 'fromSection');
|
|
576
609
|
const toSection = extractString(params, 'toSection');
|
|
577
610
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
@@ -591,7 +624,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
591
624
|
const params = normalizeArgs(args, [
|
|
592
625
|
{ key: 'name', required: true },
|
|
593
626
|
{ key: 'path', aliases: ['directory'], default: '/Game/Animations' },
|
|
594
|
-
{ key: 'skeletonPath', required:
|
|
627
|
+
{ key: 'skeletonPath', required: false },
|
|
595
628
|
{ key: 'axisName', default: 'Speed' },
|
|
596
629
|
{ key: 'axisMin', default: 0 },
|
|
597
630
|
{ key: 'axisMax', default: 600 },
|
|
@@ -599,7 +632,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
599
632
|
]);
|
|
600
633
|
const name = extractString(params, 'name');
|
|
601
634
|
const path = extractOptionalString(params, 'path') ?? '/Game/Animations';
|
|
602
|
-
const skeletonPath =
|
|
635
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
603
636
|
const axisName = extractOptionalString(params, 'axisName') ?? 'Speed';
|
|
604
637
|
const axisMin = extractOptionalNumber(params, 'axisMin') ?? 0;
|
|
605
638
|
const axisMax = extractOptionalNumber(params, 'axisMax') ?? 600;
|
|
@@ -623,7 +656,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
623
656
|
const params = normalizeArgs(args, [
|
|
624
657
|
{ key: 'name', required: true },
|
|
625
658
|
{ key: 'path', aliases: ['directory'], default: '/Game/Animations' },
|
|
626
|
-
{ key: 'skeletonPath', required:
|
|
659
|
+
{ key: 'skeletonPath', required: false },
|
|
627
660
|
{ key: 'horizontalAxisName', default: 'Direction' },
|
|
628
661
|
{ key: 'horizontalMin', default: -180 },
|
|
629
662
|
{ key: 'horizontalMax', default: 180 },
|
|
@@ -634,7 +667,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
634
667
|
]);
|
|
635
668
|
const name = extractString(params, 'name');
|
|
636
669
|
const path = extractOptionalString(params, 'path') ?? '/Game/Animations';
|
|
637
|
-
const skeletonPath =
|
|
670
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
638
671
|
const horizontalAxisName = extractOptionalString(params, 'horizontalAxisName') ?? 'Direction';
|
|
639
672
|
const horizontalMin = extractOptionalNumber(params, 'horizontalMin') ?? -180;
|
|
640
673
|
const horizontalMax = extractOptionalNumber(params, 'horizontalMax') ?? 180;
|
|
@@ -668,17 +701,17 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
668
701
|
{ key: 'save', default: true },
|
|
669
702
|
]);
|
|
670
703
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
671
|
-
const
|
|
672
|
-
if (!
|
|
673
|
-
return
|
|
704
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
705
|
+
if (!assetPathValidation.valid) {
|
|
706
|
+
return assetPathValidation.error;
|
|
674
707
|
}
|
|
675
|
-
const assetPath =
|
|
708
|
+
const assetPath = assetPathValidation.sanitized;
|
|
676
709
|
const rawAnimationPath = extractString(params, 'animationPath');
|
|
677
|
-
const
|
|
678
|
-
if (!
|
|
679
|
-
return
|
|
710
|
+
const animationPathValidation = validatePath(rawAnimationPath, 'animationPath');
|
|
711
|
+
if (!animationPathValidation.valid) {
|
|
712
|
+
return animationPathValidation.error;
|
|
680
713
|
}
|
|
681
|
-
const animationPath =
|
|
714
|
+
const animationPath = animationPathValidation.sanitized;
|
|
682
715
|
const sampleValue = params['sampleValue'];
|
|
683
716
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
684
717
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -693,6 +726,34 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
693
726
|
}
|
|
694
727
|
return ResponseFactory.success(res, res.message ?? 'Blend sample added');
|
|
695
728
|
}
|
|
729
|
+
case 'force_rebuild_blend_space': {
|
|
730
|
+
const params = normalizeArgs(args, [
|
|
731
|
+
{ key: 'assetPath', aliases: ['blendSpacePath'], required: true },
|
|
732
|
+
{ key: 'rebuildBlendParameters', default: false },
|
|
733
|
+
{ key: 'compileReferencers', default: true },
|
|
734
|
+
{ key: 'save', default: true },
|
|
735
|
+
]);
|
|
736
|
+
const rawAssetPath = extractString(params, 'assetPath');
|
|
737
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
738
|
+
if (!assetPathValidation.valid) {
|
|
739
|
+
return assetPathValidation.error;
|
|
740
|
+
}
|
|
741
|
+
const assetPath = assetPathValidation.sanitized;
|
|
742
|
+
const rebuildBlendParameters = extractOptionalBoolean(params, 'rebuildBlendParameters') ?? false;
|
|
743
|
+
const compileReferencers = extractOptionalBoolean(params, 'compileReferencers') ?? true;
|
|
744
|
+
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
745
|
+
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
746
|
+
subAction: 'force_rebuild_blend_space',
|
|
747
|
+
assetPath,
|
|
748
|
+
rebuildBlendParameters,
|
|
749
|
+
compileReferencers,
|
|
750
|
+
save,
|
|
751
|
+
}));
|
|
752
|
+
if (res.success === false) {
|
|
753
|
+
return ResponseFactory.error(res.error ?? 'Failed to rebuild blend space', res.errorCode);
|
|
754
|
+
}
|
|
755
|
+
return ResponseFactory.success(res, res.message ?? 'Blend space rebuilt');
|
|
756
|
+
}
|
|
696
757
|
case 'set_axis_settings': {
|
|
697
758
|
const params = normalizeArgs(args, [
|
|
698
759
|
{ key: 'assetPath', required: true },
|
|
@@ -704,16 +765,16 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
704
765
|
{ key: 'save', default: true },
|
|
705
766
|
]);
|
|
706
767
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
707
|
-
const
|
|
708
|
-
if (!
|
|
709
|
-
return
|
|
768
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
769
|
+
if (!assetPathValidation.valid) {
|
|
770
|
+
return assetPathValidation.error;
|
|
710
771
|
}
|
|
711
|
-
const assetPath =
|
|
772
|
+
const assetPath = assetPathValidation.sanitized;
|
|
712
773
|
const axis = extractString(params, 'axis');
|
|
713
774
|
const axisName = extractOptionalString(params, 'axisName');
|
|
714
775
|
const minValue = extractOptionalNumber(params, 'minValue');
|
|
715
776
|
const maxValue = extractOptionalNumber(params, 'maxValue');
|
|
716
|
-
const gridDivisions =
|
|
777
|
+
const gridDivisions = optionalPositiveInteger(params['gridDivisions']);
|
|
717
778
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
718
779
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
719
780
|
subAction: 'set_axis_settings',
|
|
@@ -738,13 +799,13 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
738
799
|
{ key: 'save', default: true },
|
|
739
800
|
]);
|
|
740
801
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
741
|
-
const
|
|
742
|
-
if (!
|
|
743
|
-
return
|
|
802
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
803
|
+
if (!assetPathValidation.valid) {
|
|
804
|
+
return assetPathValidation.error;
|
|
744
805
|
}
|
|
745
|
-
const assetPath =
|
|
806
|
+
const assetPath = assetPathValidation.sanitized;
|
|
746
807
|
const interpolationType = extractOptionalString(params, 'interpolationType') ?? 'Lerp';
|
|
747
|
-
const targetWeightInterpolationSpeed =
|
|
808
|
+
const targetWeightInterpolationSpeed = nonNegativeNumberOrDefault(params['targetWeightInterpolationSpeed'], 5.0);
|
|
748
809
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
749
810
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
750
811
|
subAction: 'set_interpolation_settings',
|
|
@@ -762,12 +823,12 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
762
823
|
const params = normalizeArgs(args, [
|
|
763
824
|
{ key: 'name', required: true },
|
|
764
825
|
{ key: 'path', aliases: ['directory'], default: '/Game/Animations' },
|
|
765
|
-
{ key: 'skeletonPath', required:
|
|
826
|
+
{ key: 'skeletonPath', required: false },
|
|
766
827
|
{ key: 'save', default: true },
|
|
767
828
|
]);
|
|
768
829
|
const name = extractString(params, 'name');
|
|
769
830
|
const path = extractOptionalString(params, 'path') ?? '/Game/Animations';
|
|
770
|
-
const skeletonPath =
|
|
831
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
771
832
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
772
833
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
773
834
|
subAction: 'create_aim_offset',
|
|
@@ -790,17 +851,17 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
790
851
|
{ key: 'save', default: true },
|
|
791
852
|
]);
|
|
792
853
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
793
|
-
const
|
|
794
|
-
if (!
|
|
795
|
-
return
|
|
854
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
855
|
+
if (!assetPathValidation.valid) {
|
|
856
|
+
return assetPathValidation.error;
|
|
796
857
|
}
|
|
797
|
-
const assetPath =
|
|
858
|
+
const assetPath = assetPathValidation.sanitized;
|
|
798
859
|
const rawAnimationPath = extractString(params, 'animationPath');
|
|
799
|
-
const
|
|
800
|
-
if (!
|
|
801
|
-
return
|
|
860
|
+
const animationPathValidation = validatePath(rawAnimationPath, 'animationPath');
|
|
861
|
+
if (!animationPathValidation.valid) {
|
|
862
|
+
return animationPathValidation.error;
|
|
802
863
|
}
|
|
803
|
-
const animationPath =
|
|
864
|
+
const animationPath = animationPathValidation.sanitized;
|
|
804
865
|
const yaw = extractOptionalNumber(params, 'yaw') ?? 0;
|
|
805
866
|
const pitch = extractOptionalNumber(params, 'pitch') ?? 0;
|
|
806
867
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
@@ -823,13 +884,13 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
823
884
|
const params = normalizeArgs(args, [
|
|
824
885
|
{ key: 'name', required: true },
|
|
825
886
|
{ key: 'path', aliases: ['directory', 'savePath'], default: '/Game/Blueprints' },
|
|
826
|
-
{ key: 'skeletonPath', required:
|
|
887
|
+
{ key: 'skeletonPath', required: false },
|
|
827
888
|
{ key: 'parentClass', aliases: ['parent'], default: 'AnimInstance' },
|
|
828
889
|
{ key: 'save', default: true },
|
|
829
890
|
]);
|
|
830
891
|
const name = extractString(params, 'name');
|
|
831
892
|
const path = extractOptionalString(params, 'path') ?? '/Game/Blueprints';
|
|
832
|
-
const skeletonPath =
|
|
893
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
833
894
|
const parentClass = extractOptionalString(params, 'parentClass') ?? 'AnimInstance';
|
|
834
895
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
835
896
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -852,11 +913,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
852
913
|
{ key: 'save', default: true },
|
|
853
914
|
]);
|
|
854
915
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
855
|
-
const
|
|
856
|
-
if (!
|
|
857
|
-
return
|
|
916
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
917
|
+
if (!blueprintPathValidation.valid) {
|
|
918
|
+
return blueprintPathValidation.error;
|
|
858
919
|
}
|
|
859
|
-
const blueprintPath =
|
|
920
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
860
921
|
const stateMachineName = extractString(params, 'stateMachineName');
|
|
861
922
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
862
923
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -880,11 +941,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
880
941
|
{ key: 'save', default: true },
|
|
881
942
|
]);
|
|
882
943
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
883
|
-
const
|
|
884
|
-
if (!
|
|
885
|
-
return
|
|
944
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
945
|
+
if (!blueprintPathValidation.valid) {
|
|
946
|
+
return blueprintPathValidation.error;
|
|
886
947
|
}
|
|
887
|
-
const blueprintPath =
|
|
948
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
888
949
|
const stateMachineName = extractString(params, 'stateMachineName');
|
|
889
950
|
const stateName = extractString(params, 'stateName');
|
|
890
951
|
const rawAnimationPath = extractOptionalString(params, 'animationPath');
|
|
@@ -917,11 +978,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
917
978
|
{ key: 'save', default: true },
|
|
918
979
|
]);
|
|
919
980
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
920
|
-
const
|
|
921
|
-
if (!
|
|
922
|
-
return
|
|
981
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
982
|
+
if (!blueprintPathValidation.valid) {
|
|
983
|
+
return blueprintPathValidation.error;
|
|
923
984
|
}
|
|
924
|
-
const blueprintPath =
|
|
985
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
925
986
|
const stateMachineName = extractString(params, 'stateMachineName');
|
|
926
987
|
const fromState = extractString(params, 'fromState');
|
|
927
988
|
const toState = extractString(params, 'toState');
|
|
@@ -952,15 +1013,15 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
952
1013
|
{ key: 'save', default: true },
|
|
953
1014
|
]);
|
|
954
1015
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
955
|
-
const
|
|
956
|
-
if (!
|
|
957
|
-
return
|
|
1016
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
1017
|
+
if (!blueprintPathValidation.valid) {
|
|
1018
|
+
return blueprintPathValidation.error;
|
|
958
1019
|
}
|
|
959
|
-
const blueprintPath =
|
|
1020
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
960
1021
|
const stateMachineName = extractString(params, 'stateMachineName');
|
|
961
1022
|
const fromState = extractString(params, 'fromState');
|
|
962
1023
|
const toState = extractString(params, 'toState');
|
|
963
|
-
const blendTime =
|
|
1024
|
+
const blendTime = nonNegativeNumberOrDefault(params['blendTime'], 0.2);
|
|
964
1025
|
const blendLogicType = extractOptionalString(params, 'blendLogicType') ?? 'StandardBlend';
|
|
965
1026
|
const automaticTriggerRule = extractOptionalString(params, 'automaticTriggerRule');
|
|
966
1027
|
const automaticTriggerTime = extractOptionalNumber(params, 'automaticTriggerTime');
|
|
@@ -992,11 +1053,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
992
1053
|
{ key: 'save', default: true },
|
|
993
1054
|
]);
|
|
994
1055
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
995
|
-
const
|
|
996
|
-
if (!
|
|
997
|
-
return
|
|
1056
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
1057
|
+
if (!blueprintPathValidation.valid) {
|
|
1058
|
+
return blueprintPathValidation.error;
|
|
998
1059
|
}
|
|
999
|
-
const blueprintPath =
|
|
1060
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
1000
1061
|
const blendType = extractString(params, 'blendType');
|
|
1001
1062
|
const nodeName = extractOptionalString(params, 'nodeName');
|
|
1002
1063
|
const x = extractOptionalNumber(params, 'x') ?? 0;
|
|
@@ -1023,11 +1084,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1023
1084
|
{ key: 'save', default: true },
|
|
1024
1085
|
]);
|
|
1025
1086
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
1026
|
-
const
|
|
1027
|
-
if (!
|
|
1028
|
-
return
|
|
1087
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
1088
|
+
if (!blueprintPathValidation.valid) {
|
|
1089
|
+
return blueprintPathValidation.error;
|
|
1029
1090
|
}
|
|
1030
|
-
const blueprintPath =
|
|
1091
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
1031
1092
|
const cacheName = extractString(params, 'cacheName');
|
|
1032
1093
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1033
1094
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -1048,11 +1109,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1048
1109
|
{ key: 'save', default: true },
|
|
1049
1110
|
]);
|
|
1050
1111
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
1051
|
-
const
|
|
1052
|
-
if (!
|
|
1053
|
-
return
|
|
1112
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
1113
|
+
if (!blueprintPathValidation.valid) {
|
|
1114
|
+
return blueprintPathValidation.error;
|
|
1054
1115
|
}
|
|
1055
|
-
const blueprintPath =
|
|
1116
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
1056
1117
|
const slotName = extractString(params, 'slotName');
|
|
1057
1118
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1058
1119
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -1073,11 +1134,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1073
1134
|
{ key: 'save', default: true },
|
|
1074
1135
|
]);
|
|
1075
1136
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
1076
|
-
const
|
|
1077
|
-
if (!
|
|
1078
|
-
return
|
|
1137
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
1138
|
+
if (!blueprintPathValidation.valid) {
|
|
1139
|
+
return blueprintPathValidation.error;
|
|
1079
1140
|
}
|
|
1080
|
-
const blueprintPath =
|
|
1141
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
1081
1142
|
const layerSetup = extractOptionalArray(params, 'layerSetup');
|
|
1082
1143
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1083
1144
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
@@ -1100,11 +1161,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1100
1161
|
{ key: 'save', default: true },
|
|
1101
1162
|
]);
|
|
1102
1163
|
const rawBlueprintPath = extractString(params, 'blueprintPath');
|
|
1103
|
-
const
|
|
1104
|
-
if (!
|
|
1105
|
-
return
|
|
1164
|
+
const blueprintPathValidation = validatePath(rawBlueprintPath, 'blueprintPath');
|
|
1165
|
+
if (!blueprintPathValidation.valid) {
|
|
1166
|
+
return blueprintPathValidation.error;
|
|
1106
1167
|
}
|
|
1107
|
-
const blueprintPath =
|
|
1168
|
+
const blueprintPath = blueprintPathValidation.sanitized;
|
|
1108
1169
|
const nodeName = extractString(params, 'nodeName');
|
|
1109
1170
|
const propertyName = extractString(params, 'propertyName');
|
|
1110
1171
|
const value = params['value'];
|
|
@@ -1126,18 +1187,21 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1126
1187
|
const params = normalizeArgs(args, [
|
|
1127
1188
|
{ key: 'name', required: true },
|
|
1128
1189
|
{ key: 'path', aliases: ['directory'], default: '/Game/ControlRigs' },
|
|
1129
|
-
{ key: 'skeletalMeshPath', required:
|
|
1190
|
+
{ key: 'skeletalMeshPath', required: false },
|
|
1191
|
+
{ key: 'skeletonPath', required: false },
|
|
1130
1192
|
{ key: 'save', default: true },
|
|
1131
1193
|
]);
|
|
1132
1194
|
const name = extractString(params, 'name');
|
|
1133
1195
|
const path = extractOptionalString(params, 'path') ?? '/Game/ControlRigs';
|
|
1134
|
-
const skeletalMeshPath =
|
|
1196
|
+
const skeletalMeshPath = extractOptionalString(params, 'skeletalMeshPath');
|
|
1197
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
1135
1198
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1136
1199
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1137
1200
|
subAction: 'create_control_rig',
|
|
1138
1201
|
name,
|
|
1139
1202
|
path,
|
|
1140
1203
|
skeletalMeshPath,
|
|
1204
|
+
skeletonPath,
|
|
1141
1205
|
save,
|
|
1142
1206
|
}));
|
|
1143
1207
|
if (res.success === false) {
|
|
@@ -1147,19 +1211,18 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1147
1211
|
}
|
|
1148
1212
|
case 'add_control': {
|
|
1149
1213
|
const params = normalizeArgs(args, [
|
|
1150
|
-
{ key: 'assetPath', required:
|
|
1214
|
+
{ key: 'assetPath', required: false },
|
|
1151
1215
|
{ key: 'controlName', required: true },
|
|
1152
1216
|
{ key: 'controlType', default: 'Transform' },
|
|
1153
1217
|
{ key: 'parentBone' },
|
|
1154
1218
|
{ key: 'parentControl' },
|
|
1155
1219
|
{ key: 'save', default: true },
|
|
1156
1220
|
]);
|
|
1157
|
-
const rawAssetPath =
|
|
1158
|
-
const
|
|
1159
|
-
if (!
|
|
1160
|
-
return
|
|
1221
|
+
const rawAssetPath = extractOptionalString(params, 'assetPath');
|
|
1222
|
+
const assetPath = rawAssetPath ? validatePath(rawAssetPath, 'assetPath') : undefined;
|
|
1223
|
+
if (assetPath && !assetPath.valid) {
|
|
1224
|
+
return assetPath.error;
|
|
1161
1225
|
}
|
|
1162
|
-
const assetPath = pathValidation.sanitized;
|
|
1163
1226
|
const controlName = extractString(params, 'controlName');
|
|
1164
1227
|
const controlType = extractOptionalString(params, 'controlType') ?? 'Transform';
|
|
1165
1228
|
const parentBone = extractOptionalString(params, 'parentBone');
|
|
@@ -1167,7 +1230,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1167
1230
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1168
1231
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1169
1232
|
subAction: 'add_control',
|
|
1170
|
-
assetPath,
|
|
1233
|
+
assetPath: assetPath?.sanitized,
|
|
1171
1234
|
controlName,
|
|
1172
1235
|
controlType,
|
|
1173
1236
|
parentBone,
|
|
@@ -1181,25 +1244,24 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1181
1244
|
}
|
|
1182
1245
|
case 'add_rig_unit': {
|
|
1183
1246
|
const params = normalizeArgs(args, [
|
|
1184
|
-
{ key: 'assetPath', required:
|
|
1247
|
+
{ key: 'assetPath', required: false },
|
|
1185
1248
|
{ key: 'unitType', required: true },
|
|
1186
1249
|
{ key: 'unitName' },
|
|
1187
1250
|
{ key: 'settings' },
|
|
1188
1251
|
{ key: 'save', default: true },
|
|
1189
1252
|
]);
|
|
1190
|
-
const rawAssetPath =
|
|
1191
|
-
const
|
|
1192
|
-
if (!
|
|
1193
|
-
return
|
|
1253
|
+
const rawAssetPath = extractOptionalString(params, 'assetPath');
|
|
1254
|
+
const assetPath = rawAssetPath ? validatePath(rawAssetPath, 'assetPath') : undefined;
|
|
1255
|
+
if (assetPath && !assetPath.valid) {
|
|
1256
|
+
return assetPath.error;
|
|
1194
1257
|
}
|
|
1195
|
-
const assetPath = pathValidation.sanitized;
|
|
1196
1258
|
const unitType = extractString(params, 'unitType');
|
|
1197
1259
|
const unitName = extractOptionalString(params, 'unitName');
|
|
1198
1260
|
const settings = extractOptionalObject(params, 'settings');
|
|
1199
1261
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1200
1262
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1201
1263
|
subAction: 'add_rig_unit',
|
|
1202
|
-
assetPath,
|
|
1264
|
+
assetPath: assetPath?.sanitized,
|
|
1203
1265
|
unitType,
|
|
1204
1266
|
unitName,
|
|
1205
1267
|
settings,
|
|
@@ -1212,19 +1274,18 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1212
1274
|
}
|
|
1213
1275
|
case 'connect_rig_elements': {
|
|
1214
1276
|
const params = normalizeArgs(args, [
|
|
1215
|
-
{ key: 'assetPath', required:
|
|
1277
|
+
{ key: 'assetPath', required: false },
|
|
1216
1278
|
{ key: 'sourceElement', required: true },
|
|
1217
1279
|
{ key: 'sourcePin', required: true },
|
|
1218
1280
|
{ key: 'targetElement', required: true },
|
|
1219
1281
|
{ key: 'targetPin', required: true },
|
|
1220
1282
|
{ key: 'save', default: true },
|
|
1221
1283
|
]);
|
|
1222
|
-
const rawAssetPath =
|
|
1223
|
-
const
|
|
1224
|
-
if (!
|
|
1225
|
-
return
|
|
1284
|
+
const rawAssetPath = extractOptionalString(params, 'assetPath');
|
|
1285
|
+
const assetPath = rawAssetPath ? validatePath(rawAssetPath, 'assetPath') : undefined;
|
|
1286
|
+
if (assetPath && !assetPath.valid) {
|
|
1287
|
+
return assetPath.error;
|
|
1226
1288
|
}
|
|
1227
|
-
const assetPath = pathValidation.sanitized;
|
|
1228
1289
|
const sourceElement = extractString(params, 'sourceElement');
|
|
1229
1290
|
const sourcePin = extractString(params, 'sourcePin');
|
|
1230
1291
|
const targetElement = extractString(params, 'targetElement');
|
|
@@ -1232,7 +1293,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1232
1293
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1233
1294
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1234
1295
|
subAction: 'connect_rig_elements',
|
|
1235
|
-
assetPath,
|
|
1296
|
+
assetPath: assetPath?.sanitized,
|
|
1236
1297
|
sourceElement,
|
|
1237
1298
|
sourcePin,
|
|
1238
1299
|
targetElement,
|
|
@@ -1253,7 +1314,12 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1253
1314
|
]);
|
|
1254
1315
|
const name = extractString(params, 'name');
|
|
1255
1316
|
const path = extractOptionalString(params, 'path') ?? '/Game/Animations';
|
|
1256
|
-
const
|
|
1317
|
+
const rawSkeletonPath = extractString(params, 'skeletonPath');
|
|
1318
|
+
const skeletonPathValidation = validatePath(rawSkeletonPath, 'skeletonPath');
|
|
1319
|
+
if (!skeletonPathValidation.valid) {
|
|
1320
|
+
return skeletonPathValidation.error;
|
|
1321
|
+
}
|
|
1322
|
+
const skeletonPath = skeletonPathValidation.sanitized;
|
|
1257
1323
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1258
1324
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1259
1325
|
subAction: 'create_pose_library',
|
|
@@ -1271,18 +1337,21 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1271
1337
|
const params = normalizeArgs(args, [
|
|
1272
1338
|
{ key: 'name', required: true },
|
|
1273
1339
|
{ key: 'path', aliases: ['directory'], default: '/Game/Retargeting' },
|
|
1274
|
-
{ key: 'skeletalMeshPath', required:
|
|
1340
|
+
{ key: 'skeletalMeshPath', required: false },
|
|
1341
|
+
{ key: 'skeletonPath', required: false },
|
|
1275
1342
|
{ key: 'save', default: true },
|
|
1276
1343
|
]);
|
|
1277
1344
|
const name = extractString(params, 'name');
|
|
1278
1345
|
const path = extractOptionalString(params, 'path') ?? '/Game/Retargeting';
|
|
1279
|
-
const skeletalMeshPath =
|
|
1346
|
+
const skeletalMeshPath = extractOptionalString(params, 'skeletalMeshPath');
|
|
1347
|
+
const skeletonPath = extractOptionalString(params, 'skeletonPath');
|
|
1280
1348
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1281
1349
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1282
1350
|
subAction: 'create_ik_rig',
|
|
1283
1351
|
name,
|
|
1284
1352
|
path,
|
|
1285
1353
|
skeletalMeshPath,
|
|
1354
|
+
skeletonPath,
|
|
1286
1355
|
save,
|
|
1287
1356
|
}));
|
|
1288
1357
|
if (res.success === false) {
|
|
@@ -1292,19 +1361,18 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1292
1361
|
}
|
|
1293
1362
|
case 'add_ik_chain': {
|
|
1294
1363
|
const params = normalizeArgs(args, [
|
|
1295
|
-
{ key: 'assetPath', required:
|
|
1364
|
+
{ key: 'assetPath', required: false },
|
|
1296
1365
|
{ key: 'chainName', required: true },
|
|
1297
1366
|
{ key: 'startBone', required: true },
|
|
1298
1367
|
{ key: 'endBone', required: true },
|
|
1299
1368
|
{ key: 'goal' },
|
|
1300
1369
|
{ key: 'save', default: true },
|
|
1301
1370
|
]);
|
|
1302
|
-
const rawAssetPath =
|
|
1303
|
-
const
|
|
1304
|
-
if (!
|
|
1305
|
-
return
|
|
1371
|
+
const rawAssetPath = extractOptionalString(params, 'assetPath');
|
|
1372
|
+
const assetPath = rawAssetPath ? validatePath(rawAssetPath, 'assetPath') : undefined;
|
|
1373
|
+
if (assetPath && !assetPath.valid) {
|
|
1374
|
+
return assetPath.error;
|
|
1306
1375
|
}
|
|
1307
|
-
const assetPath = pathValidation.sanitized;
|
|
1308
1376
|
const chainName = extractString(params, 'chainName');
|
|
1309
1377
|
const startBone = extractString(params, 'startBone');
|
|
1310
1378
|
const endBone = extractString(params, 'endBone');
|
|
@@ -1312,7 +1380,7 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1312
1380
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1313
1381
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1314
1382
|
subAction: 'add_ik_chain',
|
|
1315
|
-
assetPath,
|
|
1383
|
+
assetPath: assetPath?.sanitized,
|
|
1316
1384
|
chainName,
|
|
1317
1385
|
startBone,
|
|
1318
1386
|
endBone,
|
|
@@ -1352,23 +1420,22 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1352
1420
|
}
|
|
1353
1421
|
case 'set_retarget_chain_mapping': {
|
|
1354
1422
|
const params = normalizeArgs(args, [
|
|
1355
|
-
{ key: 'assetPath', required:
|
|
1423
|
+
{ key: 'assetPath', required: false },
|
|
1356
1424
|
{ key: 'sourceChain', required: true },
|
|
1357
1425
|
{ key: 'targetChain', required: true },
|
|
1358
1426
|
{ key: 'save', default: true },
|
|
1359
1427
|
]);
|
|
1360
|
-
const rawAssetPath =
|
|
1361
|
-
const
|
|
1362
|
-
if (!
|
|
1363
|
-
return
|
|
1428
|
+
const rawAssetPath = extractOptionalString(params, 'assetPath');
|
|
1429
|
+
const assetPath = rawAssetPath ? validatePath(rawAssetPath, 'assetPath') : undefined;
|
|
1430
|
+
if (assetPath && !assetPath.valid) {
|
|
1431
|
+
return assetPath.error;
|
|
1364
1432
|
}
|
|
1365
|
-
const assetPath = pathValidation.sanitized;
|
|
1366
1433
|
const sourceChain = extractString(params, 'sourceChain');
|
|
1367
1434
|
const targetChain = extractString(params, 'targetChain');
|
|
1368
1435
|
const save = extractOptionalBoolean(params, 'save') ?? true;
|
|
1369
1436
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1370
1437
|
subAction: 'set_retarget_chain_mapping',
|
|
1371
|
-
assetPath,
|
|
1438
|
+
assetPath: assetPath?.sanitized,
|
|
1372
1439
|
sourceChain,
|
|
1373
1440
|
targetChain,
|
|
1374
1441
|
save,
|
|
@@ -1383,11 +1450,11 @@ export async function handleAnimationAuthoringTools(action, args, tools) {
|
|
|
1383
1450
|
{ key: 'assetPath', required: true },
|
|
1384
1451
|
]);
|
|
1385
1452
|
const rawAssetPath = extractString(params, 'assetPath');
|
|
1386
|
-
const
|
|
1387
|
-
if (!
|
|
1388
|
-
return
|
|
1453
|
+
const assetPathValidation = validatePath(rawAssetPath, 'assetPath');
|
|
1454
|
+
if (!assetPathValidation.valid) {
|
|
1455
|
+
return assetPathValidation.error;
|
|
1389
1456
|
}
|
|
1390
|
-
const assetPath =
|
|
1457
|
+
const assetPath = assetPathValidation.sanitized;
|
|
1391
1458
|
const res = (await executeAutomationRequest(tools, 'manage_animation_authoring', {
|
|
1392
1459
|
subAction: 'get_animation_info',
|
|
1393
1460
|
assetPath,
|