Blender
V5.3
source
blender
io
common
intern
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
6
#include "
IO_dupli_persistent_id.hh
"
7
8
#include "
BKE_duplilist.hh
"
9
10
#include "
BLI_map.hh
"
11
#include "
BLI_set.hh
"
12
13
namespace
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. */
17
class
DupliParentFinder
final
{
18
private
:
19
/* To check whether an Object * is instanced by this duplicator. */
20
Set<const Object *>
dupli_set_;
21
22
/* To find the DupliObject given its Persistent ID. */
23
using
PIDToDupliMap =
Map<const PersistentID, const DupliObject *>
;
24
PIDToDupliMap pid_to_dupli_;
25
26
/* Mapping from instancer PID to duplis instanced by it. */
27
using
InstancerPIDToDuplisMap =
Map<const PersistentID, Set<const DupliObject *>
>;
28
InstancerPIDToDuplisMap instancer_pid_to_duplis_;
29
30
public
:
31
void
insert
(
const
DupliObject
*dupli_ob);
32
33
bool
is_duplicated
(
const
Object
*
object
)
const
;
34
const
DupliObject
*
find_suitable_export_parent
(
const
DupliObject
*dupli_ob)
const
;
35
36
private
:
37
const
DupliObject
*find_duplicated_parent(
const
DupliObject
*dupli_ob)
const
;
38
const
DupliObject
*find_instancer(
const
DupliObject
*dupli_ob)
const
;
39
};
40
41
}
// namespace blender::io
BKE_duplilist.hh
final
#define final(a, b, c)
Definition
BLI_hash_c.hh:21
BLI_map.hh
BLI_set.hh
IO_dupli_persistent_id.hh
blender::Map
Definition
BLI_map.hh:129
blender::Set
Definition
BLI_set.hh:106
blender::io::DupliParentFinder
Definition
dupli_parent_finder.hh:17
blender::io::DupliParentFinder::find_suitable_export_parent
const DupliObject * find_suitable_export_parent(const DupliObject *dupli_ob) const
Definition
dupli_parent_finder.cc:27
blender::io::DupliParentFinder::insert
void insert(const DupliObject *dupli_ob)
Definition
dupli_parent_finder.cc:13
blender::io::DupliParentFinder::is_duplicated
bool is_duplicated(const Object *object) const
Definition
dupli_parent_finder.cc:22
blender::io
Definition
BKE_idprop.hh:32
blender::DupliObject
Definition
BKE_duplilist.hh:31
blender::Object
Definition
DNA_object_types.h:466
Generated on
for Blender by
doxygen
1.18.0