resource integration: "setting image state manually"

This commit is contained in:
Duion 2016-03-15 12:25:53 +01:00
parent 3746093efd
commit 7565447d63
3 changed files with 126 additions and 7 deletions

View file

@ -5014,3 +5014,11 @@ DefineEngineMethod( ShapeBase, getModelFile, const char *, (),,
const char *fieldName = StringTable->insert( String("shapeFile") );
return datablock->getDataField( fieldName, NULL );
}
ConsoleMethod( ShapeBase, setManualImageState, void, 4, 4, "(int slot, string state)")
{
int imageSlot = dAtoi(argv[2]);
const char* state = argv[3];
if (imageSlot >= 0 && imageSlot < ShapeBase::MaxMountedImages)
object->setManualImageState(imageSlot, state);
}