From 92b342d30d33a3da0816d2c2715adc959360e095 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 9 Nov 2017 08:17:35 -0200 Subject: Fix logic for pinning textures users from context This was wrong since it's concenption in 28ee0f9218. The if statement was returning true when pinid was NULL, and false otherwise. However when scene is pinned we also want to run this code. Code snippet by Brecht Van Lommel. --- source/blender/editors/space_buttons/buttons_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_buttons') diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index 1d67ac620b0..e3d72ba67d8 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -350,7 +350,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext * if (!scene) scene = CTX_data_scene(C); - if (!(pinid || pinid == &scene->id)) { + if (!pinid || GS(pinid->name) == ID_SCE) { ob = (scene->basact) ? scene->basact->object : NULL; wrld = scene->world; brush = BKE_paint_brush(BKE_paint_get_active_from_context(C)); -- cgit v1.2.3