|
|
@@ -1,6 +1,6 @@
|
|
|
import { BaseNodeEditor } from '../BaseNodeEditor.js';
|
|
|
import { CodeEditorElement } from '../elements/CodeEditorElement.js';
|
|
|
-import { disposeScene, createElementFromJSON, isGPUNode, onValidType } from '../NodeEditorUtils.js';
|
|
|
+import { disposeScene, resetScene, createElementFromJSON, isGPUNode, onValidType } from '../NodeEditorUtils.js';
|
|
|
import { global, scriptable, js, scriptableValue } from 'three/tsl';
|
|
|
import { getColorFromType, setInputAestheticsFromType, setOutputAestheticsFromType } from '../DataTypeLib.js';
|
|
|
|
|
|
@@ -200,6 +200,8 @@ export class ScriptableEditor extends BaseNodeEditor {
|
|
|
|
|
|
disposeScene( editorOutputAdded );
|
|
|
|
|
|
+ resetScene( scene );
|
|
|
+
|
|
|
} else if ( composer && editorOutputAdded && editorOutputAdded.isPass === true ) {
|
|
|
|
|
|
composer.removePass( editorOutputAdded );
|
|
|
@@ -226,6 +228,8 @@ export class ScriptableEditor extends BaseNodeEditor {
|
|
|
|
|
|
disposeScene( editorOutputAdded );
|
|
|
|
|
|
+ resetScene( scene );
|
|
|
+
|
|
|
} else if ( composer && editorOutputAdded && editorOutputAdded.isPass === true ) {
|
|
|
|
|
|
composer.removePass( editorOutputAdded );
|
|
|
@@ -408,7 +412,7 @@ export class ScriptableEditor extends BaseNodeEditor {
|
|
|
|
|
|
_initExternalConnection() {
|
|
|
|
|
|
- setInputAestheticsFromType(this.title, 'CodeNode' ).onValid( onValidType( 'CodeNode' ) ).onConnect( () => {
|
|
|
+ setInputAestheticsFromType( this.title, 'CodeNode' ).onValid( onValidType( 'CodeNode' ) ).onConnect( () => {
|
|
|
|
|
|
this.hasExternalEditor ? this._toExternal() : this._toInternal();
|
|
|
|