[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18921] trunk/blender/source/blender/src/ buttons_shading.c: Once a linked image was selected, from a texture there was no way to switch to a local image because the dropdown was blocked with a linked library error message .

Campbell Barton ideasman42 at gmail.com
Wed Feb 11 09:16:43 CET 2009


Revision: 18921
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18921
Author:   campbellbarton
Date:     2009-02-11 09:16:42 +0100 (Wed, 11 Feb 2009)

Log Message:
-----------
Once a linked image was selected, from a texture there was no way to switch to a local image because the dropdown was blocked with a linked library error message.

Remove linked library checking from this image selector, this isn't quite correct since the texture could be linked too, however there is no access to the texture data (or other users) when this button is drawn.

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_shading.c

Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c	2009-02-11 03:46:14 UTC (rev 18920)
+++ trunk/blender/source/blender/src/buttons_shading.c	2009-02-11 08:16:42 UTC (rev 18921)
@@ -1126,9 +1126,10 @@
 	 IMAnames_to_pupstring(&strp, NULL, NULL, &(G.main->image), NULL, &iuser->menunr);
 	 
 	 uiBlockBeginAlign(block);
+	 uiClearButLock(); /* no way to check if the image user is libdata or not, so assume its not, otherwise we cant select linked images - ANNOYING */
 	 but= uiDefButS(block, MENU, imagechanged, strp,		10,155,23,20, &iuser->menunr, 0, 0, 0, 0, "Selects an existing Image or Movie");
 	 uiButSetFunc(but, image_browse_cb, ima_pp, iuser);
-	 
+	 uiSetButLock(ima && (ima->id.lib!=NULL), ERROR_LIBDATA_MESSAGE);
 	 MEM_freeN(strp);
 	 
 	 /* name + options, or only load */





More information about the Bf-blender-cvs mailing list