Fix T62817: Can't drive modifier property with another one
Random place in the modifier stack can not be referenced, so it doesn't make sense to sue GEOMETRY component as a FROM operation. So now drivers on modifiers are driving GEOMETRY component, but are using PARAMETERS as a source for variables.
This commit is contained in:
@@ -177,7 +177,7 @@ Node *RNANodeQuery::find_node(const PointerRNA *ptr,
|
|||||||
RNANodeIdentifier RNANodeQuery::construct_node_identifier(
|
RNANodeIdentifier RNANodeQuery::construct_node_identifier(
|
||||||
const PointerRNA *ptr,
|
const PointerRNA *ptr,
|
||||||
const PropertyRNA *prop,
|
const PropertyRNA *prop,
|
||||||
RNAPointerSource /*source*/)
|
RNAPointerSource source)
|
||||||
{
|
{
|
||||||
RNANodeIdentifier node_identifier;
|
RNANodeIdentifier node_identifier;
|
||||||
if (ptr->type == NULL) {
|
if (ptr->type == NULL) {
|
||||||
@@ -265,7 +265,18 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (RNA_struct_is_a(ptr->type, &RNA_Modifier)) {
|
else if (RNA_struct_is_a(ptr->type, &RNA_Modifier)) {
|
||||||
|
/* When modifier is used as FROM operation this is likely referencing to
|
||||||
|
* the property (for example, modifier's influence).
|
||||||
|
* But when it's used as TO operation, this is geometry component. */
|
||||||
|
switch (source) {
|
||||||
|
case RNAPointerSource::ENTRY:
|
||||||
node_identifier.type = NodeType::GEOMETRY;
|
node_identifier.type = NodeType::GEOMETRY;
|
||||||
|
break;
|
||||||
|
case RNAPointerSource::EXIT:
|
||||||
|
node_identifier.type = NodeType::PARAMETERS;
|
||||||
|
node_identifier.operation_code = OperationCode::PARAMETERS_EVAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
return node_identifier;
|
return node_identifier;
|
||||||
}
|
}
|
||||||
else if (ptr->type == &RNA_Object) {
|
else if (ptr->type == &RNA_Object) {
|
||||||
|
Reference in New Issue
Block a user