THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/03/2010 at 04:50, xxxxxxxx wrote:
Cinema 4D Version: 11.5
Platform: Windows ;
Language(s) : C++ ;
I want to find the name of a material a pixel is being rendered in from a Video Post plugin. I have got code that works in some cases, but if there are different materials applied to selected faces of a cube I can't see how to get the right material.
Here's what I'm doing
GeListNode* mp=pp->vd->GetTexData(obj, 0)->mp;
if (mp && mp->IsInstanceOf(Tbaselist2d))
but in the example I'm currently working on, obj->texcnt is 3 and the names I actually want are those from GetTexData(obj, 0), GetTexData(obj, 1) and GetTexData(obj, 2). Unfortunately I can't see any way to work out which index I need for a given pixel!
I can get polygon index numbers, which are different on the 3 faces I can see, but can't see any way to map them to textures.