diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-01-21 15:11:34 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-01-21 15:11:34 +0400 |
commit | 6940bf0c96f46db78dd139a1b0246e6bcb0fe8c2 (patch) | |
tree | faa5e051ca95194c5232ff723991932166e63cc4 /source/blender/blenkernel/CMakeLists.txt | |
parent | 0c9d8970433c7653483431f96d33d72106b7c741 (diff) |
Code cleanup and structural improvements for dupli generation.
This is a first step toward improving our dupli system. It implements a more
generic way of treating the various methods of dupli generation by adding a few
structs:
* DupliContext holds a number of arguments commonly used in the recursive dupli functions and defines a recursion state for generating sub-duplis (nested groups). It also helps to prevent bloated argument lists.
* DupliGenerator is a type struct that unifies the different dupli creation methods (groups, frames, verts, text chars, faces, particles). (As with context there should be no overhead from pointer indirection because everything can still be inlined inside anim.c)
Beside making the code more easily understandable this implementation should
also help to avoid weird side effects from custom matrix hacks by defining
clearly what a generator does. The DupliContext is deliberately made const, so a
generator can not simply add hidden matrix or flag modifications that are hard
to track down.
The result container for the generated duplis is stored in the context instead
of being passed explicitly. This means the generators are oblivious to the
storage of duplis, all they need to do is call the make_dupli function. This
will allow us to implement more efficient ways of storing DupliObject instances,
such as MemPools or batches. These can be implemented alongside the current
ListBase so we can improve dupli bottlenecks without having to replace each and
every dupli use case at once.
Differential Revision: https://developer.blender.org/D189
Diffstat (limited to 'source/blender/blenkernel/CMakeLists.txt')
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 815ba233c50..c28c857447a 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -125,6 +125,7 @@ set(SRC intern/node.c intern/object.c intern/object_deform.c + intern/object_dupli.c intern/ocean.c intern/packedFile.c intern/paint.c |