[Closed] Callback for new texturemap of material in medit or sme?
I’m trying to identify the material or texturemap being created in the material editor or SME. Either on creation (unconnected to any scene node), or when connected to a material or object. I can get materialstructured callback, but it only returns the object, not the texturemap/material being added. I don’t really want to do a full scan of a material every time a materialstructured callback gets called.
Any ideas?
Thanks
p.
for materials you have general callbacks:#mtlRefAdded and[i][i]#mtlRefDeleted
[/i][/i]there are not events for TextureMap creation/deletion. There is only material-changed event supported on node level as the #materialstructured callback
Hi DenisT,
Ah yes I forgot I had already used the mtlRefAdded callback for materials! I’d filtered out doing anything for materials not attached to an object, so it looked like nothing was happening.
As for texturemaps, materialstructured unfortunately only returns the object node handle, not a reference to the material or texturemap!
What a pain, I’ll need to do a full scan of the object for new texturemaps every time this callback is called.
Oh well… thanks for that anyway… good to know I’m not missing anything obvious.
Cheers
p.