mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge pull request #1607 from Areloch/Camera_MatEd_Crashfix
Select camera when in material editor crashfix.
This commit is contained in:
commit
6f672fe21d
1 changed files with 10 additions and 9 deletions
|
|
@ -4881,17 +4881,18 @@ DefineEngineMethod( ShapeBase, getTargetCount, S32, (),,
|
|||
|
||||
"@see getTargetName()\n")
|
||||
{
|
||||
ShapeBase *obj = dynamic_cast< ShapeBase* > ( object );
|
||||
if(obj)
|
||||
{
|
||||
// Try to use the client object (so we get the reskinned targets in the Material Editor)
|
||||
if ((ShapeBase*)obj->getClientObject())
|
||||
obj = (ShapeBase*)obj->getClientObject();
|
||||
ShapeBase *obj = dynamic_cast< ShapeBase* > ( object );
|
||||
if(obj)
|
||||
{
|
||||
// Try to use the client object (so we get the reskinned targets in the Material Editor)
|
||||
if ((ShapeBase*)obj->getClientObject())
|
||||
obj = (ShapeBase*)obj->getClientObject();
|
||||
|
||||
return obj->getShapeInstance()->getTargetCount();
|
||||
if (obj->getShapeInstance() != NULL)
|
||||
return obj->getShapeInstance()->getTargetCount();
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
DefineEngineMethod( ShapeBase, changeMaterial, void, ( const char* mapTo, Material* oldMat, Material* newMat ),,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue