mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
Fixed deletion of objects still having transform engine point artifacts. (#293)

This commit is contained in:
1 parent
354aa0a084
commit
7cd9a573c2
3 files changed
+10
-3
No files matched your search
@@ -740,13 +740,14 @@ class Editor {
|
||||
|
||||
deleteObject(uuid: string) {
|
||||
const obj = this.activeScene.get_object_by_uuid(uuid);
|
||||
this.removeTransformControls();
|
||||
if (obj?.name === this.camera_name) {
|
||||
return;
|
||||
}
|
||||
if (obj) {
|
||||
this.activeScene.scene.remove(obj);
|
||||
}
|
||||
this.removeTransformControls();
|
||||
this.timeline.deleteObject(uuid);
|
||||
Queue.publish({
|
||||
queueName: QueueNames.FROM_ENGINE,
|
||||
action: fromEngineActions.DELETE_OBJECT,
|
||||
|
||||
@@ -127,14 +127,14 @@ class Scene {
|
||||
}
|
||||
|
||||
deletePoint(keyframe_uuid: string) {
|
||||
this.scene.traverse((object) => {
|
||||
this.scene.children.forEach(object => {
|
||||
if (object.userData.media_id) {
|
||||
const obj_keyframe_uuid = object.userData.media_id.replace(
|
||||
"Point::",
|
||||
"",
|
||||
);
|
||||
console.log(obj_keyframe_uuid);
|
||||
if (obj_keyframe_uuid === keyframe_uuid) {
|
||||
console.log("FOUNDDDD", obj_keyframe_uuid);
|
||||
console.log("Found!", object);
|
||||
this.scene.remove(object);
|
||||
return;
|
||||
|
||||
@@ -370,6 +370,12 @@ export class TimeLine {
|
||||
if (object?.name === this.camera_name) {
|
||||
return;
|
||||
}
|
||||
this.timeline_items.forEach(element => {
|
||||
if(element.type == ClipType.TRANSFORM && element.object_uuid == object_uuid){
|
||||
console.log(element)
|
||||
this.scene.deletePoint(element.clip_uuid);
|
||||
}
|
||||
});
|
||||
this.timeline_items = this.timeline_items.filter(
|
||||
(element) => element.object_uuid !== object_uuid,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user