A dynamic graphics editing method and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2021-04-07
- Publication Date
- 2026-05-29
AI Technical Summary
During the editing process of motion graphics, existing technology can lead to the intermediate process where the scene file of the motion graphics is mistakenly modified into dynamic content, making it impossible to view the correct display effect after editing in real time.
It constructs a preview scene identical to the editing instance, receives editing commands from the editing instance, performs the same editing operations through the preview instance, and outputs a preview image of the dynamic graphics, thus avoiding running dynamic content in the editing instance.
It enables real-time viewing of the edited display effect, avoids accidental modification of dynamic graphic scene files, and improves the real-time performance and accuracy of the editing process.
Smart Images

Figure CN115187700B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a dynamic graphics editing method and device. BACKGROUND
[0002] When editing a dynamic graphics including dynamic content such as game interface, special effect, etc., there is a demand for real-time viewing of the display effect after editing. To meet this demand, a solution is proposed in the prior art, which is to design the editing instance and the preview instance as the same instance, and the file edited in the editing window and the file displayed in the preview window are the same file, so that the user can real-time view the display effect after editing through the display content of the preview window. In the case of the editing instance and the preview instance being the same instance, since the preview instance needs to display the display effect, the dynamic content needs to be run on the only instance. However, if the user inputs a save operation during the running of the dynamic content, the scene file of the dynamic graphics will be saved as the intermediate process of the dynamic content, and thus the scene file of the dynamic graphics will be modified by mistake. For example, for a dynamic graphics, the position coordinates of object A in the scene file are (0, 0), and the dynamic content is used to control the position coordinates of object A to change over time. If the position coordinates of object A are changed to (1, 1) by running the dynamic content, the user inputs a save operation, and then the scene file of the dynamic graphics will be saved as (1, 1), the position coordinates of object A in the scene file will be saved as the intermediate process of the dynamic content, and the scene file of the dynamic graphics will be modified by mistake. SUMMARY
[0003] Therefore, the present application provides a dynamic graphics editing method and device, which can real-time view the display effect of the dynamic graphics after editing, and avoid the scene file of the dynamic graphics being modified by mistake as the intermediate process of the dynamic content.
[0004] To achieve the above object, the embodiments of the present application provide the technical solutions as follows.
[0005] In a first aspect, the embodiments of the present application provide a dynamic graphics editing method applied to a preview instance, and the method comprises the following steps.
[0006] Constructing a preview scene, wherein the preview scene is the same as the editing scene of an editing instance;
[0007] Receiving an editing command sent by the editing instance, wherein the editing command is used to instruct the preview instance to perform a target editing operation on the preview scene, and the target editing operation comprises an editing operation performed by the editing instance on the editing scene;
[0008] Performing the target editing operation on the preview scene based on the editing command;
[0009] Based on the preview scene and dynamic content of the motion graphics after the target editing operation is performed, a preview image of the motion graphics is output.
[0010] As an optional implementation of this invention, the construction of the preview scene includes:
[0011] Send a first request message to the editing instance;
[0012] Receive object information sent by the editing instance, the object information including each object in the editing scene, each attribute of each object, and the attribute value of each attribute;
[0013] The preview scene is constructed based on the object information.
[0014] As an optional implementation of this invention, the target editing operation includes modifying the target attribute value of the target object to a first attribute value;
[0015] The editing command includes: a first identifier for identifying the target object, a second identifier for identifying the target attribute, and the first attribute value.
[0016] As an optional implementation of this invention, the first identifier is a globally unique identifier (GUID) of the target object.
[0017] As an optional implementation of the present invention, the preview scene of the preview instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the editing scene.
[0018] As an optional implementation of this invention, the target editing operation includes modifying the target attribute value of the target object to a first attribute value;
[0019] The editing command includes: a first identifier of the target object, a second identifier for identifying the target attribute, and the first attribute value.
[0020] As an optional implementation of this invention, receiving the editing command sent by the editing instance includes:
[0021] Receive editing data sent by the editing instance, the editing data including data obtained by serializing the editing command;
[0022] The editing data is deserialized to obtain the editing command.
[0023] As an optional implementation of this invention, receiving the editing data sent by the editing instance includes:
[0024] The editing data sent by the editing instance is received through the socket interface.
[0025] As an optional implementation of this invention, after performing the target editing operation on the preview scene based on the editing command, the method further includes:
[0026] Send a preview image of the motion graphics to the editing instance.
[0027] As an optional implementation of this invention, the method further includes:
[0028] Send a second request message to the editing instance, the second request message carrying an identifier of the target animation graphic;
[0029] Receive response information sent by the editing instance, the response information including the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic;
[0030] Based on the scene file of the target animated graphic and the dynamic content of the target animated graphic, a preview image of the target animated graphic is output.
[0031] Secondly, embodiments of the present invention provide a dynamic graphics editing method, applied to an editing example, the method comprising:
[0032] Perform the target editing operation on the editing scene;
[0033] An editing command is sent to the preview instance according to the target editing operation. The editing command is used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance.
[0034] As an optional implementation of this invention, the method further includes:
[0035] Before sending the edit command to the preview instance, receive the first request information sent by the preview instance;
[0036] Based on the first request information, object information is sent to the preview instance. The object information includes each object in the editing scene, each attribute of each object, and the attribute value of each attribute.
[0037] As an optional implementation of the present invention, the editing scene of the editing instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the preview scene.
[0038] As an optional implementation of this invention, after performing a target editing operation on the editing scene, the method further includes:
[0039] Perform a save operation on the edited scene;
[0040] In response to the save operation, the edited scene after the target edit operation is performed is saved as a scene file of dynamic graphics.
[0041] As an optional implementation of this invention, the method further includes:
[0042] Receive a preview image of the dynamic graphic sent by the preview instance, wherein the preview image is generated based on the preview scene and the dynamic content of the dynamic graphic after the target editing operation is performed;
[0043] Output a preview image of the animated graphic.
[0044] As an optional implementation of this invention, the method further includes:
[0045] Receive a second request message sent by the preview instance, the second request message carrying an identifier of the target dynamic graphic;
[0046] Based on the second request information, a response is sent to the preview instance. The response information includes the scene file of the target motion graphics and the dynamic content of the target motion graphics.
[0047] Thirdly, embodiments of the present invention provide a dynamic graphics editing method, including:
[0048] Construct a preview scene for the preview instance, the preview scene being the same as the editing scene for the editing instance;
[0049] Perform the target editing operation on the editing scenario of the editing instance;
[0050] An editing command is sent to the preview instance according to the target editing operation, and the editing command is used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance;
[0051] Perform the target editing operation on the preview scene of the preview instance;
[0052] The dynamic content of the motion graphics is run in the preview scene after the target editing operation is performed, so that the editing instance outputs a preview image of the motion graphics.
[0053] Fourthly, embodiments of the present invention provide a dynamic graphics editing device, wherein a preview instance is running on the dynamic graphics editing device, and the device includes:
[0054] A building unit is used to build a preview scene, which is the same as the editing scene of the editing instance;
[0055] A communication unit is configured to receive an editing command sent by the editing instance, the editing command being used to instruct the preview instance to perform a target editing operation on the preview scene, the target editing operation including the editing operation performed by the editing instance on the editing scene;
[0056] An editing unit is configured to perform the target editing operation on the preview scene based on the editing command;
[0057] The preview unit is used to output a preview image of the dynamic graphics based on the preview scene and dynamic graphics after the target editing operation is performed.
[0058] As an optional implementation of this invention, the construction unit is further configured to send a first request message to the editing instance; receive object information sent by the editing instance, the object information including each object in the editing scene, each attribute of each object, and the attribute value of each attribute; and construct the preview scene based on the object information.
[0059] As an optional implementation of the present invention, the preview scene of the preview instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the editing scene.
[0060] As an optional implementation of this invention, the target editing operation includes modifying the target attribute value of the target object to a first attribute value;
[0061] The editing command includes: a first identifier of the target object, a second identifier for identifying the target attribute, and the first attribute value.
[0062] As an optional implementation of this invention, the communication unit is specifically used to receive editing data sent by the editing instance, the editing data including data obtained by serializing the editing command; and to obtain the editing command by deserializing the editing data.
[0063] As an optional implementation of this invention, the communication unit is specifically used to receive editing data sent by the editing instance through a socket interface.
[0064] As an optional implementation of the present invention, the communication unit is further configured to send a preview image of the dynamic graphics to the editing instance after performing the target editing operation on the preview scene based on the editing command.
[0065] As an optional implementation of this invention, the communication unit is further configured to send a second request message to the editing instance, the second request message carrying an identifier of the target dynamic graphic; and receive a response message sent by the editing instance, the response message including a scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic;
[0066] The preview unit is also used to output a preview image of the target dynamic graphic based on the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic.
[0067] Fifthly, embodiments of the present invention provide a dynamic graphics editing device, wherein an editing instance is running on the dynamic graphics editing device, and the device includes:
[0068] The editing unit is used to perform target editing operations on the editing scene;
[0069] A communication unit is configured to send an editing command to a preview instance based on the target editing operation, wherein the editing command instructs the preview instance to perform the target editing operation on the preview scene of the preview instance.
[0070] As an optional implementation of this invention, the communication unit is further configured to receive first request information sent by the preview instance before sending the editing command to the preview instance, and to send object information to the preview instance according to the first request information;
[0071] The object information includes each object in the editing scene, each attribute of each object, and the attribute value of each attribute.
[0072] As an optional implementation of the present invention, the editing scene of the editing instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the preview scene.
[0073] As an optional implementation of the present invention, the editing unit is further configured to perform a save operation on the editing scene after performing a target editing operation on the editing scene, and in response to the save operation, save the editing scene after performing the target editing operation as a scene file of dynamic graphics.
[0074] As an optional implementation of this invention, the communication unit is further configured to receive a preview image of the dynamic graphic sent by the preview instance; and output the preview image of the dynamic graphic.
[0075] The preview image is generated based on the preview scene and dynamic content of the motion graphics after the target editing operation is performed.
[0076] As an optional implementation of this invention, the communication unit is further configured to receive a second request message sent by the preview instance, the second request message carrying an identifier of the target dynamic graphic; and to send response information to the preview instance according to the second request message, the response information including the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic.
[0077] Sixthly, embodiments of the invention provide a motion graphics editing device, characterized in that the motion graphics editing device runs a preview instance, and the device includes:
[0078] A construction unit is used to construct a preview scene for the preview instance, wherein the preview scene is the same as the editing scene for the editing instance;
[0079] The first editing unit is used to perform target editing operations on the editing scene of the editing instance;
[0080] The communication unit sends an editing command to the preview instance according to the target editing operation. The editing command is used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance.
[0081] The second editing unit is used to perform the target editing operation on the preview scene of the preview instance;
[0082] The preview unit is used to run the dynamic content of the motion graphics in the preview scene after the target editing operation is performed, so that the editing instance outputs a preview image of the motion graphics.
[0083] In a seventh aspect, embodiments of the present invention provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute any of the above-described dynamic graphics editing methods when the computer program is invoked.
[0084] Eighthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the above-described dynamic graphics editing methods.
[0085] Ninthly, embodiments of the present invention provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement any of the above-described dynamic graphics editing methods.
[0086] In the dynamic graphics editing method provided by this embodiment of the invention, the preview instance first constructs a preview scene identical to the editing scene of the editing instance. When it receives an editing command from the editing instance instructing the preview instance to perform a target editing operation on the preview scene, the preview instance performs the target editing operation on the preview scene based on the editing command. Then, based on the preview scene after the target editing operation and the dynamic content of the dynamic graphics, the preview image of the dynamic graphics is output. Since the preview scene constructed in the preview instance is the same as the editing scene of the editing instance, and the editing operation performed by the preview instance on the preview scene is also the same as the editing operation performed by the editing instance on the editing scene, the edited preview scene is still the same as the editing scene. Therefore, the dynamic graphics editing method provided by this embodiment of the invention can first preview the edited dynamic graphics based on the preview instance, satisfying the need to view the display effect after editing in real time. Furthermore, since the preview instance can already meet the need to view the display effect of the edited dynamic graphics, there is no need to run the dynamic content of the dynamic graphics in the editing instance. Therefore, it can avoid the scene file being accidentally modified during the intermediate process of saving the editing result as dynamic content. Thus, the embodiments of the present invention can view the display effect after editing in real time while avoiding the scene file of the dynamic graphics being accidentally modified during the intermediate process of saving the dynamic content. Attached Figure Description
[0087] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0088] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0089] Figure 1 This is one of the scene architecture diagrams of the dynamic graphics editing method provided in the embodiments of the present invention;
[0090] Figure 2 A second schematic diagram of the scene architecture of the dynamic graphics editing method provided in an embodiment of the present invention;
[0091] Figure 3 This is one of the flowcharts of the dynamic graphics editing method provided in the embodiments of the present invention;
[0092] Figure 4 The second flowchart of the dynamic graphics editing method provided in the embodiments of the present invention;
[0093] Figure 5 One of the schematic diagrams of the dynamic graphics editing device provided in the embodiments of the present invention;
[0094] Figure 6 A second schematic diagram of the dynamic graphics editing device provided in an embodiment of the present invention;
[0095] Figure 7 A third schematic diagram of the dynamic graphics editing device provided in an embodiment of the present invention;
[0096] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0097] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0098] Many specific details are set forth in the following description to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some, not all, of the embodiments of the invention. The terms "first" and "second," etc., in the specification and claims of this invention are used to distinguish objects of synchronization, not to describe a specific order of objects. For example, "first malicious category" and "second malicious category," etc., are used to distinguish different malicious categories, not to describe a specific order of malicious categories.
[0099] In the embodiments of the present invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Furthermore, in the description of the embodiments of the present invention, unless otherwise stated, "a plurality of" means two or more.
[0100] The following section first describes the scene architecture of the dynamic graphics editing method provided in the embodiments of the present invention.
[0101] Reference Figure 1As shown, a possible scenario architecture for the dynamic graphics editing method provided in this embodiment of the invention includes: a first dynamic graphics editing device 11 and a second dynamic graphics editing device 12. The first dynamic graphics editing device 11 runs a preview instance 110 for previewing dynamic graphics, and the second dynamic graphics editing device 12 runs an editing instance 120 for editing dynamic graphics. A network connection is established between the first dynamic graphics editing device 11 and the second dynamic graphics editing device 12, and the preview instance 110 and the editing instance 120 transmit data through the network connection between the first dynamic graphics editing device 11 and the second dynamic graphics editing device 12.
[0102] Reference Figure 2 As shown, another possible scenario architecture for the dynamic graphics editing method provided in this embodiment of the invention includes a dynamic graphics editing device 20. The dynamic graphics editing device 20 runs a preview instance 21 for previewing dynamic graphics, an editing instance 22 for editing dynamic graphics, and a communication module 23. Data transmission between the preview instance 21 and the editing instance 22 can be performed via the communication module 23. The communication module 23 may include a dynamic graphics editing device bus or a socket interface, etc.
[0103] Based on the above, this invention provides a dynamic graphics editing method, referring to... Figure 3 As shown, the dynamic graphics editing method provided in this embodiment of the invention includes the following steps:
[0104] S301, Preview Instance: Build a preview scene.
[0105] The preview scene is the same as the editing scene of the editing instance.
[0106] In other words, the preview instance constructs a preview scene that is completely identical to the editing scene of the edit instance. Furthermore, since the editing scene is the scene of the animated graphic to be edited, the preview scene is also the scene of the animated graphic to be edited.
[0107] S302, The editing instance performs the target editing operation on the editing scene.
[0108] The target editing operation in this embodiment of the invention may specifically include: editing operation of creating an object in the editing scene, editing operation of deleting an object in the editing scene, editing operation of modifying the attribute value of an object in the editing scene, etc. This embodiment of the invention does not limit the editing operation and may include any one or more operations for editing the editing scene.
[0109] S303. The editing instance sends an editing command to the preview instance according to the target editing operation.
[0110] Correspondingly, the preview instance receives the editing commands sent by the editing instance.
[0111] The edit command is used to instruct the preview instance to perform the target edit operation on the preview scene of the preview instance.
[0112] For example, if the target editing operation includes adding object A to the editing scene, then the editing command is used to instruct the preview instance to perform the editing operation of adding object A to the preview scene.
[0113] For example, if the target editing operation includes modifying the attribute value of attribute p of object B in the editing scene to x, then the editing command is used to instruct the preview instance to perform the editing operation of modifying the attribute value of attribute p of object B to x on the preview scene.
[0114] Optionally, the implementation of the editing instance sending editing commands to the preview instance based on the target editing operation may include:
[0115] The editing instance generates editing commands based on the target editing operation;
[0116] The editing instance serializes editing commands to obtain editing data;
[0117] The edit instance sends edit data to the preview instance.
[0118] Correspondingly, the implementation of the preview instance receiving the editing commands sent by the editing instance may include:
[0119] The preview instance receives editing data sent by the editing instance, the editing data including data obtained by serializing the editing command;
[0120] The preview instance deserializes the edit data to obtain the edit command.
[0121] That is, the editing command in this embodiment of the invention is used to characterize the editing operation performed by the editing instance on the editing scene. After the editing instance generates the editing command corresponding to the editing operation, it can first serialize the editing command into editing data, and then send the editing data to the preview instance. After receiving the editing data, the preview instance deserializes the editing data into editing command.
[0122] Furthermore, different editing commands can be used for different editing operations. For example, when the editing operation is to create an object of a specified type, the "Create Object" editing command can be used. As another example, when the editing operation is to set the value of a specified property of a specified object to a specified value, the "Set Property" editing command can be used.
[0123] S304. The preview instance performs the target editing operation on the preview scene based on the editing command.
[0124] Since the preview scene created by the preview instance is the same as the editing scene of the editing instance, and the editing operations performed by the preview instance on the preview scene are also the same as the editing operations performed by the editing instance on the editing scene, the preview scene after performing the target editing operation is still the same as the edited scene.
[0125] S305. The preview instance outputs a preview image of the dynamic graphics based on the preview scene and the dynamic content of the dynamic graphics after the target editing operation is performed.
[0126] Specifically, motion graphics mainly consist of two parts: a scene file and dynamic content. The scene file defines the initial values of attributes such as size, color, and position of objects in the motion graphics. Dynamic content refers to components used to modify the attributes of objects in the scene during motion graphics runtime, mainly including the driving system and scripts. During motion graphics execution, the dynamic content continuously modifies the attributes of objects in the scene, forming a series of continuous images. Based on the principle of visual persistence, these continuous images are displayed continuously, achieving a smooth visual change effect. Since the preview scene after performing the target editing operation is the same as the editing scene, the preview image of the motion graphics output based on the preview scene after performing the target editing operation and the dynamic content of the motion graphics is the preview image of the edited motion graphics. Therefore, users can view the display effect of the edited motion graphics through the preview image of the output instance.
[0127] It should be noted that after the preview of the animated graphic is output, the user can edit the scene again. If the user edits the scene again, the above steps S302 to S305 will be executed again until the user finishes editing the scene.
[0128] In the dynamic graphics editing method provided by this embodiment of the invention, the preview instance first constructs a preview scene identical to the editing scene of the editing instance. When it receives an editing command from the editing instance instructing the preview instance to perform a target editing operation on the preview scene, the preview instance performs the target editing operation on the preview scene based on the editing command. Then, based on the preview scene after the target editing operation and the dynamic content of the dynamic graphics, the preview image of the dynamic graphics is output. Since the preview scene constructed in the preview instance is the same as the editing scene of the editing instance, and the editing operation performed by the preview instance on the preview scene is also the same as the editing operation performed by the editing instance on the editing scene, the edited preview scene is still the same as the editing scene. Therefore, the dynamic graphics editing method provided by this embodiment of the invention can first preview the edited dynamic graphics based on the preview instance, satisfying the need to view the display effect after editing in real time. Furthermore, since the preview instance can already meet the need to view the display effect of the edited dynamic graphics, there is no need to run the dynamic content of the dynamic graphics in the editing instance. Therefore, it can avoid the scene file being incorrectly modified during the intermediate process of saving the editing result as dynamic content. Thus, the embodiments of the present invention can view the display effect after editing in real time while avoiding the scene file of the dynamic graphics being incorrectly modified during the intermediate process of saving the dynamic content.
[0129] It should also be noted that, compared to importing the animated graphic into a preview instance after editing, the above embodiments improve the real-time viewing of the edited display effect. Compared to importing the animated graphic into a preview instance in real time during editing, the above embodiments avoid frequent importing and exporting of animated graphics, thereby avoiding impacting the performance of the animated graphic editing device.
[0130] As an extension and refinement of the dynamic graphics editing method provided in the above embodiments, this invention provides another dynamic graphics editing method, specifically, referring to... Figure 4 As shown, the dynamic graphics editing method provided in this embodiment of the invention includes the following steps:
[0131] S401, The preview instance sends the first request information to the edit instance.
[0132] Correspondingly, the editing instance receives the first request information sent by the preview instance.
[0133] In this embodiment of the invention, the first request information is used to request information about objects in the editing scene. The object information includes each object in the editing scene, each attribute of each object, and the attribute value of each attribute.
[0134] S402. The editing instance sends object information to the preview instance based on the first request information.
[0135] Correspondingly, the preview instance receives the object information sent by the editing instance.
[0136] That is, the edit instance sends the attribute value of every attribute of every object in the edit scene to the preview instance.
[0137] For example, the object information can be shown in Table 1 below:
[0138] Table 1
[0139]
[0140] Optionally, the editing instance can send object information to the preview instance via a transport process. The transport process converts an object into one or more commands and sends these commands to the preview instance. These commands typically include an object creation command (Create Object) instructing the creation of the object, and multiple property setting commands (Set Property) instructing the setting of the object's property values.
[0141] In addition, before the editing instance sends object information to the preview instance, the editing instance can first send an initialization command (Reset) to the preview instance to instruct it to clear the objects in the preview scene. This allows the preview instance to clear the objects in the preview scene according to the initialization command and rebuild the preview scene based on the object information sent by the editing instance.
[0142] S403. The preview instance constructs a preview scene based on the object information.
[0143] Since the object information includes every object in the editing scene, every attribute of every object, and the attribute value of every attribute, the preview scene constructed based on the object information is the same as the editing scene.
[0144] S404. The editing instance performs the target editing operation on the editing scene.
[0145] S405. The editing instance sends an editing command to the preview instance according to the target editing operation.
[0146] Correspondingly, the preview instance receives the editing commands sent by the editing instance.
[0147] The edit command is used to instruct the preview instance to perform the target edit operation on the preview scene of the preview instance.
[0148] S406. The preview instance performs the target editing operation on the preview scene based on the editing command.
[0149] S407. The preview instance outputs a preview image of the dynamic graphics based on the preview scene and the dynamic content of the dynamic graphics after the target editing operation is performed.
[0150] The implementation methods of steps S404 to S407 are the same as those of steps S302 to S305, and the explanation of steps S404 to S407 will not be repeated here.
[0151] Similarly, if the editing instance performs editing operations on the editing scene multiple times, then steps S404 to S407 above will be executed multiple times until no more editing operations are performed on the editing scene.
[0152] S408. The preview instance sends a preview image of the motion graphics to the editing instance.
[0153] Correspondingly, the editing instance receives the preview image of the dynamic graphic sent by the preview instance.
[0154] The preview image is generated based on the preview scene and dynamic content of the motion graphics after the target editing operation is performed.
[0155] S409. Edit the instance to output a preview image of the dynamic graphics.
[0156] S410, The edit instance performs a save operation on the edit scene.
[0157] S411. In response to the save operation, the edited scene after performing the target edit operation is saved as a scene file of dynamic graphics.
[0158] As an optional implementation of the present invention, the dynamic graphics editing method provided by the present invention further includes the following steps a to c:
[0159] Step a: The preview instance sends a second request message to the edit instance.
[0160] Correspondingly, the edit instance receives the second request information sent by the preview instance.
[0161] The second request information carries an identifier for the target animated graphic.
[0162] Step b: The edit instance sends a response message to the preview instance.
[0163] Correspondingly, the preview instance receives the response information sent by the edit instance.
[0164] The response information includes the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic.
[0165] Step c: Based on the scene file of the target motion graphics and the dynamic content of the target motion graphics, output a preview image of the target motion graphics.
[0166] One application scenario of the above embodiment is: before editing a dynamic graphic, the display effect of the dynamic graphic is checked to determine whether editing is necessary. In this application scenario, steps a to c are executed before step S401 (the preview instance sends the first request information to the editing instance).
[0167] Another application scenario of the above embodiments is: a user views the display effect of the dynamic graphics generated by the editing instance to confirm whether the display effect of the dynamic graphics generated by the editing instance is the same as the preview dynamic graphics output by the preview instance. In this application scenario, steps a to c are executed after step S411 (the editing instance performs a save operation on the editing scene).
[0168] Optionally, the preview scene of the preview instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to the corresponding object in the editing scene.
[0169] Correspondingly, the editing scenario of the editing instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to the corresponding object in the preview scenario.
[0170] As an optional implementation of this invention, the target editing operation includes modifying the target attribute value of the target object to a first attribute value; correspondingly, the editing command includes: a first identifier for identifying the target object, a second identifier for identifying the target attribute, and the first attribute value.
[0171] For example, if the target editing operation is to change the attribute value of attribute p of object A in the editing scene to x, then the editing command includes the identifier of object A, the identifier of attribute p, and the attribute value x.
[0172] For example, the first identifier can be the GUID of the object.
[0173] As an optional implementation of this invention, the preview instance and the editing instance transmit data through a socket interface.
[0174] Because in Figure 1The scene architecture shown (preview and edit instances run on different physical devices) and Figure 2 In the scene architecture shown (where the preview instance and the editing instance run on the same physical device), both the preview instance and the editing instance can transmit data via a socket interface. Therefore, setting the preview instance and the editing instance to transmit data via a socket interface can unify the program code that implements the preview instance and the editing instance in various scene architectures, thereby reducing the workload of development.
[0175] This invention also provides another method for editing dynamic graphics, which includes:
[0176] Construct a preview scene for the preview instance, wherein the preview scene is the same as the editing scene for the editing instance;
[0177] Perform the target editing operation on the editing scenario of the editing instance;
[0178] An editing command is sent to the preview instance according to the target editing operation, and the editing command is used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance;
[0179] Perform the target editing operation on the preview scene of the preview instance;
[0180] The dynamic content of the motion graphics is run in the preview scene after the target editing operation is performed, so that the editing instance outputs a preview image of the motion graphics.
[0181] The dynamic graphics editing method provided in the above embodiments and Figure 3 The technical effects achievable by the dynamic graphics editing methods shown are similar, and will not be elaborated upon here.
[0182] Based on the same inventive concept, as an implementation of the above method, this embodiment of the invention also provides a dynamic graphics editing device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the dynamic graphics editing device in this embodiment can correspondingly implement all the contents of the aforementioned method embodiment.
[0183] This invention provides a dynamic graphics editing device, which has a preview instance running on it. Figure 5 This is a schematic diagram of the structure of the motion graphics editing device, as shown below. Figure 5 As shown, the motion graphics editing device 500 includes:
[0184] Construction unit 51 is used to construct a preview scene, which is the same as the editing scene of the editing instance;
[0185] The communication unit 52 is used to receive an editing command sent by the editing instance, the editing command being used to instruct the preview instance to perform a target editing operation on the preview scene, the target editing operation including the editing operation performed by the editing instance on the editing scene;
[0186] Editing unit 53 is used to perform the target editing operation on the preview scene based on the editing command;
[0187] The preview unit 54 is used to output a preview image of the dynamic graphics based on the preview scene and dynamic graphics after the target editing operation is performed.
[0188] As an optional implementation of this invention, the construction unit 51 is configured to send a first request message to the editing instance; receive object information sent by the editing instance, the object information including each object in the editing scene, each attribute of each object, and the attribute value of each attribute; and construct the preview scene based on the object information.
[0189] As an optional implementation of the present invention, the preview scene of the preview instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the editing scene.
[0190] As an optional implementation of this invention, the target editing operation includes modifying the target attribute value of the target object to a first attribute value;
[0191] The editing command includes: a first identifier of the target object, a second identifier for identifying the target attribute, and the first attribute value.
[0192] As an optional implementation of this invention, the communication unit 52 is specifically used to receive editing data sent by the editing instance, the editing data including data obtained by serializing the editing command; and to obtain the editing command by deserializing the editing data.
[0193] As an optional implementation of this invention, the communication unit 52 is specifically used to receive editing data sent by the editing instance through a socket interface.
[0194] As an optional implementation of the present invention, the communication unit 52 is further configured to send a preview image of the dynamic graphics to the editing instance after performing the target editing operation on the preview scene based on the editing command.
[0195] As an optional implementation of this invention, the communication unit 52 is further configured to send a second request message to the editing instance, the second request message carrying an identifier of the target dynamic graphic; and receive a response message sent by the editing instance, the response message including the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic;
[0196] The preview unit 54 is also used to output a preview image of the target dynamic graphic based on the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic.
[0197] This invention also provides another dynamic graphics editing device, which has an editing instance running on it. Figure 6 This is a schematic diagram of the structure of the motion graphics editing device, as shown below. Figure 6 As shown, the motion graphics editing device 600 includes:
[0198] Editing unit 61 performs target editing operations on the editing scene;
[0199] The communication unit 62 is used to send an editing command to the preview instance according to the target editing operation, the editing command being used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance.
[0200] As an optional implementation of this invention, the communication unit 62 is further configured to receive first request information sent by the preview instance before sending the editing command to the preview instance, and to send object information to the preview instance according to the first request information; wherein, the object information includes each object in the editing scene, each attribute of each object, and the attribute value of each attribute.
[0201] As an optional implementation of the present invention, the editing scene of the editing instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the preview scene.
[0202] As an optional implementation of the present invention, the editing unit 61 is further configured to perform a save operation on the editing scene after performing a target editing operation on the editing scene, and in response to the save operation, save the editing scene after performing the target editing operation as a scene file of dynamic graphics.
[0203] As an optional implementation of the present invention, the communication unit 61 is further configured to receive a preview image of the dynamic graphic sent by the preview instance, and output the preview image of the dynamic graphic.
[0204] The preview image is generated based on the preview scene and dynamic content of the motion graphics after the target editing operation is performed.
[0205] As an optional implementation of this invention, the communication unit 61 is further configured to receive a second request message sent by the preview instance, the second request message carrying an identifier of the target dynamic graphic; and to send response information to the preview instance according to the second request message, the response information including the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic.
[0206] This invention also provides another dynamic graphics editing device, which has a preview example running on it, see reference. Figure 7 As shown, the motion graphics editing device 700 includes:
[0207] The construction unit 71 is used to construct the preview scene of the preview instance, the preview scene being the same as the editing scene of the editing instance;
[0208] The first editing unit 72 is used to perform target editing operations on the editing scene of the editing instance;
[0209] Communication unit 73 sends an editing command to the preview instance according to the target editing operation, the editing command being used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance;
[0210] The second editing unit 74 is used to perform the target editing operation on the preview scene of the preview instance;
[0211] The preview unit 75 is used to run the dynamic content of the motion graphics in the preview scene after the target editing operation is performed, so that the editing instance outputs a preview image of the motion graphics.
[0212] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 8 As shown, the electronic device provided in this embodiment includes a memory 81 and a processor 82. The memory 81 is used to store computer programs; the processor 82 is used to execute the steps of the dynamic graphics editing method provided in the above embodiment when the computer program is invoked.
[0213] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the dynamic graphics editing method provided in the above embodiments.
[0214] This invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the dynamic graphics editing method provided in this embodiment.
[0215] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0216] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0217] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0218] Computer-readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media can store information using any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include transient computer-readable media, such as modulated data signals and carrier waves.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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 or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for editing dynamic graphics, characterized in that, Applied to a preview instance, the method includes: Construct a preview scene, which is the same as the editing scene of the editing instance, both being scenes of dynamic graphics to be edited; The system receives an editing command sent by the editing instance, the editing command being used to instruct the preview instance to perform a target editing operation on the preview scene, the target editing operation including the editing operation performed by the editing instance on the editing scene; The target editing operation is performed on the preview scene based on the editing command; Based on the preview scene and dynamic content of the animated graphic after the target editing operation is performed, the preview image of the animated graphic is output, and the editing instance does not run the dynamic content of the animated graphic; In response to the save operation, the edited scene after the target edit operation is performed is saved as a scene file of dynamic graphics.
2. The method according to claim 1, characterized in that, The construction preview scene includes: Send a first request message to the editing instance; Receive object information sent by the editing instance, the object information including each object in the editing scene, each attribute of each object, and the attribute value of each attribute; The preview scene is constructed based on the object information.
3. The method according to claim 1, characterized in that, The preview scene of the preview instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the editing scene.
4. The method according to claim 1, characterized in that, The target editing operation includes modifying the target attribute value of the target object to the first attribute value; The editing command includes: a first identifier of the target object, a second identifier for identifying the target attribute, and the first attribute value.
5. The method according to any one of claims 1 to 4, characterized in that, The receiving of editing commands sent by the editing instance includes: Receive editing data sent by the editing instance, the editing data including data obtained by serializing the editing command; The editing data is deserialized to obtain the editing command.
6. The method according to claim 5, characterized in that, The receipt of editing data sent by the editing instance includes: The editing data sent by the editing instance is received through the socket interface.
7. The method according to any one of claims 1 to 4, characterized in that, After performing the target editing operation on the preview scene based on the editing command, the method further includes: Send a preview image of the motion graphics to the editing instance.
8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Send a second request message to the editing instance, the second request message carrying an identifier of the target animation graphic; Receive response information sent by the editing instance, the response information including the scene file of the target dynamic graphic and the dynamic content of the target dynamic graphic; Based on the scene file of the target animated graphic and the dynamic content of the target animated graphic, a preview image of the target animated graphic is output.
9. A method for editing dynamic graphics, characterized in that, Applied to editing instances, the method includes: Perform the target editing operation on the editing scene; An editing command is sent to the preview instance according to the target editing operation. The editing command is used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance, so that the preview instance performs the target editing operation on the preview scene based on the editing command, and outputs the preview image of the dynamic graphics according to the preview scene and the dynamic content of the dynamic graphics after the target editing operation is performed; the editing instance does not run the dynamic content of the dynamic graphics; In response to the save operation, the edited scene after the target edit operation is performed is saved as a scene file of dynamic graphics.
10. The method according to claim 9, characterized in that, The method further includes: Before sending the edit command to the preview instance, receive the first request information sent by the preview instance; Based on the first request information, object information is sent to the preview instance. The object information includes each object in the editing scene, each attribute of each object, and the attribute value of each attribute.
11. The method according to claim 9, characterized in that, The editing scene of the editing instance includes at least one object, each object including a globally unique identifier (GUID), and the GUID is mapped to a corresponding object in the preview scene.
12. The method according to any one of claims 9 to 11, characterized in that, The method further includes: Receive a preview image of the dynamic graphic sent by the preview instance, wherein the preview image is generated based on the preview scene and the dynamic content of the dynamic graphic after the target editing operation is performed; Output a preview image of the animated graphic.
13. The method according to any one of claims 9 to 11, characterized in that, The method further includes: Receive a second request message sent by the preview instance, the second request message carrying an identifier of the target dynamic graphic; Based on the second request information, a response is sent to the preview instance. The response information includes the scene file of the target motion graphics and the dynamic content of the target motion graphics.
14. A method for editing dynamic graphics, characterized in that, include: Construct a preview scene for the preview instance, which is the same as the editing scene for the editing instance, both being scenes of dynamic graphics to be edited; Perform the target editing operation on the editing scenario of the editing instance; An editing command is sent to the preview instance according to the target editing operation, and the editing command is used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance; Perform the target editing operation on the preview scene of the preview instance; In the preview scene after the target editing operation is performed, the dynamic content of the motion graphics is run so that the editing instance outputs a preview image of the motion graphics, and the editing instance does not run the dynamic content of the motion graphics; In response to the save operation, the edited scene after the target edit operation is performed is saved as a scene file of dynamic graphics.
15. A dynamic graphics editing device, characterized in that, The motion graphics editing device runs a preview instance, and the device includes: A building unit is used to build a preview scene, which is the same as the editing scene of the editing instance; A communication unit is configured to receive an editing command sent by the editing instance, the editing command being used to instruct the preview instance to perform a target editing operation on the preview scene, the target editing operation including the editing operation performed by the editing instance on the editing scene; An editing unit is configured to perform the target editing operation on the preview scene based on the editing command; The preview unit is used to output a preview image of the dynamic graphics based on the preview scene and dynamic graphics after the target editing operation is performed, and the editing instance does not run the dynamic content of the dynamic graphics; In response to the save operation, the edited scene after the target edit operation is performed is saved as a scene file of dynamic graphics.
16. A dynamic graphics editing device, characterized in that, The dynamic graphics editing device runs an editing instance, and the device includes: The editing unit is used to perform target editing operations on the editing scene; A communication unit is configured to send an editing command to a preview instance according to the target editing operation. The editing command instructs the preview instance to perform the target editing operation on the preview scene of the preview instance, so that the preview instance performs the target editing operation on the preview scene based on the editing command, and outputs a preview image of the dynamic graphics based on the preview scene and the dynamic content of the dynamic graphics after the target editing operation is performed; the editing instance does not run the dynamic content of the dynamic graphics. The editing unit is also configured to, in response to a save operation, save the edited scene after the target editing operation is performed as a scene file of dynamic graphics.
17. A dynamic graphics editing device, characterized in that, The dynamic graphics editing device runs a preview instance and an editing instance, and the device includes: A construction unit is used to construct a preview scene for the preview instance, wherein the preview scene is the same as the editing scene for the editing instance; The first editing unit is used to perform target editing operations on the editing scene of the editing instance; The communication unit sends an editing command to the preview instance according to the target editing operation. The editing command is used to instruct the preview instance to perform the target editing operation on the preview scene of the preview instance. The second editing unit is used to perform the target editing operation on the preview scene of the preview instance; A preview unit is used to run the dynamic content of the motion graphics in the preview scene after the target editing operation is performed, so that the editing instance outputs a preview image of the motion graphics, and the editing instance does not run the dynamic content of the motion graphics; The first editing unit is further configured to, in response to a save operation, save the edited scene after the target editing operation is performed as a scene file of dynamic graphics.
18. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the dynamic graphics editing method according to any one of claims 1-14 when the computer program is invoked.
19. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the dynamic graphics editing method according to any one of claims 1-14.