Batch processing method, device, terminal and storage medium of animation state machine

By acquiring and processing data and references of the animation state machine, the problem of low batch processing efficiency of animation state machine in the game is solved, and efficient batch processing of animation state machine is realized, reducing labor costs.

CN113870397BActive Publication Date: 2025-03-04AIRLOOK TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111125556.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2025-03-04
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

In the prior art, the batch processing efficiency of a large number of animation state machines in the game is low, and the parameters of the animation state machine need to be manually modified, resulting in low efficiency.

Method used

By acquiring multiple animation state machine data, a reference to the initial animation state and target animation state of each animation state machine is determined, the initial animation transition data is determined based on these references, and an animation state transition trigger instruction is received, and the initial animation transition data of the animation state machine is batch modified to determine the target animation transition data.

Benefits of technology

The batch processing of multiple animation state machines is realized, reducing labor costs and improving processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113870397B_ABST
    Figure CN113870397B_ABST
Patent Text Reader

Abstract

The present application discloses a batch processing method, device, terminal and storage medium of an animation state machine. The method comprises: obtaining a plurality of animation state machine data; determining a reference of an initial animation state and a reference of a target animation state of each animation state machine based on the plurality of animation state machine data; determining the initial animation transition data of each animation state machine based on the reference of the initial animation state and the reference of the target animation state; receiving an animation state transition trigger instruction, and determining the target animation transition data of a plurality of animation state machines based on the animation state transition trigger instruction and the initial animation transition data. The present invention reduces the labor cost and improves the efficiency of processing the animation state machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of animation state machines, and in particular to a batch processing method, device, terminal and storage medium of an animation state machine. Background Art

[0002] The Unity engine is used in various games. There are a large number of characters in each game. The state of each character is controlled by its animation state machine. How to batch process a large number of animation state machines in the game has become an urgent problem to be solved.

[0003] At present, for the large number of animation state machines in the game, manual modification is generally adopted. For example, whenever there is a need to modify animation speed, transition time, change animation conditions and other animation state machine related parameters, planners and artists manually modify the parameters of each animation state machine to ensure the normal conversion of the character state.

[0004] However, the above method has the problem of low efficiency. Summary of the invention

[0005] The main purpose of the present application is to provide a batch processing method, device, terminal and storage medium for an animation state machine to solve the problem of low efficiency of manual processing in related technologies.

[0006] In order to achieve the above objectives, in a first aspect, the present application provides a batch processing method of an animation state machine, comprising:

[0007] Get multiple animation state machine data;

[0008] Based on the plurality of animation state machine data, determining a reference to an initial animation state and a reference to a target animation state of each animation state machine;

[0009] Determine initial animation transition data for each animation state machine based on a reference to the initial animation state and a reference to the target animation state;

[0010] An animation state transition trigger instruction is received, and target animation transition data of a plurality of animation state machines is determined based on the animation state transition trigger instruction and the initial animation transition data.

[0011] In a possible implementation, based on multiple animation state machine data, determining a reference to an initial animation state and a reference to a target animation state of each animation state machine includes:

[0012] determining an initial animation state and a target animation state for each of the plurality of animation state machines;

[0013] Receive first input data of an input box corresponding to an initial animation state, and obtain a reference to the initial animation state based on the first input data, and receive second input data of an input box corresponding to a target animation state, and obtain a reference to the target animation state based on the second input data.

[0014] In one possible implementation, initial animation transition data of each animation state machine is determined based on a reference to the initial animation state and a reference to the target animation state, including:

[0015] Call the animation state transition function corresponding to the reference of the initial animation state and the reference of the target animation state;

[0016] Using the animation state transition function, determine the initial animation transition data for each animation state machine.

[0017] In a possible implementation, receiving an animation state transition trigger instruction, and determining target animation transition data of multiple animation state machines based on the animation state transition trigger instruction and initial animation transition data, includes:

[0018] Receive an animation state one-way transition trigger instruction, modify initial animation transition data based on the animation state one-way transition trigger instruction, and obtain target animation transition data of multiple animation state machines;

[0019] An animation state two-way transition trigger instruction is received, initial animation transition data is modified based on the animation state two-way transition trigger instruction, and target animation transition data of multiple animation state machines is obtained.

[0020] In a possible implementation, an animation state unidirectional transition trigger instruction is received, initial animation transition data is modified based on the animation state unidirectional transition trigger instruction, and target animation transition data of multiple animation state machines is obtained, including:

[0021] receiving a first trigger instruction corresponding to a transition of an animation state from an initial animation state to a target animation state, modifying initial animation transition data based on the first trigger instruction, and obtaining target animation transition data of multiple animation state machines;

[0022] A second trigger instruction corresponding to the transition of the animation state from the target animation state to the initial animation state is received, and the initial animation transition data is modified based on the second trigger instruction to obtain the target animation transition data of the plurality of animation state machines.

[0023] In a possible implementation, an animation state bidirectional transition trigger instruction is received, initial animation transition data is modified based on the animation state bidirectional transition trigger instruction, and target animation transition data of multiple animation state machines is obtained, including:

[0024] Receive a third trigger instruction corresponding to the transition of the animation state from the initial animation state to the target animation state and the transition of the animation state from the target animation state to the initial animation state, modify the initial animation transition data based on the third trigger instruction, and obtain the target animation transition data of multiple animation state machines.

[0025] In a possible implementation, before obtaining the data of multiple animation state machines, the following is also included:

[0026] Call the unity engine interface to search for animation state machine type files in the target path folder to obtain multiple animation state machine files;

[0027] Based on the multiple animation state machine files, multiple animation state machine data are determined.

[0028] In a second aspect, an embodiment of the present invention provides a batch processing device for an animation state machine, comprising:

[0029] Data acquisition module, used to obtain multiple animation state machine data;

[0030] A reference determination module, used for determining a reference of an initial animation state and a reference of a target animation state of each animation state machine based on a plurality of animation state machine data;

[0031] An initial data determination module, for determining initial animation transition data of each animation state machine based on a reference to an initial animation state and a reference to a target animation state;

[0032] The target data determination module is used to receive the animation state transition trigger instruction and determine the target animation transition data of multiple animation state machines based on the animation state transition trigger instruction and the initial animation transition data.

[0033] In a third aspect, an embodiment of the present invention provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned batch processing methods of an animation state machine when executing the computer program.

[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the batch processing method of any of the above animation state machines are implemented.

[0035] The embodiment of the present invention provides a batch processing method, device, terminal and storage medium of an animation state machine, including: obtaining multiple animation state machine data, determining the reference of the initial animation state and the reference of the target animation state of each animation state machine based on the multiple animation state machine data, and then determining the initial animation transition data of each animation state machine based on the reference of the initial animation state and the reference of the target animation state, and then receiving an animation state transition trigger instruction, and determining the target animation transition data of multiple animation state machines based on the animation state transition trigger instruction and the initial animation transition data. The present invention not only reduces the labor cost but also improves the efficiency of processing animation state machines by creating an editor button corresponding to the initial animation state and the target animation state transition, and by receiving the trigger instruction of the editor button, batch modifies the initial animation transition data of all animation state machines to determine the target animation transition data of all animation state machines. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The schematic embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application. In the drawings:

[0037] Figure 1 is a schematic diagram of an interface for animation state transition provided by an embodiment of the present invention;

[0038] Figure 2 It is a schematic diagram of a parameter setting interface for an animation transition from a standing state to a dead state provided by an embodiment of the present invention;

[0039] Figure 3 It is a flow chart of an implementation method of a batch processing method of an animation state machine provided by an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of an animation state machine type file screening program provided by an embodiment of the present invention;

[0041] Figure 5 is a schematic diagram showing all animation state machine data provided by an embodiment of the present invention;

[0042] Figure 6 It is a schematic diagram of creating an animation state machine reference input box provided by an embodiment of the present invention;

[0043] Figure 7 is a schematic diagram of a data structure of an animation state transition provided by an embodiment of the present invention;

[0044] Figure 8 It is a schematic diagram of an interface setting of an editor corresponding to the data structure of animation state transition provided by an embodiment of the present invention;

[0045] Fig. 9 It is a schematic diagram of an interface of an editor trigger button corresponding to the state transition mode of the animation state machine provided in an embodiment of the present invention;

[0046] Fig.10 It is a structural schematic diagram of a batch processing device of an animation state machine provided by an embodiment of the present invention;

[0047] Fig.11 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.

[0050] It should be understood that in various embodiments of the present invention, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0051] It should be understood that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.

[0052] It should be understood that in the present invention, "plurality" refers to two or more than two. "And / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "Contains A, B and C", "Contains A, B, C" means that A, B, and C are all included, "Contains A, B or C" means that one of A, B, and C is included, and "Contains A, B and / or C" means that any one, any two, or any three of A, B, and C are included.

[0053] It should be understood that in the present invention, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A and B can be determined based on A. Determining B based on A does not mean determining B based only on A, but B can also be determined based on A and / or other information. A and B match when the similarity between A and B is greater than or equal to a preset threshold.

[0054] Depending on the context, "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting."

[0055] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0056] In order to facilitate understanding of the technical solution of the present invention, the professional terms appearing in the specific embodiments are explained as follows:

[0057] Animator Controller (animation state machine): Unity is used to manage multiple animation playback states. It allows you to manage your animation sequence and trigger conditions by dragging and dropping, thereby achieving complex animation or interactive effects.

[0058] Animation: Record the state of an object at a certain moment in the form of a time frame, and then switch it in a certain order and time interval. This is the same principle for animation in all software.

[0059] Animation State Transitions: refers to the behavioral events that occur when one animation state transitions to another.

[0060] When creating applications with Unity, there is often a need to adjust animation parameters. In this case, you need to manually adjust Unity's animation system. By manually adjusting the animation parameters, the animated character can be converted between the standing state, the dead state, and the hitting state. For details on the conversion process, see Figure 1 .

[0061] To adjust the animation parameters, you mainly need to set the parameters under the Settings and Conditions columns in the animation state machine. Figure 2 The relevant parameters of Animation Transitions for a character from a standing state to a dead state are shown. Since the animation state machine templates of characters in game companies are consistent, if there are a large number of state machines with the same template style, a large number of repeated manual operations will be generated, thereby reducing efficiency. Therefore, the present invention proposes a batch processing method for animation state machines.

[0062] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0063] In one embodiment, Figure 3 As shown, a batch processing method of an animation state machine is provided, comprising the following steps:

[0064] Step S101: Acquire multiple animation state machine data;

[0065] Step S102: determining a reference to an initial animation state and a reference to a target animation state of each animation state machine based on the plurality of animation state machine data;

[0066] Step S103: determining initial animation transition data of each animation state machine based on the reference of the initial animation state and the reference of the target animation state;

[0067] Step S104: receiving an animation state transition trigger instruction, and determining target animation transition data of multiple animation state machines based on the animation state transition trigger instruction and the initial animation transition data.

[0068] Specifically, the present invention extends the editor by adding an animation state machine batch processing, wherein the editor implements the extended function of the animation state machine by calling the Unity engine interface and creating an EditorWindow, that is, the animation state machine is batch processed through the editor.

[0069] Furthermore, before batch processing the animation state machine, the animation state machine data needs to be obtained. By calling the unity engine interface to search for animation state machine type files in the target path folder, multiple animation state machine files are obtained, such as Figure 4After filtering out all animation state machine files, a scrolling area will be generated, in which all filtered animation state machine data can be observed in real time, as shown in the following figure. Figure 5 As shown in the figure, each animation state machine data is a mapping of the file in Unity. You can directly click it to index to the file location in Unity.

[0070] In one embodiment, after the data of multiple animation state machines are obtained by screening through the above method, the initial animation state and the target animation state in each animation state machine have corresponding references, and the initial animation transition data of each animation state machine can be determined through the above references, wherein the initial animation transition data includes animation speed, transition time and other data. The initial animation transition data of all animation state machines can be cleared through the animation state transition trigger instruction, and then all the cleared animation state machines are uniformly assigned, that is, the target animation transition state data is assigned to all the cleared animation state machines, so as to realize batch processing of the animation state machines.

[0071] An embodiment of the present invention provides a batch processing method for an animation state machine, including: obtaining multiple animation state machine data, determining a reference to an initial animation state and a reference to a target animation state of each animation state machine based on the multiple animation state machine data, then determining the initial animation transition data of each animation state machine based on the reference to the initial animation state and the reference to the target animation state, then receiving an animation state transition trigger instruction, and determining the target animation transition data of multiple animation state machines based on the animation state transition trigger instruction and the initial animation transition data. The present invention not only reduces labor costs but also improves the efficiency of processing animation state machines by creating an editor button corresponding to the transition between the initial animation state and the target animation state, and by receiving the trigger instruction of the editor button, batch modifies the initial animation transition data of all animation state machines to determine the target animation transition data of all animation state machines.

[0072] In one embodiment, step S102 includes:

[0073] Step S201: determining an initial animation state and a target animation state of each animation state machine among a plurality of animation state machines;

[0074] Step S202: receiving first input data of an input box corresponding to an initial animation state, and obtaining a reference to the initial animation state based on the first input data, and receiving second input data of an input box corresponding to a target animation state, and obtaining a reference to the target animation state based on the second input data.

[0075] Specific, combined Figure 6Each animation state machine has an initial animation state (Source AnimatorState) and a target animation state (Target Animator State), and the initial animation state is named Source_State and the target animation state is named Target_State. Then, text input boxes are created for Source_State and Target_State respectively. The reference of the initial animation state can be determined by entering the first input data in the input box corresponding to Source_State, and the reference of the target animation state can be determined by entering the second input data in the input box corresponding to Target_State. The above references are prepared for the subsequent modification of the animation state machine data.

[0076] In one embodiment, step S103 includes:

[0077] Step S301: calling the animation state transition function corresponding to the reference of the initial animation state and the reference of the target animation state;

[0078] Step S302: using the animation state transition function, determine the initial animation transition data of each animation state machine.

[0079] Specifically, the animation state can be a standing state, a dead state, or a jumping state, etc. Taking the initial animation state of the animation state machine as the standing state and the target animation state as the dead state as an example, the initial animation transition data of each animation state machine is determined. When the animation transitions from the standing state to the dead state, it needs to be processed as follows: Figure 7 The data structure of the animation state transition of the unity engine AnimationTransitions (i.e., the animation state transition function) and the assignment of the data structure of the animation state transition can obtain the initial animation transition data. Among them, the initial animation transition data is the relevant parameters of the animation's standing state and death state conversion.

[0080] Furthermore, the data structure of the animation state transition is converted into the display format of the editor as follows Figure 8 shown. Figure 8 The text HasExitTime displayed on the left corresponds to the button displayed on the right. Switching this button can control the bool variable and assign it to the hasExitTime field of the object; the text ExitTime displayed on the left corresponds to the float data displayed on the right. The input floating point number is finally assigned to the exitTime field of the object, and so on.

[0081] In one embodiment, step S104 includes:

[0082] Step S401: receiving an animation state one-way transition trigger instruction, modifying initial animation transition data based on the animation state one-way transition trigger instruction, and obtaining target animation transition data of multiple animation state machines;

[0083] Step S402: receiving an animation state bidirectional transition trigger instruction, modifying initial animation transition data based on the animation state bidirectional transition trigger instruction, and obtaining target animation transition data of multiple animation state machines.

[0084] Specifically, the present invention determines the target animation transition data of multiple animation state machines in three ways. The first case: receiving a first trigger instruction corresponding to the transition of the animation state from the initial animation state to the target animation state, modifying the initial animation transition data based on the first trigger instruction, and obtaining the target animation transition data of multiple animation state machines; the second case: receiving a second trigger instruction corresponding to the transition of the animation state from the target animation state to the initial animation state, modifying the initial animation transition data based on the second trigger instruction, and obtaining the target animation transition data of multiple animation state machines; the third case: receiving a third trigger instruction corresponding to the transition of the animation state from the initial animation state to the target animation state and the transition of the animation state from the target animation state to the initial animation state, modifying the initial animation transition data based on the third trigger instruction, and obtaining the target animation transition data of multiple animation state machines.

[0085] Furthermore, combined with Fig. 9 The above three situations are elaborated in detail, taking Source representing the initial animation state and Target representing the target animation state as an example to determine the target animation transition data of multiple animation state machines. Source-→Target: Clicking the editor button (i.e. receiving the first trigger instruction) will first clear the AnimationTransition data between the two animation states (i.e. the initial animation transition data), and call the engine interface SourceState.AddTransition(TargetState); at this point, a data transitioning from Source to Target is generated between the two animation states, that is, the target animation transition data is generated. Target-→Source: Clicking the editor button (i.e. receiving the second trigger instruction) will first clear the AnimationTransition data between the two animation states (i.e. the initial animation transition data), and call the engine interface TargetState.AddTransition(SourceState); at this point, a data transitioning from Target to Source is generated between the two animation states, that is, the target animation transition data is generated.

[0086] Furthermore, Source<-→Target: clicking the editor button (i.e. receiving the third trigger instruction) will first clear the AnimationTransition data between the two animation states (i.e. the initial animation transition data), and call the engine interface SourceState.AddTransition(TargetState); thus, a bidirectional transition data from Source to Target is generated between the two animation states, i.e. the target animation transition data.

[0087] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0088] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0089] Fig.10 The structural schematic diagram of a batch processing device of an animation state machine provided by an embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown. The batch processing device of an animation state machine includes a data acquisition module 1001, a reference determination module 1002, an initial data determination module 1003 and a target data determination module 1004, which are as follows:

[0090] The data acquisition module 1001 is used to acquire multiple animation state machine data;

[0091] A reference determination module 1002, for determining a reference of an initial animation state and a reference of a target animation state of each animation state machine based on a plurality of animation state machine data;

[0092] An initial data determination module 1003, for determining initial animation transition data of each animation state machine based on a reference to an initial animation state and a reference to a target animation state;

[0093] The target data determination module 1004 is used to receive an animation state transition trigger instruction, and determine target animation transition data of multiple animation state machines based on the animation state transition trigger instruction and the initial animation transition data.

[0094] In a possible implementation, the reference determination module 1002 includes:

[0095] An animation state determination submodule, used to determine an initial animation state and a target animation state of each animation state machine in a plurality of animation state machines;

[0096] The reference determination submodule is used to receive the first input data of the input box corresponding to the initial animation state, and obtain the reference of the initial animation state based on the first input data, and receive the second input data of the input box corresponding to the target animation state, and obtain the reference of the target animation state based on the second input data.

[0097] In a possible implementation, the initial data determination module 1003 includes:

[0098] The function calling submodule is used to call the animation state transition function corresponding to the reference of the initial animation state and the reference of the target animation state;

[0099] The initial data determination submodule is used to determine the initial animation transition data of each animation state machine using the animation state transition function.

[0100] In a possible implementation, the target data determination module 1004 includes:

[0101] A first instruction receiving submodule is used to receive an animation state one-way transition trigger instruction, modify the initial animation transition data based on the animation state one-way transition trigger instruction, and obtain target animation transition data of multiple animation state machines;

[0102] The second instruction receiving submodule is used to receive an animation state bidirectional transition trigger instruction, modify the initial animation transition data based on the animation state bidirectional transition trigger instruction, and obtain target animation transition data of multiple animation state machines.

[0103] In a possible implementation, the first instruction receiving submodule includes:

[0104] A first instruction receiving unit is used to receive a first trigger instruction corresponding to the transition of the animation state from the initial animation state to the target animation state, and modify the initial animation transition data based on the first trigger instruction to obtain the target animation transition data of the plurality of animation state machines;

[0105] The second instruction receiving unit is used to receive a second trigger instruction corresponding to the transition of the animation state from the target animation state to the initial animation state, modify the initial animation transition data based on the second trigger instruction, and obtain the target animation transition data of multiple animation state machines.

[0106] In a possible implementation, the second instruction receiving submodule includes:

[0107] A third instruction receiving unit is used to receive a third trigger instruction corresponding to the transition of the animation state from the initial animation state to the target animation state and the transition of the animation state from the target animation state to the initial animation state, and to modify the initial animation transition data based on the third trigger instruction to obtain target animation transition data of multiple animation state machines.

[0108] In a possible implementation, before the data acquisition module 1001, it also includes:

[0109] The file acquisition module is used to call the Unity engine interface to search for animation state machine type files in the target path folder to obtain multiple animation state machine files;

[0110] The data determination module is used to determine multiple animation state machine data based on multiple animation state machine files.

[0111] Fig.11 is a schematic diagram of a terminal provided by an embodiment of the present invention. Fig.11 As shown, the terminal 11 of this embodiment includes: a processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the processor 110. When the processor 110 executes the computer program 112, the steps in the batch processing method embodiment of each animation state machine described above are implemented, for example Figure 3 Alternatively, when the processor 110 executes the computer program 112, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Fig.10 Functionality of modules / units 1001 to 1004 is shown.

[0112] The present invention also provides a readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the methods provided in the above-mentioned various embodiments.

[0113] Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application-specific integrated circuit (Application Specific Integrated Circuits, abbreviated as: ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the readable storage medium can also exist in a communication device as discrete components. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0114] The present invention also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of a device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the device implements the methods provided in the above various embodiments.

[0115] In the embodiments of the above-mentioned devices, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0116] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A batch processing method for an animation state machine, characterized in that: include: Get multiple animation state machine data; Based on the plurality of animation state machine data, determining a reference to an initial animation state and a reference to a target animation state of each animation state machine; Determining initial animation transition data for each animation state machine based on the reference to the initial animation state and the reference to the target animation state; receiving an animation state transition trigger instruction, and determining target animation transition data of a plurality of animation state machines based on the animation state transition trigger instruction and the initial animation transition data; The initial animation transition data of all animation state machines are cleared through the animation state transition trigger instruction, and then all the cleared animation state machines are uniformly assigned, and the target animation transition state data is assigned to all the cleared animation state machines to realize batch processing of the animation state machines.

2. The batch processing method of the animation state machine according to claim 1, characterized in that: The step of determining a reference to an initial animation state and a reference to a target animation state of each animation state machine based on the plurality of animation state machine data comprises: determining an initial animation state and a target animation state for each of the plurality of animation state machines; Receive first input data of an input box corresponding to the initial animation state, and obtain a reference to the initial animation state based on the first input data, and receive second input data of an input box corresponding to the target animation state, and obtain a reference to the target animation state based on the second input data.

3. The batch processing method of the animation state machine as claimed in claim 2, characterized in that: Determining the initial animation transition data of each animation state machine based on the reference of the initial animation state and the reference of the target animation state includes: Calling the animation state transition function corresponding to the reference of the initial animation state and the reference of the target animation state; The initial animation transition data of each animation state machine is determined using the animation state transition function.

4. The batch processing method of the animation state machine as claimed in claim 3, characterized in that: The receiving of the animation state transition trigger instruction and determining target animation transition data of a plurality of animation state machines based on the animation state transition trigger instruction and the initial animation transition data comprises: receiving an animation state one-way transition trigger instruction, modifying the initial animation transition data based on the animation state one-way transition trigger instruction, and obtaining target animation transition data of multiple animation state machines; An animation state bidirectional transition trigger instruction is received, and the initial animation transition data is modified based on the animation state bidirectional transition trigger instruction to obtain target animation transition data of multiple animation state machines.

5. The batch processing method of the animation state machine according to claim 4, characterized in that: The receiving of the animation state one-way transition trigger instruction, modifying the initial animation transition data based on the animation state one-way transition trigger instruction, and obtaining target animation transition data of multiple animation state machines includes: receiving a first trigger instruction corresponding to a transition of an animation state from an initial animation state to a target animation state, modifying the initial animation transition data based on the first trigger instruction, and obtaining target animation transition data of a plurality of animation state machines; A second trigger instruction corresponding to a transition of an animation state from a target animation state to an initial animation state is received, and the initial animation transition data is modified based on the second trigger instruction to obtain target animation transition data of multiple animation state machines.

6. The batch processing method of the animation state machine according to claim 4, characterized in that: The receiving of the animation state bidirectional transition trigger instruction, modifying the initial animation transition data based on the animation state bidirectional transition trigger instruction, and obtaining target animation transition data of multiple animation state machines includes: Receive a third trigger instruction corresponding to the transition of the animation state from the initial animation state to the target animation state and the transition of the animation state from the target animation state to the initial animation state, modify the initial animation transition data based on the third trigger instruction, and obtain target animation transition data of multiple animation state machines.

7. The batch processing method of the animation state machine according to any one of claims 1 to 6, characterized in that: Before obtaining the plurality of animation state machine data, the method further includes: Call the unity engine interface to search for animation state machine type files in the target path folder to obtain multiple animation state machine files; Based on the plurality of animation state machine files, the plurality of animation state machine data are determined.

8. A batch processing device for an animation state machine, characterized in that: include: Data acquisition module, used to obtain multiple animation state machine data; A reference determination module, used to determine a reference of an initial animation state and a reference of a target animation state of each animation state machine based on the plurality of animation state machine data; An initial data determination module, configured to determine initial animation transition data of each animation state machine based on a reference to the initial animation state and a reference to the target animation state; A target data determination module, configured to receive an animation state transition trigger instruction, and determine target animation transition data of a plurality of animation state machines based on the animation state transition trigger instruction and the initial animation transition data; The initial animation transition data of all animation state machines are cleared through the animation state transition trigger instruction, and then all the cleared animation state machines are uniformly assigned, and the target animation transition state data is assigned to all the cleared animation state machines to realize batch processing of the animation state machines.

9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the batch processing method of the animation state machine according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the batch processing method of the animation state machine according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Icon batch processing method and terminal

    CN104750391A

  • Animation playing method, device and equipment and storage medium

    CN111589143A