MCPcopy Create free account
hub / github.com/assimp/assimp / RemoveProperty

Method RemoveProperty

code/Material/MaterialSystem.cpp:451–472  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

449
450// ------------------------------------------------------------------------------------------------
451aiReturn aiMaterial::RemoveProperty(const char *pKey, unsigned int type, unsigned int index) {
452 ai_assert(nullptr != pKey);
453
454 for (unsigned int i = 0; i < mNumProperties; ++i) {
455 aiMaterialProperty *prop = mProperties[i];
456
457 if (prop && !strcmp(prop->mKey.data, pKey) &&
458 prop->mSemantic == type && prop->mIndex == index) {
459 // Delete this entry
460 delete mProperties[i];
461
462 // collapse the array behind --.
463 --mNumProperties;
464 for (unsigned int a = i; a < mNumProperties; ++a) {
465 mProperties[a] = mProperties[a + 1];
466 }
467 return AI_SUCCESS;
468 }
469 }
470
471 return AI_FAILURE;
472}
473
474// ------------------------------------------------------------------------------------------------
475aiReturn aiMaterial::AddBinaryProperty(const void *pInput,

Callers 4

HandleTreeViewPopup2Method · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
ExecuteMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected