forked from bartvdbraak/blender
BGE: Fix T46338 replace mesh from an other scene.
To make consistent with KX_GameObject.replaceMesh, we don't allow this behavior but print an error message for the replace mesh actuator. e.g : Warning: object "Cube" from ReplaceMesh actuator "Edit Object" uses a mesh not owned by an object in scene "scene1" Reviewers: youle.
This commit is contained in:
parent
0e80d0893f
commit
8d3d931f6a
@ -505,6 +505,13 @@ void BL_ConvertActuators(const char* maggiename,
|
||||
{
|
||||
RAS_MeshObject *tmpmesh = converter->FindGameMesh(editobact->me);
|
||||
|
||||
if (!tmpmesh) {
|
||||
std::cout << "Warning: object \"" << objectname <<
|
||||
"\" from ReplaceMesh actuator \"" << uniquename <<
|
||||
"\" uses a mesh not owned by an object in scene \"" <<
|
||||
scene->GetName() << "\"." << std::endl;
|
||||
}
|
||||
|
||||
KX_SCA_ReplaceMeshActuator* tmpreplaceact = new KX_SCA_ReplaceMeshActuator(
|
||||
gameobj,
|
||||
tmpmesh,
|
||||
|
Loading…
Reference in New Issue
Block a user