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.
This commit is contained in:
Dalai Felinto
2017-11-09 08:17:35 -02:00
parent 8d7ec519df
commit 92b342d30d

View File

@@ -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));