MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / flushInstance

Method flushInstance

Engine/source/materials/materialManager.cpp:353–365  ·  view source on GitHub ↗

Used in the materialEditor. This flushes the material preview object so it can be reloaded easily.

Source from the content-addressed store, hash-verified

351
352// Used in the materialEditor. This flushes the material preview object so it can be reloaded easily.
353void MaterialManager::flushInstance( BaseMaterialDefinition *target )
354{
355 Vector<BaseMatInstance*>::iterator iter = mMatInstanceList.begin();
356 while ( iter != mMatInstanceList.end() )
357 {
358 if ( (*iter)->getMaterial() == target )
359 {
360 (*iter)->deleteAllHooks();
361 return;
362 }
363 iter++;
364 }
365}
366
367void MaterialManager::reInitInstance( BaseMaterialDefinition *target )
368{

Callers 1

flushMethod · 0.80

Calls 4

deleteAllHooksMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getMaterialMethod · 0.45

Tested by

no test coverage detected