mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Merge pull request #715 from Areloch/ConvexShapeSpawnFix
Fixes creation of convex shapes via editor
This commit is contained in:
commit
3812ce2e82
2 changed files with 6 additions and 0 deletions
|
|
@ -51,6 +51,8 @@ function ConvexEditorGui::onSleep( %this )
|
||||||
function ConvexEditorGui::createConvexBox( %this )
|
function ConvexEditorGui::createConvexBox( %this )
|
||||||
{
|
{
|
||||||
%obj = genericCreateObject( "ConvexShape" );
|
%obj = genericCreateObject( "ConvexShape" );
|
||||||
|
%obj.setMaterial(%this.materialName); //set whatever the editor has as it's default material to the new one
|
||||||
|
|
||||||
%this.handleDeselect();
|
%this.handleDeselect();
|
||||||
%this.selectConvex( %obj );
|
%this.selectConvex( %obj );
|
||||||
%this.dropSelectionAtScreenCenter();
|
%this.dropSelectionAtScreenCenter();
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,10 @@ function ObjectCreator::createObject( %this, %cmd )
|
||||||
%this.setNewObjectGroup( getScene(0) );
|
%this.setNewObjectGroup( getScene(0) );
|
||||||
|
|
||||||
pushInstantGroup();
|
pushInstantGroup();
|
||||||
|
|
||||||
|
if(startsWith(%cmd, "return "))
|
||||||
|
%objId = eval(%cmd);
|
||||||
|
else
|
||||||
%objId = eval("return " @ %cmd);
|
%objId = eval("return " @ %cmd);
|
||||||
popInstantGroup();
|
popInstantGroup();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue