Blender V4.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
11struct Depsgraph;
12struct ID;
13struct ListBase;
14struct Object;
15struct ParticleSystem;
16struct Scene;
17struct ViewLayer;
18struct ViewerPath;
19namespace blender::bke {
20struct GeometrySet;
21}
22
23/* ---------------------------------------------------- */
24/* Dupli-Geometry */
25
29ListBase *object_duplilist(Depsgraph *depsgraph, Scene *sce, Object *ob);
34 Scene *scene,
35 Object *ob,
36 const ViewerPath *viewer_path);
38
41 /* Object whose geometry is instanced. */
43 /* Data owned by the object above that is instanced. This might not be the same as `ob->data`. */
45 float mat[4][4];
46 float orco[3], uv[2];
47
48 short type; /* From #Object::transflag. */
49 char no_draw;
50 /* If this dupli object is belongs to a preview, this is non-null. */
52 /* Index of the top-level instance this dupli is part of or -1 when unused. */
54
55 /* Persistent identifier for a dupli object, for inter-frame matching of
56 * objects with motion blur, or inter-update matching for syncing. */
57 int persistent_id[8]; /* MAX_DUPLI_RECUR */
58
59 /* Particle this dupli was generated from. */
61
62 /* Geometry set stack for instance attributes; for each level lists the
63 * geometry set and instance index within it.
64 *
65 * Only non-null entries are stored, ordered from innermost to outermost.
66 * To save memory, these arrays are allocated smaller than persistent_id,
67 * assuming that not every entry will be associated with a GeometrySet; any
68 * size between 1 and MAX_DUPLI_RECUR can be used without issues.
69 */
72
73 /* Random ID for shading */
74 unsigned int random_id;
75};
76
82 const DupliObject *dupli,
83 const Object *dupli_parent,
84 const char *name,
85 float r_value[4]);
86
92 const ViewLayer *layer,
93 const char *name,
94 float r_value[4]);
bool BKE_object_dupli_find_rgba_attribute(const Object *ob, const DupliObject *dupli, const Object *dupli_parent, const char *name, float r_value[4])
ListBase * object_duplilist(Depsgraph *depsgraph, Scene *sce, Object *ob)
void free_object_duplilist(ListBase *lb)
bool BKE_view_layer_find_rgba_attribute(const Scene *scene, const ViewLayer *layer, const char *name, float r_value[4])
ListBase * object_duplilist_preview(Depsgraph *depsgraph, Scene *scene, Object *ob, const ViewerPath *viewer_path)
const Depsgraph * depsgraph
const blender::bke::GeometrySet * preview_base_geometry
int preview_instance_index
float mat[4][4]
int instance_idx[4]
DupliObject * prev
const blender::bke::GeometrySet * instance_data[4]
DupliObject * next
ParticleSystem * particle_system
int persistent_id[8]
float orco[3]
unsigned int random_id
Definition DNA_ID.h:413