Fix T69798: Pinning empty image objects
We have no dedicated image context tab, so for now making sure we don't end up passing its ID as the pinned one. If we ever get one, we then will need a different solution here, like changing the ID that owns the data to be the object, instead of the empty image datablock. Differential Revision: https://developer.blender.org/D6273
This commit is contained in:
parent
08588d06e8
commit
12915aad65
Notes:
blender-bot
2023-02-14 06:27:47 +01:00
Referenced by issue #69798, Pinning the 'object data properties' doesn't work in the properties editor with empty image objects
|
@ -1249,6 +1249,13 @@ ID *buttons_context_id_path(const bContext *C)
|
|||
}
|
||||
}
|
||||
|
||||
/* There is no valid image ID panel, Image Empty objects need this workaround.*/
|
||||
if (sbuts->mainb == BCONTEXT_DATA && sbuts->flag & SB_PIN_CONTEXT) {
|
||||
if (ptr->type == &RNA_Image && ptr->data) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr->owner_id) {
|
||||
return ptr->owner_id;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue