forked from blender/blender
index-of-nearest-104619 #2
@ -84,6 +84,19 @@ RNAPathKey::RNAPathKey(ID *id, const PointerRNA &ptr, PropertyRNA *prop, RNAPoin
|
||||
{
|
||||
}
|
||||
|
||||
RNAPathKey::RNAPathKey(const PointerRNA &target_prop,
|
||||
const char *rna_path_from_target_prop,
|
||||
const RNAPointerSource source)
|
||||
: id(target_prop.owner_id), source(source)
|
||||
{
|
||||
/* Try to resolve path. */
|
||||
int index;
|
||||
if (!RNA_path_resolve_full(&target_prop, rna_path_from_target_prop, &ptr, &prop, &index)) {
|
||||
ptr = PointerRNA_NULL;
|
||||
prop = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
string RNAPathKey::identifier() const
|
||||
{
|
||||
const char *id_name = (id) ? id->name : "<No ID>";
|
||||
|
@ -188,6 +188,9 @@ struct PersistentOperationKey : public OperationKey {
|
||||
|
||||
struct RNAPathKey {
|
||||
RNAPathKey(ID *id, const char *path, RNAPointerSource source);
|
||||
RNAPathKey(const PointerRNA &target_prop,
|
||||
const char *rna_path_from_target_prop,
|
||||
RNAPointerSource source);
|
||||
RNAPathKey(ID *id, const PointerRNA &ptr, PropertyRNA *prop, RNAPointerSource source);
|
||||
|
||||
string identifier() const;
|
||||
|
@ -1807,7 +1807,7 @@ void DepsgraphRelationBuilder::build_driver_variables(ID *id, FCurve *fcu)
|
||||
add_relation(target_key, driver_key, "Target -> Driver");
|
||||
}
|
||||
else if (dtar->rna_path != nullptr && dtar->rna_path[0] != '\0') {
|
||||
RNAPathKey variable_exit_key(target_id, dtar->rna_path, RNAPointerSource::EXIT);
|
||||
RNAPathKey variable_exit_key(target_prop, dtar->rna_path, RNAPointerSource::EXIT);
|
||||
if (RNA_pointer_is_null(&variable_exit_key.ptr)) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user