Pārlūkot izejas kodu

Renamed command names

Daniel 9 gadi atpakaļ
vecāks
revīzija
ea075f5595

+ 1 - 1
editor/js/CmdAddObject.js

@@ -7,11 +7,11 @@ CmdAddObject = function ( object ) {
 	Cmd.call( this );
 
 	this.type = 'CmdAddObject';
-	this.name = 'Add object';
 
 	this.object = object;
 	if ( object !== undefined ) {
 
+		this.name = 'Add Object: ' + object.name;
 		object.updateMatrixWorld( true );
 
 		meta = {

+ 1 - 1
editor/js/CmdAddScript.js

@@ -7,7 +7,7 @@ CmdAddScript = function ( object, script ) {
 	Cmd.call( this );
 
 	this.type = 'CmdAddScript';
-	this.name = 'Add script';
+	this.name = 'Add Script';
 
 	this.object = object;
 	this.objectUuid = object !== undefined ? object.uuid : undefined;

+ 1 - 1
editor/js/CmdMoveObject.js

@@ -7,7 +7,7 @@ CmdMoveObject = function ( object, newParent, newBefore ) {
 	Cmd.call( this );
 
 	this.type = 'CmdMoveObject';
-	this.name = 'Move object';
+	this.name = 'Move Object';
 
 	this.object = object;
 	this.objectUuid = object !== undefined ? object.uuid : undefined;

+ 1 - 1
editor/js/CmdRemoveObject.js

@@ -7,7 +7,7 @@ CmdRemoveObject = function ( object ) {
 	Cmd.call( this );
 
 	this.type = 'CmdRemoveObject';
-	this.name = 'Remove object';
+	this.name = 'Remove Object';
 
 	this.object = object;
 	this.parent = object !== undefined ? object.parent : undefined;

+ 1 - 1
editor/js/CmdRemoveScript.js

@@ -7,7 +7,7 @@ CmdRemoveScript = function ( object, script ) {
 	Cmd.call( this );
 
 	this.type = 'CmdRemoveScript';
-	this.name = 'Remove script';
+	this.name = 'Remove Script';
 
 	this.object = object;
 	this.objectUuid = object !== undefined ? object.uuid : undefined;

+ 1 - 1
editor/js/CmdSetGeometry.js

@@ -7,7 +7,7 @@ CmdSetGeometry = function ( object, newGeometry ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetGeometry';
-	this.name = 'Set geometry';
+	this.name = 'Set Geometry';
 	this.updatable = true;
 
 	this.object = object;

+ 1 - 1
editor/js/CmdSetGeometryValue.js

@@ -7,7 +7,7 @@ CmdSetGeometryValue = function ( object, attributeName, newValue ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetGeometryValue';
-	this.name = 'Set geometry.' + attributeName;
+	this.name = 'Set Geometry.' + attributeName;
 
 	this.object = object;
 	this.attributeName = attributeName;

+ 1 - 1
editor/js/CmdSetMaterial.js

@@ -7,7 +7,7 @@ CmdSetMaterial = function ( object, newMaterial ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetMaterial';
-	this.name = 'Set material';
+	this.name = 'New Material';
 
 	this.object = object;
 	this.objectUuid = object !== undefined ? object.uuid : undefined;

+ 1 - 1
editor/js/CmdSetMaterialColor.js

@@ -7,7 +7,7 @@ CmdSetMaterialColor = function ( object, attributeName, newValue ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetMaterialColor';
-	this.name = 'Set material.' + attributeName;
+	this.name = 'Set Material.' + attributeName;
 	this.updatable = true;
 
 	this.object = object;

+ 1 - 1
editor/js/CmdSetMaterialMap.js

@@ -7,7 +7,7 @@ CmdSetMaterialMap = function ( object, mapName, newMap ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetMaterialMap';
-	this.name = 'Set material.' + mapName;
+	this.name = 'Set Material.' + mapName;
 
 	this.object = object;
 	this.mapName = mapName;

+ 1 - 1
editor/js/CmdSetMaterialValue.js

@@ -7,7 +7,7 @@ CmdSetMaterialValue = function ( object, attributeName, newValue ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetMaterialValue';
-	this.name = 'Set material.' + attributeName;
+	this.name = 'Set Material.' + attributeName;
 	this.updatable = true;
 
 	this.object = object;

+ 1 - 1
editor/js/CmdSetPosition.js

@@ -7,7 +7,7 @@ CmdSetPosition = function ( object, newPositionVector, oldPositionVector ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetPosition';
-	this.name = 'Set position';
+	this.name = 'Set Position';
 	this.updatable = true;
 
 	this.object = object;

+ 1 - 1
editor/js/CmdSetRotation.js

@@ -7,7 +7,7 @@ CmdSetRotation = function ( object, newRotationEuler, oldRotationEuler ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetRotation';
-	this.name = 'Set rotation';
+	this.name = 'Set Rotation';
 	this.updatable = true;
 
 	this.object = object;

+ 1 - 1
editor/js/CmdSetScale.js

@@ -7,7 +7,7 @@ CmdSetScale = function ( object, newScaleVector, oldScaleVector ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetScale';
-	this.name = 'Set scale';
+	this.name = 'Set Scale';
 	this.updatable = true;
 
 	this.object = object;

+ 1 - 1
editor/js/CmdSetScene.js

@@ -7,7 +7,7 @@ CmdSetScene = function ( oldScene, newScene ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetScene';
-	this.name = 'Set scene';
+	this.name = 'Set Scene';
 
 	this.cmdArray = [];
 

+ 1 - 1
editor/js/CmdSetScriptValue.js

@@ -7,7 +7,7 @@ CmdSetScriptValue = function ( object, script, attributeName, newValue, cursorPo
 	Cmd.call( this );
 
 	this.type = 'CmdSetScriptValue';
-	this.name = 'Set script.' + attributeName;
+	this.name = 'Set Script.' + attributeName;
 	this.updatable = true;
 
 	this.object = object;

+ 1 - 1
editor/js/CmdSetUuid.js

@@ -7,7 +7,7 @@ CmdSetUuid = function ( object, newUuid ) {
 	Cmd.call( this );
 
 	this.type = 'CmdSetUuid';
-	this.name = 'Update uuid';
+	this.name = 'Update UUID';
 
 	this.object = object;
 

+ 6 - 1
editor/js/Menubar.Edit.js

@@ -188,7 +188,12 @@ Menubar.Edit = function ( editor ) {
 			}
 
 		} );
-		editor.execute( new CmdMultiCmds( cmds ), 'Minify Shaders' );
+
+		if ( nMaterialsChanged > 0 ) {
+
+			editor.execute( new CmdMultiCmds( cmds ), 'Minify Shaders' );
+
+		}
 
 		window.alert( nMaterialsChanged +
 				" material(s) were changed.\n" + errors.join( "\n" ) );

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

@@ -410,7 +410,7 @@ Sidebar.Material = function ( editor ) {
 
 				material = new THREE[ materialClass.getValue() ]();
 
-				editor.execute( new CmdSetMaterial( currentObject, material ) );
+				editor.execute( new CmdSetMaterial( currentObject, material ), 'New Material: ' + materialClass.getValue() );
 				// TODO Copy other references in the scene graph
 				// keeping name and UUID then.
 				// Also there should be means to create a unique