Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-10-22 16:46:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-10-22 16:46:54 +0400
commite459764b4b056959e354edca3868a91ff9bc272f (patch)
tree14778bcb82bb7dfe4e8e1cc320b293aa82042947 /source/blender/src/headerbuttons.c
parent0e569035c7065c26d5ea5de0523212cd6d0537d2 (diff)
I was impossible to set a render window back to being a non render window without changing the TexFace image.
now the cross will unset the render window and use the texface if its there, cross again removes the image as useual.
Diffstat (limited to 'source/blender/src/headerbuttons.c')
-rw-r--r--source/blender/src/headerbuttons.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c
index a31f17d1638..cd69708931b 100644
--- a/source/blender/src/headerbuttons.c
+++ b/source/blender/src/headerbuttons.c
@@ -1238,10 +1238,19 @@ void do_global_buttons(unsigned short event)
break;
case B_IMAGEDELETE:
- G.sima->image= NULL;
- image_changed(G.sima, 0);
- BIF_undo_push("Unlink Image");
- allqueue(REDRAWIMAGE, 0);
+
+ if(G.sima->image && BLI_streq(G.sima->image->id.name+2, "Render Result")==0) {
+ /* Run on non render images, unlink normally */
+ G.sima->image= NULL;
+ image_changed(G.sima, 0);
+ BIF_undo_push("Unlink Image");
+ allqueue(REDRAWIMAGE, 0);
+ } else {
+ /* Run if G.sima is render, remove the render and display the meshes image if it exists */
+ G.sima->image= NULL;
+ what_image(G.sima);
+ allqueue(REDRAWIMAGE, 0);
+ }
break;
case B_AUTOMATNAME: