mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Fixes logic when opening shapeEditor with a TSStatic selected, it'll attempt to load up the shapeAsset if one is set on the static.
This commit is contained in:
parent
31039de2cf
commit
55e24926e4
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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" ) )
|
||||
|
|
|
|||
Loading…
Reference in a new issue