From: kim k. <kim...@go...> - 2017-07-07 14:37:23
|
Have you tried this out: http://kimkulling.de/2017/05/17/use-the-asset-importer-lib-meta-data-api-right/ . There is also an example in the unittests. Kim David Rivkin, PhD <dav...@sc...> schrieb am Fr., 7. Juli 2017 um 14:59 Uhr: > Hi everyone, > > I see that Node MetaData is a problem for me and perhaps I am doing > something wrong. If anyone has an example where this works properly, > please let me know. I only get an error when I try to delete the scene, > not even when I write the new file to disk. > > Here is my code below. If you see something I am doing wrong, please let > me know! > > if(nodePointer()->mMetaData == NULL) { > > meta = new aiMetadata(); > > } > > Q_ASSERT(meta); > > if(meta->mNumProperties < 1) { > > meta->mKeys = new aiString(ADD_SERIAL_STRING); > > meta->mValues = new aiMetadataEntry(); > > meta->mNumProperties = 1; > > } > > // For the string as JSON. > > aiString metaKey; > > QByteArray json = face->toString(); > > metaKey.Set(json); > > meta->Set<aiString>(0, ADD_SERIAL_STRING, metaKey); > > nodePointer()->mMetaData = meta; > > > > -- > Thank you, > Prof. David Rivkin, PhD > President & Chief Scientist > SciEssence Intl. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Assimp-discussions mailing list > Ass...@li... > https://lists.sourceforge.net/lists/listinfo/assimp-discussions > |