diff options
author | Jacques Lucke <jacques@blender.org> | 2021-05-20 13:14:31 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-05-20 13:14:31 +0300 |
commit | b51bd859fd4339e10b56c4b4d2d5807891153a12 (patch) | |
tree | b7fa71f0e47dfc339fcd3c2ba7d5f0b263b5b941 /source/blender/editors/space_buttons | |
parent | b084b57fbf6d2b6c2a1adb2192f5d82581cede5c (diff) |
Fix: wrong rna pointer for material slot
This was missing from rB1a81d268a19f2f1402f408ad1dadf92c7a399607.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 1699e704a4d..aeb2c04656e 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -975,7 +975,8 @@ int /*eContextResult*/ buttons_context(const bContext *C, if (matnr < 0) { matnr = 0; } - CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, &ob->mat[matnr]); + /* Keep aligned with rna_Object_material_slots_get. */ + CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, POINTER_FROM_INT(matnr + 1)); } } |