@@ -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 = {
@@ -7,7 +7,7 @@ CmdAddScript = function ( object, script ) {
this.type = 'CmdAddScript';
- this.name = 'Add script';
+ this.name = 'Add Script';
this.objectUuid = object !== undefined ? object.uuid : undefined;
@@ -7,7 +7,7 @@ CmdMoveObject = function ( object, newParent, newBefore ) {
this.type = 'CmdMoveObject';
- this.name = 'Move object';
+ this.name = 'Move Object';
@@ -7,7 +7,7 @@ CmdRemoveObject = function ( object ) {
this.type = 'CmdRemoveObject';
- this.name = 'Remove object';
+ this.name = 'Remove Object';
this.parent = object !== undefined ? object.parent : undefined;
@@ -7,7 +7,7 @@ CmdRemoveScript = function ( object, script ) {
this.type = 'CmdRemoveScript';
- this.name = 'Remove script';
+ this.name = 'Remove Script';
@@ -7,7 +7,7 @@ CmdSetGeometry = function ( object, newGeometry ) {
this.type = 'CmdSetGeometry';
- this.name = 'Set geometry';
+ this.name = 'Set Geometry';
this.updatable = true;
@@ -7,7 +7,7 @@ CmdSetGeometryValue = function ( object, attributeName, newValue ) {
this.type = 'CmdSetGeometryValue';
- this.name = 'Set geometry.' + attributeName;
+ this.name = 'Set Geometry.' + attributeName;
this.attributeName = attributeName;
@@ -7,7 +7,7 @@ CmdSetMaterial = function ( object, newMaterial ) {
this.type = 'CmdSetMaterial';
- this.name = 'Set material';
+ this.name = 'New Material';
@@ -7,7 +7,7 @@ CmdSetMaterialColor = function ( object, attributeName, newValue ) {
this.type = 'CmdSetMaterialColor';
- this.name = 'Set material.' + attributeName;
+ this.name = 'Set Material.' + attributeName;
@@ -7,7 +7,7 @@ CmdSetMaterialMap = function ( object, mapName, newMap ) {
this.type = 'CmdSetMaterialMap';
- this.name = 'Set material.' + mapName;
+ this.name = 'Set Material.' + mapName;
this.mapName = mapName;
@@ -7,7 +7,7 @@ CmdSetMaterialValue = function ( object, attributeName, newValue ) {
this.type = 'CmdSetMaterialValue';
@@ -7,7 +7,7 @@ CmdSetPosition = function ( object, newPositionVector, oldPositionVector ) {
this.type = 'CmdSetPosition';
- this.name = 'Set position';
+ this.name = 'Set Position';
@@ -7,7 +7,7 @@ CmdSetRotation = function ( object, newRotationEuler, oldRotationEuler ) {
this.type = 'CmdSetRotation';
- this.name = 'Set rotation';
+ this.name = 'Set Rotation';
@@ -7,7 +7,7 @@ CmdSetScale = function ( object, newScaleVector, oldScaleVector ) {
this.type = 'CmdSetScale';
- this.name = 'Set scale';
+ this.name = 'Set Scale';
@@ -7,7 +7,7 @@ CmdSetScene = function ( oldScene, newScene ) {
this.type = 'CmdSetScene';
- this.name = 'Set scene';
+ this.name = 'Set Scene';
this.cmdArray = [];
@@ -7,7 +7,7 @@ CmdSetScriptValue = function ( object, script, attributeName, newValue, cursorPo
this.type = 'CmdSetScriptValue';
- this.name = 'Set script.' + attributeName;
+ this.name = 'Set Script.' + attributeName;
@@ -7,7 +7,7 @@ CmdSetUuid = function ( object, newUuid ) {
this.type = 'CmdSetUuid';
- this.name = 'Update uuid';
+ this.name = 'Update UUID';
@@ -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" ) );
@@ -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