浏览代码

Replaced CmdToggleBoolean with CmdSetValue

Daniel 9 年之前
父节点
当前提交
52af6a4de4
共有 3 个文件被更改,包括 5 次插入4 次删除
  1. 1 0
      editor/js/CmdAddScript.js
  2. 3 3
      editor/js/Sidebar.Material.js
  3. 1 1
      editor/js/Sidebar.Object3D.js

+ 1 - 0
editor/js/CmdAddScript.js

@@ -12,6 +12,7 @@ CmdAddScript = function ( object, script ) {
 	this.objectUuid = object !== undefined ? object.uuid : undefined;
 
 	this.script = script;
+
 };
 
 CmdAddScript.prototype = {

+ 3 - 3
editor/js/Sidebar.Material.js

@@ -443,7 +443,7 @@ Sidebar.Material = function ( editor ) {
 
 			if ( material.skinning !== undefined && material.skinning !== materialSkinning.getValue() ) {
 
-				editor.execute( new CmdToggleBooleanMaterial( currentObject, 'skinning' ) );
+				editor.execute( new CmdSetMaterialValue( currentObject, 'skinning', materialSkinning.getValue() ) );
 
 			}
 
@@ -668,7 +668,7 @@ Sidebar.Material = function ( editor ) {
 
 			if ( material.transparent !== undefined && material.transparent !== materialTransparent.getValue() ) {
 
-				editor.execute( new CmdToggleBooleanMaterial( currentObject, 'transparent' ) );
+				editor.execute( new CmdSetMaterialValue( currentObject, 'transparent', materialTransparent.getValue() ) );
 
 			}
 
@@ -680,7 +680,7 @@ Sidebar.Material = function ( editor ) {
 
 			if ( material.wireframe !== undefined && material.wireframe !== materialWireframe.getValue() ) {
 
-				editor.execute( new CmdToggleBooleanMaterial( currentObject, 'wireframe' ) );
+				editor.execute( new CmdSetMaterialValue( currentObject, 'wireframe', materialWireframe.getValue() ) );
 
 			}
 

+ 1 - 1
editor/js/Sidebar.Object3D.js

@@ -438,7 +438,7 @@ Sidebar.Object3D = function ( editor ) {
 
 			if ( object.visible !== objectVisible.getValue() ) {
 
-				editor.execute( new CmdToggleBoolean( object, 'visible' ) );
+				editor.execute( new CmdSetValue( object, 'visible', objectVisible.getValue() ) );
 
 			}