Blender
V2.93
source
blender
depsgraph
intern
builder
deg_builder_relations_drivers.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2013 Blender Foundation.
17
* All rights reserved.
18
*/
19
24
#pragma once
25
26
#include "
BLI_string_ref.hh
"
27
28
#include "
RNA_types.h
"
29
30
#include "
intern/builder/deg_builder_relations.h
"
31
32
struct
FCurve
;
33
34
namespace
blender
{
35
namespace
deg
{
36
37
/* Helper class for determining which relations are needed between driver evaluation nodes. */
38
class
DriverDescriptor
{
39
public
:
40
/* Drivers are grouped by their RNA prefix. The prefix is the part of the RNA
41
* path up to the last dot, the suffix is the remainder of the RNA path:
42
*
43
* fcu->rna_path rna_prefix rna_suffix
44
* ------------------------------- ---------------------- ----------
45
* 'color' '' 'color'
46
* 'rigidbody_world.time_scale' 'rigidbody_world' 'time_scale'
47
* 'pose.bones["master"].location' 'pose.bones["master"]' 'location'
48
*/
49
StringRef
rna_prefix
;
50
StringRef
rna_suffix
;
51
52
public
:
53
DriverDescriptor
(
PointerRNA
*id_ptr,
FCurve
*fcu);
54
55
bool
driver_relations_needed
()
const
;
56
bool
is_array
()
const
;
57
/* Assumes that 'other' comes from the same RNA group, that is, has the same RNA path prefix. */
58
bool
is_same_array_as
(
const
DriverDescriptor
&other)
const
;
59
OperationKey
depsgraph_key
()
const
;
60
61
private
:
62
PointerRNA
*id_ptr_;
63
FCurve
*fcu_;
64
bool
driver_relations_needed_;
65
66
PointerRNA
pointer_rna_;
67
PropertyRNA
*property_rna_;
68
bool
is_array_;
69
70
bool
determine_relations_needed();
71
void
split_rna_path();
72
bool
resolve_rna();
73
};
74
75
}
// namespace deg
76
}
// namespace blender
BLI_string_ref.hh
RNA_types.h
blender::StringRef
Definition:
BLI_string_ref.hh:275
blender::deg::DriverDescriptor
Definition:
deg_builder_relations_drivers.h:38
blender::deg::DriverDescriptor::driver_relations_needed
bool driver_relations_needed() const
Definition:
deg_builder_relations_drivers.cc:76
blender::deg::DriverDescriptor::rna_prefix
StringRef rna_prefix
Definition:
deg_builder_relations_drivers.h:49
blender::deg::DriverDescriptor::depsgraph_key
OperationKey depsgraph_key() const
Definition:
deg_builder_relations_drivers.cc:95
blender::deg::DriverDescriptor::DriverDescriptor
DriverDescriptor(PointerRNA *id_ptr, FCurve *fcu)
Definition:
deg_builder_relations_drivers.cc:40
blender::deg::DriverDescriptor::rna_suffix
StringRef rna_suffix
Definition:
deg_builder_relations_drivers.h:50
blender::deg::DriverDescriptor::is_array
bool is_array() const
Definition:
deg_builder_relations_drivers.cc:81
blender::deg::DriverDescriptor::is_same_array_as
bool is_same_array_as(const DriverDescriptor &other) const
Definition:
deg_builder_relations_drivers.cc:87
deg_builder_relations.h
blender::deg
Definition:
deg_builder.cc:53
blender
Definition:
BKE_attribute_access.hh:30
FCurve
Definition:
DNA_anim_types.h:581
PointerRNA
Definition:
RNA_types.h:49
PropertyRNA
Definition:
rna_internal_types.h:287
blender::deg::OperationKey
Definition:
deg_builder_relations.h:121
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1