[Bf-blender-cvs] [92b342d30d3] master: Fix logic for pinning textures users from context

Dalai Felinto noreply at git.blender.org
Thu Nov 9 11:37:10 CET 2017


Commit: 92b342d30d33a3da0816d2c2715adc959360e095
Author: Dalai Felinto
Date:   Thu Nov 9 08:17:35 2017 -0200
Branches: master
https://developer.blender.org/rB92b342d30d33a3da0816d2c2715adc959360e095

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.

===================================================================

M	source/blender/editors/space_buttons/buttons_texture.c

===================================================================

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



More information about the Bf-blender-cvs mailing list