Page MenuHomeFeedback Tracker

[Feature Request] New scripting command for reading animation parameters
New, NormalPublic

Description

Unfortunately, there's no way to determine which selection gets animated when using the "animate" command. (unless you have access to the model config, which is not accessible in-game), and the animation type, its range of motion, etc. are not accessible either.

These command can be useful when combined with the intersect and animate commands to open building doors, as well as detecting its range and type of motion (e.g. rotating or sliding door, etc.)

The following parameters are requested:

class Animations
{
    class FrontWheelR
    {
        type = "rotationX";            // The type of animation.
        source = "wheel";            // The controller that provides input.
        selection = "pravy predni";    // The name of the skeleton bone used.
        axis = "";                    // The name of the axis in the model.
        memory = true;                // Is the axis defined in the memory LOD of the model or not?
        sourceAddress = "loop";        // Does the animation loop or not?

        minValue = 0;                // The minimum value of the motion range.
                                    // i.e. The controller input when animation phase is 0.

        maxValue = 1;                // The maximum value of the motion range.
                                    // i.e. The controller input when animation phase is 1.

        angle0 = 0;                    // The starting angle of this animation, where the
                                    // animation phase is minValue

        angle1 = "rad -360";        // The ending angle of this animation,
    };                                // where the animation phase is maxValue
};

Requested commands:

getAnimationParams obj

returns an array of:

[
	"AnimationName",
	[
		"selectionName",       // selection it animates
		"sourceName",          // animation source, e.g. "wheel"
		["rotationX", "loop"], // animation type and its sourceAddress
		["axisName", true],    // name of axis, and whether it's defined in the mem LOD
		[0, 1],                // minValue, maxValue
		[0, 1],                // phaseBeg, phaseEnd
		
		// last element is anim values based on type:
		
		// If rotation:
		[0, 6.28]                //angle0, angle1
		
		// If translation:
		[0, 10]                  //offset0, offset1
		
		// If hide:
		[0, 1]                   //hide value, unhide value
		
		// If direct:
		[[0,0,0], [0,0,1], 1, 2] // axis pos, axis dir, angle, offset
	]
]
  1. (optional) A binary command that returns the array of parameters for the specified animation:
object getAnimationParams "animationName"

Returns the array of anim parameter (see above)

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Feature Request

Event Timeline

Leopard20 updated the task description. (Show Details)
Leopard20 updated the task description. (Show Details)Apr 1 2020, 11:49 AM
dedmen claimed this task.May 28 2020, 8:55 PM
7erra added a subscriber: 7erra.May 30 2020, 1:38 PM
This comment was removed by Leopard20.
dedmen removed dedmen as the assignee of this task.May 24 2022, 2:48 PM
dedmen added a subscriber: dedmen.
Leopard20 renamed this task from [Feature Request] New scripting command for getting the selectionName of animations to [Feature Request] New scripting command for reading animation parameters.May 24 2022, 2:56 PM
Leopard20 updated the task description. (Show Details)
Leopard20 updated the task description. (Show Details)May 24 2022, 3:14 PM
Leopard20 renamed this task from [Feature Request] New scripting command for reading animation parameters to [Feature Request] New scripting command for reading animation parameters and bone hierarchy.Jul 5 2022, 6:18 PM
Leopard20 updated the task description. (Show Details)
h- added a subscriber: h-.Jul 6 2022, 9:35 AM
Leopard20 updated the task description. (Show Details)Jul 12 2022, 3:10 PM
Leopard20 updated the task description. (Show Details)Jul 12 2022, 3:13 PM
Leopard20 updated the task description. (Show Details)Jul 12 2022, 3:16 PM
Leopard20 renamed this task from [Feature Request] New scripting command for reading animation parameters and bone hierarchy to [Feature Request] New scripting command for reading animation parameters.Sep 10 2022, 7:07 PM
Leopard20 updated the task description. (Show Details)