Blender V5.3
BKE_duplilist.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "BLI_vector_list.hh"
12
13#include "BKE_geometry_set.hh"
14#include "BKE_instances.hh"
15
16namespace blender {
17
18struct Depsgraph;
19struct ID;
20struct Object;
21struct ParticleSystem;
22struct Scene;
23struct ViewLayer;
24struct ViewerPath;
25
26/* ---------------------------------------------------- */
27/* Dupli-Geometry */
28
29constexpr int MAX_DUPLI_RECUR = 8;
30
32 /* Object whose geometry is instanced. */
34 /* Data owned by the object above that is instanced. This might not be the same as `ob->data`. */
36 float mat[4][4];
37 float orco[3], uv[2];
38
39 short type; /* From #Object::transflag. */
40 char no_draw;
43 /* If this dupli object is belongs to a preview, this is non-null. */
45 /* Index of the top-level instance this dupli is part of or -1 when unused. */
47
48 /* Persistent identifier for a dupli object, for inter-frame matching of
49 * objects with motion blur, or inter-update matching for syncing. */
51
52 /* Random ID for shading */
53 unsigned int random_id;
54
55 /* Particle this dupli was generated from. */
57
58 /* Geometry set stack for instance attributes; for each level lists the
59 * geometry set and instance index within it.
60 *
61 * Only non-null entries are stored, ordered from innermost to outermost.
62 * To save memory, these arrays are allocated smaller than persistent_id,
63 * assuming that not every entry will be associated with a GeometrySet; any
64 * size between 1 and MAX_DUPLI_RECUR can be used without issues.
65 */
68};
69
71
75void object_duplilist(Depsgraph *depsgraph,
76 Object *ob,
77 Set<const Object *> *include_objects,
78 DupliList &r_duplilist);
82void object_duplilist_preview(Depsgraph *depsgraph,
83 Object *ob,
84 const ViewerPath *viewer_path,
85 DupliList &r_duplilist);
86
100
106 const DupliObject *dupli,
107 const Object *dupli_parent,
108 const char *name,
109 float r_value[4]);
110
116 const ViewLayer *layer,
117 const char *name,
118 float r_value[4]);
119
120} // namespace blender
#define layer
BMesh Iterators.
bool BKE_object_dupli_find_rgba_attribute(const Object *ob, const DupliObject *dupli, const Object *dupli_parent, const char *name, float r_value[4])
bool BKE_view_layer_find_rgba_attribute(const Scene *scene, const ViewLayer *layer, const char *name, float r_value[4])
void object_duplilist(Depsgraph *depsgraph, Object *ob, Set< const Object * > *include_objects, DupliList &r_duplilist)
VectorList< DupliObject > DupliList
bke::Instances object_duplilist_legacy_instances(Depsgraph &depsgraph, Object &ob)
constexpr int MAX_DUPLI_RECUR
void object_duplilist_preview(Depsgraph *depsgraph, Object *ob, const ViewerPath *viewer_path, DupliList &r_duplilist)
signed char int8_t
Definition BKE_text.h:76
int persistent_id[MAX_DUPLI_RECUR]
ParticleSystem * particle_system
const bke::GeometrySet * preview_base_geometry
const bke::GeometrySet * instance_data[4]