Blender Git Loki

Git Commits -> Revision e1e41e4

Revision e1e41e4 by Sergey Sharybin (master)
June 6, 2017, 12:17 (GMT)
Cycles: Support rendering objects from dupli-list

This commit extends the work from Dalai made around scene iterators to
support iterating into objects from dupli-lists.

Changes can be summarized as:

- Depsgraph iterator will hold pointer to an object which created current
duplilist. It is available via `dupli_parent` field of the iterator.
It is only set when duplilist is not NULL and guaranteed to be NULL
for all other cases.

- Introduced new depsgraph.duplis collection which gives a more extended
information about depsgraph iterator. It is basically a collection on top
of DEGObjectsIteratorData.

It is used to provide access to such data as persistent ID, generated space
and so on.

Things which still needs to be done/finished/clarified:

- Need to introduce some sort of `is_instance` boolean property which will
indicate Python and C++ RNA that we are inside of dupli-list.

- Introduce a way to skip dupli-list for particular objects.

So, for example, if we are culling object due to distance we can skip all
objects it was duplicating.

- Introduce a way to skip particular duplicators.

So we can skip iterating into particle system.

- Introduce some cleaner API for C side of operators to access all data such as
persistent ID and friends.

This way we wouldn't need de-reference iterator and could keep access to such
data really abstract. Who knows how we'll be storing internal state of the
operator in the future.

While there is still stuff to do, current state works and moves us in the proper
direction.

Commit Details:

Full Hash: e1e41e4447258d42a32fd77092cef26f5733e950
Parent Commit: d220e54
Lines Changed: +234, -48

7 Modified Paths:

/intern/cycles/blender/blender_object.cpp (+23, -21) (Diff)
/intern/cycles/blender/blender_sync.h (+1, -4) (Diff)
/source/blender/depsgraph/DEG_depsgraph_query.h (+16, -3) (Diff)
/source/blender/depsgraph/intern/depsgraph_query.cc (+34, -17) (Diff)
/source/blender/makesrna/intern/makesrna.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_depsgraph.c (+157, -2) (Diff)
/source/blender/makesrna/RNA_access.h (+2, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021