I was using daeDatabase::getElementCount and daeDatabase::getElement to retrieve all instance_material elements, it used to work, but now it returns no matches even though there are instance_material elements in the document.
I checked the daeDatabase header and found out the two methods are deprecated, to use daeDatabase::typeLookup instead, so I change the code to do so, however I still get zero hits, I tried this:
both return zero items in instance_material_vector, any ideas? am I missing something?
Also, I was using daeURI::setElement and daeURI::resolveURI to change what an instance_material pointed to, but those where removed, whats the workaround?
I was using daeDatabase::getElementCount and daeDatabase::getElement to retrieve all instance_material elements, it used to work, but now it returns no matches even though there are instance_material elements in the document.
Ouch. Even though those methods are deprecated, they should still work properly. I’ll look into it.
Use domElement::ID() to get a particular element’s type ID. These IDs are different from the COLLADA_TYPE IDs, which are no longer used due to some uniqueness problems.
Update: Nope, doesn’t work, what I need is a daeURI to an element I have the pointer for, daeURI::setElement and daeURI::resolveURI did the job, but how do you do it now?
I was using daeDatabase::getElementCount and daeDatabase::getElement to retrieve all instance_material elements, it used to work, but now it returns no matches even though there are instance_material elements in the document.
This seems to work fine for me. In fact I already have an automated test in domTest called databaseLookup that checks to make sure the daeDatabase::getElement and daeDatabase::getElementCount functions still work properly.
I wrote some new code to check <instance_material> specifically.
I have already changed the code to use typeLookup, but I may have other calls for the old code in there somewhere, if it resurfaces I’ll see what I can find.
This is the call I was using which was returning 0:
It could be that MSVC sets NULL to 0xcccccccc for debug builds if I am not mistaken, and since I was using 0, this could be it, I think I might had been using the release build when using 1.4.
That means URIs must be assembled by hand which is error prone. What when the referenced element is in a different file? That case was handled automatically by the old daeURI::setElement.