Re: [Bf-committers] help with tessface, CustomData and MTFace

2014-01-05 Thread Dalai Felinto
> However you shouldn't be storing this pointer in CustomDataLayer*, you should > do something like this instead: (...) Ah, now I I understand the CustomData_get_* functions better. Way more clear thanks a lot Brecht. @Tom, many thanks, my system was crashing some times, but I haven't stop to pi

Re: [Bf-committers] help with tessface, CustomData and MTFace

2014-01-05 Thread Brecht Van Lommel
The line proposed by Tom should work. However you shouldn't be storing this pointer in CustomDataLayer*, you should do something like this instead: MTFace *mtface = CustomData_get_layer(&me->fdata, CD_MTFACE); MTFace *mtf = &mtface[i]; On Sun, Jan 5, 2014 at 9:36 PM, Tom Edwards wrote: > Buil

Re: [Bf-committers] help with tessface, CustomData and MTFace

2014-01-05 Thread Tom Edwards
Built your patch and realised that cdl isn't MTFace**, which is what the fix I suggested is for. This is what you actually need: MTFace *mtface = &((MTFace *) cdl)[i]; The original code was creating a ref to CustomDataLayer*, indexing into it, and only casting to MTFace* as the last step. The s

Re: [Bf-committers] help with tessface, CustomData and MTFace

2014-01-05 Thread Dalai Felinto
Hi, > This should fix it: > &(cdl[1]) Sorry, but where would that be? Because If I do: (1) MTFace *mtface = (MTFace *)&cdl[i]; As it is now, or if I do: (2) MTFace *mtface = (MTFace *)&(cdl[i]); They all produce the same result I just committed (bc3d601 in the branch) a temporary printf code t

Re: [Bf-committers] help with tessface, CustomData and MTFace

2014-01-05 Thread Tom Edwards
This should fix it: &(cdl[1]) Currently you are indexing into your reference! On 05/01/2014 5:28 PM, Dalai Felinto wrote: > Hi there, > Anyone familiar with CustomData and tessface here? > > I'm trying to figure out why this function is only working for the first face: > https://github.com/dfel