Hi Bastien, 

I remember reading some details/documentation about this situation when
I worked on supporting OpenVDB in the PointCache system, but I can't
find the source back. The only thing I found is a line from Lukas' wiki
page about his Alembic point cache ideas [1]: 

"Furthermore the RNA definition for these point cache lists is horrible:
it defines a collection property inside PointCache, which leads back to
the list of which it is a part - uagh! Presumably that was a lazy
solution to avoid defining the collection in each of the point cache use
cases ..." 

So the culprit seems to be our good old friend laziness. Maybe there is
a more detailed explanation out there. 

Cheers, 

Kévin 

Le 2018-03-18 16:04, Bastien Montagne a écrit :

> 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
>> [email protected]
>> https://lists.blender.org/mailman/listinfo/bf-committers
> 
> _______________________________________________
> Bf-committers mailing list
> [email protected]
> https://lists.blender.org/mailman/listinfo/bf-committers

 

Links:
------
[1]
https://wiki.blender.org/index.php/User:Phonybone/PointCache/InitialThoughts
_______________________________________________
Bf-committers mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to