Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed #209

  • Loading branch information...
commit c2698bbc7d33c5d405d8a1baaf1a4d4875514fb3 1 parent 80f7e1e
@keyemkey keyemkey authored
View
11 awaybuilder-core/src/awaybuilder/view/mediators/CoreEditorMediator.as
@@ -213,6 +213,7 @@ package awaybuilder.view.mediators
addContextListener(SceneEvent.REPARENT_LIGHTS, eventDispatcher_reparentLightsHandler);
addContextListener(SceneEvent.REPARENT_ANIMATIONS, eventDispatcher_reparentAnimationHandler);
+ addContextListener(SceneEvent.REPARENT_MATERIAL_EFFECT, eventDispatcher_reparentMaterialEffectHandler);
addContextListener(SceneEvent.ADD_NEW_TEXTURE, eventDispatcher_addNewTextureHandler);
addContextListener(SceneEvent.ADD_NEW_TEXTURE_PROJECTOR, eventDispatcher_addNewTextureHandler);
@@ -496,6 +497,16 @@ package awaybuilder.view.mediators
}
}
+ private function eventDispatcher_reparentMaterialEffectHandler(event:SceneEvent):void
+ {
+ for each( var item:DroppedAssetVO in event.newValue )
+ {
+ if( (item.value is EffectVO) && item.newParent && (item.newParent is MaterialVO) ) {
+ applyMaterial( item.newParent as MaterialVO );
+ }
+ }
+ }
+
private function eventDispatcher_reparentAnimationHandler(event:SceneEvent):void
{
for each( var item:DroppedAssetVO in event.newValue )
Please sign in to comment.
Something went wrong with that request. Please try again.