Permalink
Browse files

Web version updated

Pivot point panel updated
  • Loading branch information...
1 parent e490764 commit 4557b33473a26168b657637a6ad6548d171e4fea @keyemkey keyemkey committed Jul 2, 2013
Showing with 578 additions and 673 deletions.
  1. +11 −5 awaybuilder-core/src/awaybuilder/CoreContext.as
  2. +3 −4 ...rc/awaybuilder/web → awaybuilder-core/src/awaybuilder}/controller/ShowTextureSizeErrorsCommand.as
  3. +2 −2 awaybuilder-core/src/awaybuilder/controller/document/SaveDocumentFailCommand.as
  4. +2 −2 awaybuilder-core/src/awaybuilder/controller/document/SaveDocumentSuccessCommand.as
  5. +1 −1 ...c/awaybuilder/web → awaybuilder-core/src/awaybuilder}/controller/events/TextureSizeErrorsEvent.as
  6. +4 −4 awaybuilder-core/src/awaybuilder/controller/scene/TranslatePivotCommand.as
  7. +4 −3 awaybuilder-core/src/awaybuilder/controller/scene/events/SceneEvent.as
  8. +5 −2 awaybuilder-core/src/awaybuilder/model/{WindowModel.as → ApplicationModel.as}
  9. +3 −2 awaybuilder-core/src/awaybuilder/model/IDocumentService.as
  10. +1 −0 awaybuilder-core/src/awaybuilder/model/SmartDocumentServiceBase.as
  11. +8 −6 awaybuilder-core/src/awaybuilder/view/components/LibraryPanel.mxml
  12. +231 −0 awaybuilder-core/src/awaybuilder/view/components/controls/tree/GenericDataDescriptor.as
  13. +2 −183 awaybuilder-core/src/awaybuilder/view/components/controls/tree/SceneDataDescriptor.as
  14. +1 −1 awaybuilder-core/src/awaybuilder/view/components/controls/tree/Tree.as
  15. +6 −91 awaybuilder-core/src/awaybuilder/view/components/editors/ContainerGroupPropertiesEditor.mxml
  16. +4 −61 awaybuilder-core/src/awaybuilder/view/components/editors/ContainerPropertiesEditor.mxml
  17. +6 −84 awaybuilder-core/src/awaybuilder/view/components/editors/MeshGroupPropertiesEditor.mxml
  18. +7 −50 awaybuilder-core/src/awaybuilder/view/components/editors/MeshPropertiesEditor.mxml
  19. +4 −2 awaybuilder-core/src/awaybuilder/view/components/editors/events/PropertyEditorEvent.as
  20. +141 −0 awaybuilder-core/src/awaybuilder/view/components/editors/renderers/TransformationsGroup.mxml
  21. +2 −2 awaybuilder-core/src/awaybuilder/view/components/popup/TextureSizeWarningPopup.mxml
  22. +20 −18 awaybuilder-core/src/awaybuilder/view/mediators/CoreEditorMediator.as
  23. +15 −3 awaybuilder-core/src/awaybuilder/view/mediators/PropertiesPanelMediator.as
  24. +0 −5 awaybuilder-desktop/src/awaybuilder/desktop/DesktopAppContext.as
  25. +2 −2 awaybuilder-desktop/src/awaybuilder/desktop/controller/CloseDocumentCommand.as
  26. +2 −2 awaybuilder-desktop/src/awaybuilder/desktop/controller/DocumentRequestCommand.as
  27. +0 −23 awaybuilder-desktop/src/awaybuilder/desktop/controller/ShowTextureSizeErrorsCommand.as
  28. +0 −19 awaybuilder-desktop/src/awaybuilder/desktop/controller/events/TextureSizeErrorsEvent.as
  29. +11 −20 awaybuilder-desktop/src/awaybuilder/desktop/model/DesktopDocumentService.as
  30. +1 −15 awaybuilder-desktop/src/awaybuilder/desktop/view/mediators/ApplicationMediator.as
  31. +2 −2 awaybuilder-desktop/src/awaybuilder/desktop/view/mediators/EditedDocumentWarningWindowMediator.as
  32. +12 −12 awaybuilder-web/src/AwayBuilderApplication.mxml
  33. +1 −4 awaybuilder-web/src/awaybuilder/web/WebAppContext.as
  34. +2 −2 awaybuilder-web/src/awaybuilder/web/controller/CloseDocumentCommand.as
  35. +2 −2 awaybuilder-web/src/awaybuilder/web/controller/DocumentRequestCommand.as
  36. +0 −20 awaybuilder-web/src/awaybuilder/web/controller/events/AboutEvent.as
  37. +54 −15 awaybuilder-web/src/awaybuilder/web/model/DocumentService.as
  38. +6 −4 awaybuilder-web/src/awaybuilder/web/view/mediators/ApplicationMediator.as
@@ -1,6 +1,7 @@
package awaybuilder
{
import awaybuilder.controller.ReadDocumentDataFaultCommand;
+ import awaybuilder.controller.ShowTextureSizeErrorsCommand;
import awaybuilder.controller.StartupCommand;
import awaybuilder.controller.clipboard.CopyCommand;
import awaybuilder.controller.clipboard.PasteCommand;
@@ -25,6 +26,7 @@ package awaybuilder
import awaybuilder.controller.events.ReplaceDocumentDataEvent;
import awaybuilder.controller.events.SaveDocumentEvent;
import awaybuilder.controller.events.SettingsEvent;
+ import awaybuilder.controller.events.TextureSizeErrorsEvent;
import awaybuilder.controller.history.RedoCommand;
import awaybuilder.controller.history.UndoCommand;
import awaybuilder.controller.history.UndoRedoEvent;
@@ -77,11 +79,12 @@ package awaybuilder
import awaybuilder.controller.scene.SwitchTransformScaleModeCommand;
import awaybuilder.controller.scene.SwitchTransformTranslateModeCommand;
import awaybuilder.controller.scene.TranslateCommand;
+ import awaybuilder.controller.scene.TranslatePivotCommand;
import awaybuilder.controller.scene.events.SceneEvent;
import awaybuilder.model.AssetsModel;
import awaybuilder.model.DocumentModel;
import awaybuilder.model.UndoRedoModel;
- import awaybuilder.model.WindowModel;
+ import awaybuilder.model.ApplicationModel;
import awaybuilder.view.components.CoreEditor;
import awaybuilder.view.components.EditStatusBar;
import awaybuilder.view.components.EditToolBar;
@@ -133,9 +136,10 @@ package awaybuilder
this.commandMap.mapEvent(SceneEvent.SWITCH_TRANSFORM_SCALE, SwitchTransformScaleModeCommand);
this.commandMap.mapEvent(SceneEvent.SWITCH_TRANSFORM_TRANSLATE, SwitchTransformTranslateModeCommand);
- this.commandMap.mapEvent(SceneEvent.ROTATE_OBJECT, RotateCommand);
- this.commandMap.mapEvent(SceneEvent.TRANSLATE_OBJECT, TranslateCommand);
- this.commandMap.mapEvent(SceneEvent.SCALE_OBJECT, ScaleCommand);
+ this.commandMap.mapEvent(SceneEvent.ROTATE, RotateCommand);
+ this.commandMap.mapEvent(SceneEvent.TRANSLATE, TranslateCommand);
+ this.commandMap.mapEvent(SceneEvent.TRANSLATE_PIVOT, TranslatePivotCommand);
+ this.commandMap.mapEvent(SceneEvent.SCALE, ScaleCommand);
this.commandMap.mapEvent(SceneEvent.DELETE, DeleteCommand);
this.commandMap.mapEvent(SceneEvent.SELECT, SelectCommand);
@@ -198,10 +202,12 @@ package awaybuilder
commandMap.mapEvent( UndoRedoEvent.REDO, RedoCommand );
commandMap.mapEvent( UndoRedoEvent.UNDO, UndoCommand );
+ commandMap.mapEvent(TextureSizeErrorsEvent.SHOW_TEXTURE_SIZE_ERRORS, ShowTextureSizeErrorsCommand);
+
this.injector.mapSingleton(DocumentModel);
this.injector.mapSingleton(AssetsModel);
this.injector.mapSingleton(UndoRedoModel);
- this.injector.mapSingleton(WindowModel);
+ this.injector.mapSingleton(ApplicationModel);
this.mediatorMap.mapView(CoreEditor, CoreEditorMediator);
this.mediatorMap.mapView(PropertiesPanel, PropertiesPanelMediator);
@@ -1,9 +1,8 @@
-package awaybuilder.web.controller
+package awaybuilder.controller
{
- import awaybuilder.view.components.popup.TextureSizeWarningPopup;
- import awaybuilder.web.controller.events.TextureSizeErrorsEvent;
+ import awaybuilder.controller.events.TextureSizeErrorsEvent;
import awaybuilder.model.DocumentModel;
-
+ import awaybuilder.view.components.popup.TextureSizeWarningPopup;
import org.robotlegs.mvcs.Command;
@@ -5,14 +5,14 @@ package awaybuilder.controller.document
import awaybuilder.utils.logging.AwayBuilderLogger;
import awaybuilder.model.DocumentModel;
import awaybuilder.model.DocumentModel;
- import awaybuilder.model.WindowModel;
+ import awaybuilder.model.ApplicationModel;
import org.robotlegs.mvcs.Command;
public class SaveDocumentFailCommand extends Command
{
[Inject]
- public var windowModel:WindowModel;
+ public var windowModel:ApplicationModel;
[Inject]
public var event:SaveDocumentEvent;
@@ -5,7 +5,7 @@ package awaybuilder.controller.document
import awaybuilder.controller.events.SaveDocumentEvent;
import awaybuilder.model.DocumentModel;
import awaybuilder.model.DocumentModel;
- import awaybuilder.model.WindowModel;
+ import awaybuilder.model.ApplicationModel;
import org.robotlegs.mvcs.Command;
@@ -18,7 +18,7 @@ package awaybuilder.controller.document
public var documentModel:DocumentModel;
[Inject]
- public var windowModel:WindowModel;
+ public var windowModel:ApplicationModel;
override public function execute():void
{
@@ -1,4 +1,4 @@
-package awaybuilder.web.controller.events
+package awaybuilder.controller.events
{
import flash.events.Event;
@@ -19,10 +19,10 @@ package awaybuilder.controller.scene
for( var i:int = 0; i < event.items.length; i++ )
{
var asset:ObjectVO = event.items[i] as ObjectVO;
- oldValues.push( new Vector3D( asset.x, asset.y, asset.z ) );
- asset.pivotX = isNaN(newValues[i].x)?asset.x:newValues[i].x;
- asset.pivotY = isNaN(newValues[i].y)?asset.y:newValues[i].y;
- asset.pivotZ = isNaN(newValues[i].z)?asset.z:newValues[i].z;
+ oldValues.push( new Vector3D( asset.pivotX, asset.pivotY, asset.pivotZ ) );
+ asset.pivotX = isNaN(newValues[i].x)?asset.pivotX:newValues[i].x;
+ asset.pivotY = isNaN(newValues[i].y)?asset.pivotY:newValues[i].y;
+ asset.pivotZ = isNaN(newValues[i].z)?asset.pivotZ:newValues[i].z;
}
saveOldValue( event, oldValues );
@@ -10,9 +10,10 @@ import flash.events.Event;
public static const SELECT:String = "sceneItemSelect";
public static const CHANGING:String = "sceneItemChanging";
- public static const TRANSLATE_OBJECT:String = "translateObject";
- public static const ROTATE_OBJECT:String = "rotateObject";
- public static const SCALE_OBJECT:String = "scaleObject";
+ public static const TRANSLATE:String = "translateObject";
+ public static const TRANSLATE_PIVOT:String = "translateObjectPivot";
+ public static const ROTATE:String = "rotateObject";
+ public static const SCALE:String = "scaleObject";
public static const CHANGE_GLOBAL_OPTIONS:String = "changeGlobalOptions";
@@ -1,12 +1,15 @@
package awaybuilder.model
{
import flash.events.Event;
-
+
import org.robotlegs.mvcs.Actor;
- public class WindowModel extends Actor
+ public class ApplicationModel extends Actor
{
public var isWaitingForClose:Boolean = false;
+
public var savedNextEvent:Event;
+
+ public var simpleSaveEnabled:Boolean = true;
}
}
@@ -6,8 +6,9 @@ package awaybuilder.model
public interface IDocumentService
{
- function save(data:Object, path:String):void;
- function saveAs(data:Object, defaultName:String):void;
+ function save(data:DocumentModel, path:String):void;
+ function saveAs(data:DocumentModel, defaultName:String):void;
+
function open( type:String, createNew:Boolean, event:Event ):void
function openBitmap( items:Array, property:String ):void;
@@ -59,6 +59,7 @@ package awaybuilder.model
private var _loaderToken:AssetLoaderToken;
private var _tempAnimations:Vector.<Object>;
+
protected function loadBitmap( url:String ):void
{
var loader:Loader = new Loader();
@@ -69,6 +69,8 @@
import awaybuilder.model.vo.DroppedAssetVO;
import awaybuilder.model.vo.DroppedTreeItemVO;
import awaybuilder.model.vo.scene.AssetVO;
+ import awaybuilder.view.components.controls.tree.SceneDataDescriptor;
+ import awaybuilder.view.components.controls.tree.TreeDataProvider;
import awaybuilder.view.components.controls.tree.TreeEvent;
import awaybuilder.view.components.events.LibraryPanelEvent;
@@ -376,6 +378,7 @@
<controls:SceneTree id="sceneTree" dataProvider="{model.scene}" selectedItems="{selectedItems}" indentation="16"
dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" allowMultipleSelection="true"
focusSkin="mx.core.UIComponent"
+ dataDescriptor="{new SceneDataDescriptor()}"
change="tree_changeHandler(event)"
itemDropped="sceneTree_itemDroppedHandler(event)"
dragComplete="sceneTree_dragCompleteHandler(event)"
@@ -387,7 +390,7 @@
collapsedChange="panel_collapsedChangeHandler(event)"
addNewItem="materialsPanel_addNewItemHandler(event)">
<tree:Tree id="materialTree" dataProvider="{model.materials}" selectedItems="{selectedItems}" indentation="16"
- allowMultipleSelection="true"
+ allowMultipleSelection="true" focusSkin="mx.core.UIComponent"
change="tree_changeHandler(event)"
mouseDown="sceneTree_mouseDownHandler(event)"
width="100%" height="100%"/>
@@ -397,15 +400,15 @@
collapsedChange="panel_collapsedChangeHandler(event)"
addNewItem="texturesPanel_addNewItemHandler(event)">
<tree:Tree id="texturesTree" dataProvider="{model.textures}" selectedItems="{selectedItems}" indentation="16"
- allowMultipleSelection="true"
+ allowMultipleSelection="true" focusSkin="mx.core.UIComponent"
change="tree_changeHandler(event)"
width="100%" height="100%"/>
</controls:LibraryCollapsiblePanel>
<controls:LibraryCollapsiblePanel id="geometryPanel" skinClass="awaybuilder.view.skins.CollapsibleDropdownLibraryPanelSkin" borderVisible="false"
title="Geometry" height="24" width="100%" collapsed="true" collapsedChange="panel_collapsedChangeHandler(event)"
addNewItem="geometryPanel_addNewItemHandler(event)" addEnabled="true">
<tree:Tree id="geometryTree" dataProvider="{model.geometry}" selectedItems="{selectedItems}" indentation="16"
- allowMultipleSelection="true"
+ allowMultipleSelection="true" focusSkin="mx.core.UIComponent"
change="tree_changeHandler(event)"
width="100%" height="100%"/>
</controls:LibraryCollapsiblePanel>
@@ -414,7 +417,7 @@
collapsedChange="panel_collapsedChangeHandler(event)"
addNewItem="methodsPanel_addNewItemHandler(event)">
<tree:Tree id="methodsTree" dataProvider="{model.methods}" selectedItems="{selectedItems}" indentation="16"
- allowMultipleSelection="true"
+ allowMultipleSelection="true" focusSkin="mx.core.UIComponent"
dragMoveEnabled="false" dragEnabled="true"
dragStart="tree_dragStartHandler(event)" dragComplete="methodsTree_dragCompleteHandler(event)"
change="tree_changeHandler(event)"
@@ -426,8 +429,7 @@
collapsedChange="panel_collapsedChangeHandler(event)"
addNewItem="animationsPanel_addNewItemHandler(event)">
<controls:AnimationTree id="animationsTree" dataProvider="{model.animations}" selectedItems="{selectedItems}" indentation="16"
- allowMultipleSelection="true"
- focusSkin="mx.core.UIComponent"
+ allowMultipleSelection="true" focusSkin="mx.core.UIComponent"
dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
change="tree_changeHandler(event)"
dragStart="tree_dragStartHandler(event)"
Oops, something went wrong.

0 comments on commit 4557b33

Please sign in to comment.