diff --git a/Templates/BaseGame/game/tools/shapeEditor/main.cs b/Templates/BaseGame/game/tools/shapeEditor/main.cs index fe40ed882..5354c20c3 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/main.cs +++ b/Templates/BaseGame/game/tools/shapeEditor/main.cs @@ -235,7 +235,7 @@ function ShapeEditorPlugin::onActivated(%this) { %obj = EWorldEditor.getSelectedObject(%i); %shapeFile = ShapeEditor.getObjectShapeFile(%obj); - if (%shapeFile !$= "") + if (%shapeFile !$= "" && isFile(%shapeFile)) { if (!isObject(ShapeEditor.shape) || (ShapeEditor.shape.baseShape !$= %shapeFile)) { @@ -251,6 +251,10 @@ function ShapeEditorPlugin::onActivated(%this) } break; } + else if(%shapeFile !$= "") + { + %this.openShapeAssetId(%shapeFile); + } } } diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs index 4272d7b1c..df59cceec 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs @@ -58,7 +58,7 @@ function ShapeEditor::getObjectShapeFile( %this, %obj ) // works for the vast majority of object types) %path = ""; if ( %obj.isMemberOfClass( "TSStatic" ) ) - %path = %obj.shapeName; + %path = %obj.shapeAsset !$= "" ? %obj.shapeAsset : %obj.shapeName; else if ( %obj.isMemberOfClass( "PhysicsShape" ) ) %path = %obj.getDataBlock().shapeName; else if ( %obj.isMemberOfClass( "GameBase" ) )