mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-13 21:32:18 +00:00
Merge pull request #162 from storytold/feature/bugfix-delete-camera
Camera can no longer be deleted.
This commit is contained in:
2 files changed
+3
No files matched your search
@@ -653,6 +653,7 @@ class Editor {
|
||||
|
||||
deleteObject(uuid: string) {
|
||||
const obj = this.activeScene.get_object_by_uuid(uuid);
|
||||
if(obj?.name === "::CAM::") { return; }
|
||||
if (obj) {
|
||||
this.activeScene.scene.remove(obj);
|
||||
}
|
||||
|
||||
@@ -245,6 +245,8 @@ export class TimeLine {
|
||||
}
|
||||
|
||||
public deleteObject(object_uuid: string) {
|
||||
let object = this.scene.get_object_by_uuid(object_uuid);
|
||||
if(object?.name === "::CAM::") { return; }
|
||||
this.timeline_items = this.timeline_items.filter(
|
||||
(element) => element.object_uuid !== object_uuid,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user