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.
This commit is contained in:
Ton Roosendaal
2006-06-16 13:58:45 +00:00
parent 3356c4ba2f
commit f29e554214

View File

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