added correct group to character transform

This commit is contained in:
Quicksticks-oss committed 2024-04-08 00:00:47 -04:00
1 parent e8d4d92c01
commit ef83e2c8a4
1 file changed
+15 -2
+15 -2
View File
@@ -42,6 +42,7 @@ export class TimeLine {
animation_engine: AnimationEngine;
// lip sync engine
lipSync_engine: LipSyncEngine;
characters: {[key: string]: string};
scene: Scene;
@@ -55,6 +56,7 @@ export class TimeLine {
scene: Scene,
) {
this.timeline_items = [];
this.characters = {};
this.absolute_end = 60 * 12;
this.timeline_limit = 0; // 5 seconds
@@ -145,6 +147,10 @@ export class TimeLine {
obj.name = name;
let object_uuid = obj.uuid;
console.log("data.data", data.data)
this.characters[object_uuid] = type;
data.data['object_uuid'] = object_uuid;
Queue.publish({
queueName: QueueNames.FROM_ENGINE,
@@ -175,13 +181,20 @@ export class TimeLine {
let data_json = data['data'];
let uuid = data_json['object_uuid'];
let keyframe_uuid = data_json['keyframe_uuid'];
console.log(keyframe_uuid);
let object_name = this.scene.get_object_by_uuid(uuid)?.name;
if (object_name == undefined) {
object_name = "undefined"
}
for (let key in this.characters) {
let element = this.characters[key];
if (key == uuid) {
data_json['group'] = element;
break;
}
}
let new_item = this.transform_engine.addFrame(uuid,
this.absolute_end,
data_json['position'],
@@ -243,7 +256,7 @@ export class TimeLine {
this.addPlayableClip(
new ClipUI(
version,
"lipsync",// TODO potiential bug ..
type, // TODO potiential bug ..
group,
name,
media_id,