Blender V5.0
dupli_parent_finder.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2020 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
7
8#include "BKE_duplilist.hh"
9
10#include "BLI_map.hh"
11#include "BLI_set.hh"
12
13namespace blender::io {
14
15/* Find relations between duplicated objects. This class should be instanced for a single real
16 * object, and fed its dupli-objects. */
18 private:
19 /* To check whether an Object * is instanced by this duplicator. */
21
22 /* To find the DupliObject given its Persistent ID. */
24 PIDToDupliMap pid_to_dupli_;
25
26 /* Mapping from instancer PID to duplis instanced by it. */
27 using InstancerPIDToDuplisMap =
29 InstancerPIDToDuplisMap instancer_pid_to_duplis_;
30
31 public:
32 void insert(const DupliObject *dupli_ob);
33
34 bool is_duplicated(const Object *object) const;
35 const DupliObject *find_suitable_export_parent(const DupliObject *dupli_ob) const;
36
37 private:
38 const DupliObject *find_duplicated_parent(const DupliObject *dupli_ob) const;
39 const DupliObject *find_instancer(const DupliObject *dupli_ob) const;
40};
41
42} // namespace blender::io
#define final(a, b, c)
Definition BLI_hash.h:19
const DupliObject * find_suitable_export_parent(const DupliObject *dupli_ob) const
void insert(const DupliObject *dupli_ob)
bool is_duplicated(const Object *object) const