[Bf-committers] Do we accept to have infinite recursive RNA layout patterns?

Bastien Montagne montagne29 at wanadoo.fr
Sun Mar 18 16:04:50 CET 2018


FYI, decided to go with a somewhat ugly, but safe and non-API-breaking 
solution for now, see 
https://developer.blender.org/rB0301df40e5b6c51575d7f9013a1a28b901063829

Bastien


On 16/03/2018 15:50, Bastien Montagne wrote:
> Hi devs,
>
> So, was investigating a weird issue today found while doing some 
> static override tests, and ended up finding the someone, at some era 
> lost in the mist of times, had the genius idea of creating a sort of 
> infinite recursion in  PointCache RNA struct (defined in 
> rna_object_force.c). That is, pointcache owner has a pointer to active 
> pointcache, and said active pointcache has a collection of all 
> pointcaches from owner's list (since in DNA, PointCache is actually a 
> linked list item).
>
> Needless to say that this totally breaks attempt to walk in RNA data, 
> since you'll indefinitely dive into recursive versions of point_caches 
> collection items (giving RNA paths like that: 
> 'particle_systems["feathers_big"].point_cache.point_caches[0].point_caches[0].point_caches[0].…').
>
> Before nuking this non-sense away and sanitizing the mess, I thought 
> I’d ask if someone remembers any good reason for current RNA 
> code/layout there… Since changing that will introduce RNA API breakage 
> (though point_cache does not seems to be used by any addon in our 
> repositories currently), would also probably only do it in 2.8 branch?
>
> Cheers,
> Bastien
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list