Rendering methods, devices, equipment, and storage media for layer properties
By detecting and converting After Effects expressions into Lua scripts, the problem of designers being unable to use After Effects expressions in self-developed rendering programs was solved, enabling efficient rendering of layer properties and improving rendering efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN SHANJIAN INTELLIGENT SCI & TECH CO LTD
- Filing Date
- 2022-12-19
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, when designers create text animations, they have to achieve the animation effect by manually setting keyframes, which is time-consuming and laborious, because the self-developed rendering program does not support AE expressions. They cannot use AE expressions.
By detecting whether the rendering program carries AE expressions and converting them into Lua scripts, the composition ID and layer ID of the target layer attributes are obtained using the Lua script database, and then the target layer attributes are rendered, thus enabling the AE expressions to run in non-AE environments.
It enriches the rendering methods of layer properties, improves the rendering efficiency of layers, and avoids the tedious process of traditional keyframe interpolation.
Smart Images

Figure CN115908686B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animation design, and more particularly to a method, apparatus, device, and storage medium for rendering layer attributes. Background Technology
[0002] Currently, AE expressions are a unique technology for animation; they cannot be used outside of AE because they require a specific environment to function. This environment contains built-in properties that provide the necessary conditions for the expressions to run. Currently, mobile template text animations rely on keyframe data. Therefore, export plugins export keyframe data along with the template data, and the animation effect is achieved by interpolating these keyframes at runtime. Designers often find themselves unable to use AE expressions when creating text animations because their custom rendering programs do not support them, resorting to time-consuming and laborious keyframe-based methods. Summary of the Invention
[0003] The main objective of this invention is to solve the technical problem of enriching the rendering methods of layer properties and improving the rendering efficiency of layers when After Effects expressions cannot be used in text animation.
[0004] The first aspect of the present invention provides a method for rendering layer attributes, the method comprising:
[0005] When a rendering program is detected, it is determined whether the rendering program carries an After Effects expression and the target layer attributes to be rendered by the rendering program are determined.
[0006] If the rendering program carries the AE expression, obtain the target Lua script corresponding to the AE expression, and obtain the target composition ID and target layer ID corresponding to the target layer attributes;
[0007] The target composition and target layer containing the target layer attribute are determined based on the target composition ID and the target layer ID.
[0008] The target composition and the target layer attributes in the target layer are rendered according to the target Lua script.
[0009] Optionally, in a first implementation of the first aspect of the present invention, the steps of obtaining the target Lua script corresponding to the AE expression, and obtaining the target composition ID and target layer ID corresponding to the target layer attribute, if the rendering program carries the AE expression, include:
[0010] If the rendering program carries the AE expression, it retrieves the target Lua script from the preset Lua script database based on the AE expression, and determines the target composition ID and the target layer ID from the preset composition ID database and the preset layer ID database based on the target layer attributes.
[0011] Optionally, in a second implementation of the first aspect of the present invention, the step of obtaining the target Lua script from a preset Lua script database based on the AE expression includes:
[0012] The corresponding function name is determined from the preset Lua script database based on the AE expression;
[0013] Retrieve the target Lua script associated with the function name.
[0014] Optionally, in a third implementation of the first aspect of the present invention, before the step of determining whether the rendering program carries an AE expression and determining the target layer attributes to be rendered by the rendering program when the rendering program is detected, the method further includes:
[0015] Retrieves the preset AE expression for preset attributes;
[0016] The preset AE expression is converted into a preset Lua script, and the preset composition ID and preset layer ID corresponding to the preset attribute are generated to obtain the preset Lua script database, the preset composition ID database, and the preset layer ID database.
[0017] Optionally, in a fourth implementation of the first aspect of the present invention, the step of determining the target composition and target layer containing the target layer attribute based on the target composition ID and the target layer ID includes:
[0018] Update the first preset global active function and the first preset global variables;
[0019] When the first preset global variable is updated, the target composition and the target layer where the target layer attribute is located are determined based on the target composition ID and the target layer ID.
[0020] Optionally, in a fifth implementation of the first aspect of the present invention, the step of rendering the target composition and the target layer attributes in the target layer according to the target Lua script includes:
[0021] Update the second preset global variable;
[0022] When the second preset global variable is updated, the target composition and the target layer attributes in the target layer are rendered according to the target Lua script.
[0023] Optionally, in a sixth implementation of the first aspect of the present invention, the step of rendering the target composition and the target layer attributes in the target layer according to the target Lua script after updating the second preset global variable includes:
[0024] When the second preset global variable is updated, the target Lua script is executed to obtain the expression execution result and retrieve the historical time from the historical first global variable;
[0025] The result of the expression is superimposed onto the transformation matrix corresponding to the historical time to obtain a new transformation matrix;
[0026] The target composition and the target layer attributes in the target layer are rendered according to the new transformation matrix.
[0027] A second aspect of the present invention provides a rendering apparatus for layer attributes, comprising:
[0028] The detection module, when a rendering program is detected, is used to determine whether the rendering program carries an AE expression;
[0029] The acquisition module, if the rendering program carries the AE expression, is used to acquire the target Lua script corresponding to the AE expression, and to acquire the target composition ID and target layer ID corresponding to the target layer attributes;
[0030] The determination module is used to determine the target composition and target layer where the target layer attribute is located based on the target composition ID and the target layer ID;
[0031] The rendering module is used to render the target composition and the target layer attributes in the target layer according to the target Lua script.
[0032] A third aspect of the present invention provides a rendering device for layer attributes, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a circuit; the at least one processor invokes the instructions in the memory to cause the rendering device for layer attributes to perform the above-described rendering method for layer attributes.
[0033] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described rendering method for layer attributes.
[0034] In this embodiment of the invention, when the rendering device for layer attributes detects a rendering program, it determines whether the rendering program carries an After Effects (AE) expression and determines the target layer attribute to be rendered by the rendering program. If the rendering program carries the AE expression, it obtains the target Lua script corresponding to the AE expression, and obtains the target composition ID and target layer ID corresponding to the target layer attribute. Based on the target composition ID and target layer ID, it determines the target composition and target layer where the target layer attribute is located. It then renders the target layer attribute in the target composition and target layer based on the target Lua script. Since the rendering device for layer attributes can identify whether a rendering program carries an AE expression, when a rendering program targeting a target layer attribute is detected, it can determine whether the type of the rendering program belongs to the AE type based on the above identification capability. If so, the rendering of the target layer attribute can be achieved based on the rendering program and the preset Lua script. In this embodiment, the export plugin of the rendering device for layer attributes converts AE expressions into Lua scripts and injects the built-in attributes of AE expressions into Lua, making it possible for AE expressions to run successfully without AE. Compared with rendering software that does not support AE expressions, the rendering method used by the rendering device for layer attributes in this embodiment does not require rendering layer attributes through keyframe interpolation, which enriches the rendering methods of layer attributes and improves the rendering efficiency of layers. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of an embodiment of the rendering method for layer attributes in this invention;
[0036] Figure 2 This is a schematic diagram of another embodiment of the rendering device for layer attributes in this invention;
[0037] Figure 3 This is a schematic diagram of an embodiment of a rendering device for layer attributes in this invention. Detailed Implementation
[0038] This invention provides a method, apparatus, device, and storage medium for rendering layer attributes.
[0039] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises 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 such processes, methods, products, or apparatus.
[0040] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the rendering method for layer attributes in this invention includes:
[0041] 101. When a rendering program is detected, determine whether the rendering program carries an AE expression and determine the target layer attributes to be rendered by the rendering program;
[0042] This embodiment provides a solution that allows designers to use After Effects (AE) expressions when creating text animations, combined with an export plugin, to render the effects without relying on After Effects. After Effects is a graphics and video processing software suitable for organizations engaged in design and video special effects, including television stations, animation production companies, individual post-production studios, and multimedia studios. It is a layer-based post-production software. Normally, AE expressions require After Effects software.
[0043] Specifically, when a layer's rendering device detects a rendering program, it can parse the rendering program to determine the target layer attributes that the rendering program targets, and it can also determine whether it carries an After Effects expression.
[0044] Optionally, if the rendering program carries the AE expression, the target Lua script is obtained from the preset Lua script database based on the AE expression, and the target composition ID and the target layer ID are determined from the preset composition ID database and the preset layer ID database based on the target layer attributes.
[0045] Optionally, the corresponding function name is determined in a preset Lua script database based on the AE expression; the target Lua script associated with the function name is then obtained.
[0046] Optionally, a preset After Effects expression for a preset attribute is obtained; the preset After Effects expression is converted into a preset Lua script, and a preset composition ID and a preset layer ID corresponding to the preset attribute are generated, resulting in a preset Lua script database, a preset composition ID database, and a preset layer ID database. The preset database allows for quick querying of the target composition ID and target layer ID corresponding to the target layer attribute, thereby improving layer rendering efficiency.
[0047] 102. If the rendering program carries the AE expression, obtain the target Lua script corresponding to the AE expression, and obtain the target composition ID and target layer ID corresponding to the target layer attribute;
[0048] Specifically, Lua scripts are pre-defined scripts. Different After Effects (AE) expressions correspond to different pre-defined Lua scripts. When an AE expression is obtained, the corresponding target Lua script can be determined based on it. Lua is a small scripting language. Its design purpose is to provide flexible extension and customization capabilities to applications through flexible embedding. Lua is written in standard C. Lua scripts can be easily called by C / C++ code, and vice versa, making Lua widely applicable in applications. It can be used not only as an extension script but also as a regular configuration file, replacing XML, INI, and other file formats, and is easier to understand and maintain. Lua is written in standard C, with concise and elegant code, and can be compiled and run on almost all operating systems and platforms. A complete Lua interpreter is only 200k, and among all script engines, Lua is the fastest. All of this makes Lua the best choice for embedded scripting.
[0049] 103. Determine the target composition and target layer containing the target layer attribute based on the target composition ID and the target layer ID;
[0050] Specifically, once the target layer attributes are determined, the specific location of the target layer attributes to be rendered can be determined based on the target composition ID and composition ID associated with the target layer attributes, and then the rendering can be performed.
[0051] Optionally, update the first preset global active function and the first preset global variable; when the first preset global variable is updated, determine the target composition and the target layer where the target layer attribute is located based on the target composition ID and the target layer ID.
[0052] 104. Render the target composition and the target layer attributes in the target layer according to the target Lua script.
[0053] Specifically, the rendering device export plugin for layer properties converts AE expressions into Lua scripts, injects the built-in properties of AE expressions into Lua, making it possible for AE expressions to run successfully without AE, and uses LuaBridge as a bridge for communication between C++ and Lua.
[0054] Optionally, update the second preset global variable; after updating the second preset global variable, render the target composition and the target layer attributes in the target layer according to the target Lua script.
[0055] Optionally, upon completion of updating the second preset global variable, the target Lua script is executed to obtain the expression execution result and retrieve the historical time from the historical first global variable; the expression execution result is superimposed onto the transformation matrix corresponding to the historical time to obtain a new transformation matrix; the target composition and the target layer attributes in the target layer are rendered according to the new transformation matrix.
[0056] Optional, output the current rendered layer.
[0057] Specifically, the implementation process will be explained below using the opacity of text animation as an example:
[0058] 1. Export plugin:
[0059] 1.1. Determine that the attribute uses an AE expression data structure.
[0060] 1.1.1 Determine the compId and layerId used in AE expressions: The rendering program uses these two IDs at runtime to find the composition and layer to which the current attribute belongs.
[0061] 1.1.2 After converting AE expressions to Lua, rename the saved file to luaFile.
[0062] 1.1.3. Generate luaFuncName, which represents the name of the function that wraps the Lua script. When the program runs, it uses the value of this key to find the corresponding Lua script in the Lua state machine for execution.
[0063] 1.2 When exporting the opacity property of the animator, the export plugin determines if the property uses an After Effects expression. If so, it converts the expression into a Lua script and generates a composition ID and a layer ID based on the layer information.
[0064] The export plugin exports the built-in properties of AE expressions, such as thisLayer, which refers to the property object of the current layer. This property object contains information closely related to the layer (layer width and height, layer start time, end time, etc.).
[0065] 2. Rendering program:
[0066] 2.1 The program will first call the Lua initialization interface to initialize Lua-related information.
[0067] 2.2 After Lua initialization, Luabridge loads C++ structs. These structs contain member information carried by the built-in properties of AE expressions, including: Composition, Layer, Effect, Transform, Text, Project, Footage, etc.
[0068] 2.3 Load all attribute information that uses AE expressions, and here call the two Lua interfaces luaL_loadstring(L, lua); lua_pcall(L, 0, 0, 0); to load Lua scripts. Since each Lua script is wrapped with a globally unique function name, this allows the Lua script that executes a certain attribute expression to be found and executed in Lua by the function name.
[0069] 2.4 Load the built-in properties of AE expressions exported by the export plugin to create a runtime environment for AE expressions to run independently of AE.
[0070] 2.4.1 Create an ExpressionRuntimeSource structure. The ExpressionRuntimeSource structure members include vecotr <composition>Project, Footwear, etc.
[0071] 2.4.2 Parse the JSON file containing the built-in properties of the AE expression exported by the export plugin, and load the template project information into the relevant structure so that it can be used by the program at runtime.
[0072] 2.5 When the rendering program reaches the `opacity` property, it checks whether an expression is used for that property. If so, it performs the following steps:
[0073] 2.5.1 Update the first global active function (representing the Lua script to be executed in the current Lua): activeFuncName.
[0074] 2.5.2 Update the first global variable: time, thisProject.
[0075] 2.5.3. The composition ID and layer ID bound by this attribute are mapped to a vector. <composition>Find the composition and layer to which the current property belongs, and then update the second global variables: thisComp, thisLayer, and thisProperty.
[0076] 2.5.4 The rendering device of the layer calls the luabridge::LuaException::pcall(L, sizeof...(args), LUA_MULTRET) interface to execute the current Lua script.
[0077] 2.5. After the expression is applied, the result is superimposed on the transformation matrix of the previous time. During rendering, the newly calculated matrix is used for rendering.
[0078] In this embodiment of the invention, when the rendering device for layer attributes detects a rendering program, it determines whether the rendering program carries an After Effects (AE) expression. If the rendering program carries the AE expression, it obtains the target Lua script corresponding to the AE expression, and obtains the target composition ID and target layer ID corresponding to the target layer attribute. Based on the target composition ID and target layer ID, it determines the target composition and target layer where the target layer attribute is located. It then renders the target layer attribute in the target composition and target layer based on the target Lua script. Since the rendering device for layer attributes can identify whether a rendering program carries an AE expression, when a rendering program targeting a target layer attribute is detected, it can determine whether the type of the rendering program belongs to the AE type based on the above identification capability. If so, the rendering of the target layer attribute can be achieved based on the rendering program and the preset Lua script. The export plugin of the layer rendering device converts the AE expression into a Lua script and injects the built-in attributes of the AE expression into Lua, making it possible for the AE expression to run successfully without AE. Compared to rendering software that does not support AE expressions, the rendering method used by the rendering device for layer attributes in this embodiment does not require keyframe interpolation for layer attribute rendering, enriching the rendering methods for layer attributes and improving the rendering efficiency of layers.
[0079] The rendering method for layer attributes in the embodiments of the present invention has been described above. The rendering apparatus for layer attributes in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 2 One embodiment of the rendering device for layers in this invention includes:
[0080] The detection module 301 is used to determine whether the rendering program carries an AE expression and to determine the target layer attributes to be rendered by the rendering program when the rendering program is detected.
[0081] The acquisition module 302 is used to acquire the target Lua script corresponding to the AE expression, and to acquire the target composition ID and target layer ID corresponding to the target layer attributes if the rendering program carries the AE expression;
[0082] The determination module 303 is used to determine the target composition and target layer where the target layer attribute is located based on the target composition ID and the target layer ID;
[0083] Rendering module 304 is used to render the target composition and the target layer attributes in the target layer according to the target Lua script.
[0084] Optionally, the acquisition module 302 can also be specifically used for:
[0085] If the rendering program carries the AE expression, it retrieves the target Lua script from the preset Lua script database based on the AE expression, and determines the target composition ID and the target layer ID from the preset composition ID database and the preset layer ID database based on the target layer attributes.
[0086] Optionally, the acquisition module 302 can also be specifically used for:
[0087] The corresponding function name is determined from the preset Lua script database based on the AE expression;
[0088] Retrieve the target Lua script associated with the function name.
[0089] Optionally, the acquisition module 302 can also be specifically used for:
[0090] Retrieves the preset AE expression for preset attributes;
[0091] The preset AE expression is converted into a preset Lua script, and the preset composition ID and preset layer ID corresponding to the preset attribute are generated to obtain the preset Lua script database, the preset composition ID database, and the preset layer ID database.
[0092] Optionally, the determination module 303 can also be specifically used for:
[0093] Update the first preset global active function and the first preset global variables;
[0094] When the first preset global variable is updated, the target composition and the target layer where the target layer attribute is located are determined based on the target composition ID and the target layer ID.
[0095] Optionally, the rendering module 304 can also be specifically used for:
[0096] Update the second preset global variable;
[0097] When the second preset global variable is updated, the target composition and the target layer attributes in the target layer are rendered according to the target Lua script.
[0098] Optionally, the rendering module 304 can also be specifically used for:
[0099] When the second preset global variable is updated, the target Lua script is executed to obtain the expression execution result and retrieve the historical time from the historical first global variable;
[0100] The result of the expression is superimposed onto the transformation matrix corresponding to the historical time to obtain a new transformation matrix;
[0101] The target composition and the target layer attributes in the target layer are rendered according to the new transformation matrix.
[0102] In this embodiment of the invention, when the rendering device for layer attributes detects a rendering program, it determines whether the rendering program carries an After Effects (AE) expression. If the rendering program carries the AE expression, it obtains the target Lua script corresponding to the AE expression, and obtains the target composition ID and target layer ID corresponding to the target layer attribute. Based on the target composition ID and target layer ID, it determines the target composition and target layer where the target layer attribute is located. It then renders the target layer attribute in the target composition and target layer based on the target Lua script. Since the rendering device for layer attributes can identify whether a rendering program carries an AE expression, when a rendering program targeting a target layer attribute is detected, it can determine whether the type of the rendering program belongs to the AE type based on the above identification capability. If so, the rendering of the target layer attribute can be achieved based on the rendering program and the preset Lua script. In this embodiment, the export plugin of the rendering device for layer attributes converts AE expressions into Lua scripts and injects the built-in attributes of AE expressions into Lua, making it possible for AE expressions to run successfully without AE. Compared with rendering software that does not support AE expressions, the rendering method used by the rendering device for layer attributes in this embodiment does not require rendering layer attributes through keyframe interpolation, which enriches the rendering methods of layer attributes and improves the rendering efficiency of layers.
[0103] above Figure 2 The rendering device for layer attributes in the embodiments of the present invention will be described in detail from the perspective of modular functional entities. The rendering device for layer attributes in the embodiments of the present invention will be described in detail from the perspective of hardware processing.
[0104] Figure 3 This is a schematic diagram of the structure of a layer attribute rendering device 500 provided in an embodiment of the present invention. The layer attribute rendering device 500 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the layer attribute rendering device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of instruction operations in the storage media 530 on the layer attribute rendering device 500.
[0105] The layer-based rendering device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The rendering device structure shown for layer attributes does not constitute a limitation on layer attribute-based rendering devices and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0106] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the rendering method for the layer attributes.
[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0108] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0109] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.< / composition> < / composition>
Claims
1. A method for rendering layer properties, characterized in that, The rendering methods for the layer attributes include: When a rendering program is detected, it is determined whether the rendering program carries an After Effects expression and the target layer attributes to be rendered by the rendering program are determined. If the rendering program carries the AE expression, obtain the target Lua script corresponding to the AE expression, and obtain the target composition ID and target layer ID corresponding to the target layer attributes; The C++ struct containing the built-in properties of the AE expression is injected into the Lua state machine using LuaBridge, thus creating the runtime environment for the AE expression. The target composition and target layer containing the target layer attribute are determined based on the target composition ID and the target layer ID. Render the target composition and the target layer attributes in the target layer according to the target Lua script; The step of determining the target composition and target layer containing the target layer attribute based on the target composition ID and the target layer ID includes: Update the first preset global active function and the first preset global variable; when the first preset global variable is updated, determine the target composition and the target layer where the target layer attribute is located based on the target composition ID and the target layer ID; The step of rendering the target composition and the target layer attributes in the target layer according to the target Lua script includes: Update the second preset global variable; upon completion of updating the second preset global variable, render the target composition and the target layer attributes in the target layer according to the target Lua script; The step of rendering the target composition and the target layer attributes in the target layer according to the target Lua script when the second preset global variable is updated includes: When the second preset global variable is updated, the target Lua script is executed to obtain the expression execution result and the historical time in the historical first global variable is obtained; the expression execution result is superimposed on the transformation matrix corresponding to the historical time to obtain a new transformation matrix; the target composition and the target layer attributes in the target layer are rendered according to the new transformation matrix.
2. The rendering method for layer attributes according to claim 1, characterized in that, If the rendering program carries the AE expression, the steps of obtaining the target Lua script corresponding to the AE expression, obtaining the target composition ID and target layer ID corresponding to the target layer attributes include: If the rendering program carries the AE expression, it retrieves the target Lua script from the preset Lua script database based on the AE expression, and determines the target composition ID and the target layer ID from the preset composition ID database and the preset layer ID database based on the target layer attributes.
3. The rendering method for layer attributes according to claim 2, characterized in that, The step of obtaining the target Lua script from a preset Lua script database based on the AE expression includes: The corresponding function name is determined from the preset Lua script database based on the AE expression; Retrieve the target Lua script associated with the function name.
4. The rendering method for layer attributes according to claim 2, characterized in that, Before the steps of determining whether the rendering program carries an After Effects expression and determining the target layer attributes to be rendered by the rendering program when the rendering program is detected, the method further includes: Retrieves the preset AE expression for preset attributes; The preset AE expression is converted into a preset Lua script, and the preset composition ID and preset layer ID corresponding to the preset attribute are generated to obtain the preset Lua script database, the preset composition ID database, and the preset layer ID database.
5. A rendering device for layer attributes, characterized in that, The rendering device for the layer attributes includes: The detection module is used to determine whether the rendering program carries an After Effects expression and to determine the target layer attributes to be rendered by the rendering program when the rendering program is detected. The acquisition module is used to acquire the target Lua script corresponding to the AE expression if the rendering program carries the AE expression, and to acquire the target composition ID and target layer ID corresponding to the target layer attributes; The runtime environment determination module is used to inject the C++ structure of the built-in properties of the AE expression into the Lua state machine through LuaBridge, thereby creating the runtime environment of the AE expression. The determination module is used to determine the target composition and target layer where the target layer attribute is located based on the target composition ID and the target layer ID; The rendering module is used to render the target composition and the target layer attributes in the target layer according to the target Lua script; The determining module is also specifically used for: By injecting a C++ struct that simulates the built-in properties of the AE expression into the Lua state machine through LuaBridge, the runtime environment of the AE expression is created. Update the first preset global active function and the first preset global variables; When the first preset global variable is updated, the target composition and target layer where the target layer attribute is located are determined based on the target composition ID and the target layer ID; The rendering module is also specifically used for: Update the second preset global variable; Upon completion of updating the second preset global variable, the target composition and the target layer attributes in the target layer are rendered according to the target Lua script. And when the second preset global variable is updated, the target Lua script is executed to obtain the expression execution result and retrieve the historical time from the historical first global variable; The result of the expression is superimposed onto the transformation matrix corresponding to the historical time to obtain a new transformation matrix; The target composition and the target layer attributes in the target layer are rendered according to the new transformation matrix.
6. A rendering device for layer attributes, characterized in that, The rendering device for the layer attributes includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the rendering device of the layer attributes to perform the rendering method of the layer attributes as described in any one of claims 1-4.
7. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the rendering method of layer attributes as described in any one of claims 1-4.