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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-06-16 17:58:45 +0400
committerTon Roosendaal <ton@blender.org>2006-06-16 17:58:45 +0400
commitf29e5542144d50e9b807d6cf9ee26a67bc0747c9 (patch)
treef1adcfd181e62f8e953c2deb6c44b1332e33e447 /source
parent3356c4ba2ff9bff8e0e0e1bf02e40bdd6bdeac18 (diff)
This prevents to assign the built-in Images "Render Result" or "Compositor"
as texture to UV Face. Crashes in render, because memory then is undefined.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/drawimage.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index 10f0a5271cb..f927028bfe6 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -290,6 +290,7 @@ void what_image(SpaceImage *sima)
}
}
+/* called to assign images to UV faces */
void image_changed(SpaceImage *sima, int dotile)
{
TFace *tface;
@@ -299,8 +300,18 @@ void image_changed(SpaceImage *sima, int dotile)
if(sima->mode==SI_TEXTURE) {
if(G.f & G_FACESELECT) {
+
+ /* exception images, name rules are actually weak... */
+ if(sima->image) {
+ if(BLI_streq(sima->image->name, "Render Result"))
+ return;
+ if(BLI_streq(sima->image->name, "Composite"))
+ return;
+ }
+
me= get_mesh(OBACT);
if(me && me->tface) {
+
tface= me->tface;
a= me->totface;
while(a--) {