Fix for reported (thanks Jens Ole!) error in rendering UV map textures.
authorTon Roosendaal <ton@blender.org>
Thu, 28 Apr 2005 09:57:21 +0000 (09:57 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 28 Apr 2005 09:57:21 +0000 (09:57 +0000)
Caused by making threadsafe envmap render...

Commit in convertblenderscene.c is just replacing constant with define.

source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/intern/image.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/imagetexture.c
source/blender/renderconverter/intern/convertBlenderScene.c

index 2da0dcb5f5a558c8d969285cfdee7284353bc13c..0ab8a6130b7ea028372e79807c3487bf423ce408 100644 (file)
@@ -50,7 +50,7 @@ void free_unused_animimages(void);
 
 void makepicstring(char *string, int frame);
 struct anim *openanim(char * name, int flags);
-void ima_ibuf_is_nul(struct Tex *tex);
+void ima_ibuf_is_nul(struct Tex *tex, struct Image *ima);
 void load_image(struct Image * ima, int flags, char *relabase, int framenum);
 void converttopremul(struct ImBuf *ibuf);
 
index d8c455c9c480011c4cb6ab14bf7d236108437992..10387e8e2a7e6f1466c4f8f18d251a87ba010c82 100644 (file)
@@ -354,14 +354,12 @@ static void de_interlace_st(struct ImBuf *ibuf)   /* standard fields */
 }
 
 
-void ima_ibuf_is_nul(Tex *tex)
+void ima_ibuf_is_nul(Tex *tex, Image *ima)
 {
        void (*de_interlacefunc)(struct ImBuf *ibuf);
-       Image *ima;
        int a, fra, dur;
        char str[FILE_MAXDIR+FILE_MAXFILE], *cp;
        
-       ima= tex->ima;
        if(ima==0) return;
        
        strcpy(str, ima->name);
index a78fcbdd97f2bdf0e724a8768bf7bad99b4251af..37af5f77c82afd61351063f9f2e6e836def52f7a 100644 (file)
@@ -648,7 +648,8 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
        if(env->stype==ENV_LOAD) {
                env->ima= tex->ima;
                if(env->ima && env->ima->ok) {
-                       if(env->ima->ibuf==NULL) ima_ibuf_is_nul(tex);
+                       // not threadsafe yet!
+                       if(env->ima->ibuf==NULL) ima_ibuf_is_nul(tex, tex->ima);
                        if(env->ima->ok && env->ok==0) envmap_split_ima(env);
                }
        }
index c00020ed7df432d2b405c2fefa5c6a451d39b272..50b6178dcdc3f2eddeb3c3d1e79d96756fa30e2f 100644 (file)
@@ -89,7 +89,7 @@ int imagewrap(Tex *tex, Image *ima, float *texvec, TexResult *texres)
        if(ima->ibuf==NULL) {
                extern SDL_mutex *load_ibuf_lock; // initrender.c
                if(load_ibuf_lock) SDL_mutexP(load_ibuf_lock);
-               if(ima->ibuf==NULL) ima_ibuf_is_nul(tex);
+               if(ima->ibuf==NULL) ima_ibuf_is_nul(tex, ima);
                if(load_ibuf_lock) SDL_mutexV(load_ibuf_lock);
        }
 
@@ -591,7 +591,7 @@ int imagewraposa(Tex *tex, Image *ima, float *texvec, float *dxt, float *dyt, Te
        
        if(ima->ibuf==NULL) {
                if(load_ibuf_lock) SDL_mutexP(load_ibuf_lock);
-               if(ima->ibuf==NULL) ima_ibuf_is_nul(tex);
+               if(ima->ibuf==NULL) ima_ibuf_is_nul(tex, ima);
                if(load_ibuf_lock) SDL_mutexV(load_ibuf_lock);
        }
        
index 7331033f87718bd76932c4cae3a09047dbf565ba..c3db05c169890fe4f142013a039e985acf9f22f4 100644 (file)
@@ -2978,7 +2978,7 @@ void RE_rotateBlenderScene(void)
                                if(ob->parent && ob->partype==PARSKEL) makeDispList(ob);
                                else if(ob->parent && ob->parent->type==OB_LATTICE) makeDispList(ob);
                                else if(ob->hooks.first) makeDispList(ob);
-                               else if(ob->softflag & 0x01) makeDispList(ob);
+                               else if(ob->softflag & OB_SB_ENABLE) makeDispList(ob);
                                else if(me->disp.first==NULL && (me->flag&ME_SUBSURF)) makeDispList(ob);
                                else if(ob->effect.first) {     // as last check
                                        Effect *eff= ob->effect.first;