Fix #31369 (discussed in bug report comments). Setting the path/layer name strings of the file/layer slots of the file output node would crash, due to missing id.data pointer in the PointerRNA. Solved by using the iter->parent.id.data pointer for the RNA collection iterator.
This commit is contained in:
@@ -833,7 +833,7 @@ static PointerRNA rna_NodeOutputFile_slot_file_get(CollectionPropertyIterator *i
|
||||
{
|
||||
PointerRNA ptr;
|
||||
bNodeSocket *sock = rna_iterator_listbase_get(iter);
|
||||
RNA_pointer_create(iter->ptr.id.data, &RNA_NodeOutputFileSlotFile, sock->storage, &ptr);
|
||||
RNA_pointer_create(iter->parent.id.data, &RNA_NodeOutputFileSlotFile, sock->storage, &ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
@@ -841,7 +841,7 @@ static PointerRNA rna_NodeOutputFile_slot_layer_get(CollectionPropertyIterator *
|
||||
{
|
||||
PointerRNA ptr;
|
||||
bNodeSocket *sock = rna_iterator_listbase_get(iter);
|
||||
RNA_pointer_create(iter->ptr.id.data, &RNA_NodeOutputFileSlotLayer, sock->storage, &ptr);
|
||||
RNA_pointer_create(iter->parent.id.data, &RNA_NodeOutputFileSlotLayer, sock->storage, &ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user