svn merge ^/trunk/blender -r42172:42182
authorCampbell Barton <ideasman42@gmail.com>
Sun, 27 Nov 2011 01:42:56 +0000 (01:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 27 Nov 2011 01:42:56 +0000 (01:42 +0000)
release/scripts/modules/addon_utils.py
source/blender/blenkernel/intern/material.c
source/blender/blenlib/BLI_mempool.h
source/blender/blenlib/intern/BLI_mempool.c
source/blender/editors/space_image/image_buttons.c
source/blender/python/generic/idprop_py_api.c
source/blender/render/extern/include/RE_engine.h
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/pipeline.c

index de662b47c4dc65444724c6f38d7daccefd34c22d..21f856a1396020215dd027976713bfed3f4cb4cd 100644 (file)
@@ -235,7 +235,8 @@ def enable(module_name, default_set=True):
 
     # reload if the mtime changes
     mod = sys.modules.get(module_name)
-    if mod:
+    # chances of the file _not_ existing are low, but it could be removed
+    if mod and os.path.exists(mod.__file__):
         mod.__addon_enabled__ = False
         mtime_orig = getattr(mod, "__time__", 0)
         mtime_new = os.path.getmtime(mod.__file__)
@@ -252,6 +253,7 @@ def enable(module_name, default_set=True):
 
     # Split registering up into 3 steps so we can undo
     # if it fails par way through.
+
     # 1) try import
     try:
         mod = __import__(module_name)
index fa0e886b784d135071e74f437d0804932d360b8c..ecf74b1d8e1befa82d9db3c44b3c1b10ee30a963 100644 (file)
@@ -1178,8 +1178,7 @@ int object_remove_material_slot(Object *ob)
 }
 
 
-/* r g b = current value, col = new value, fac==0 is no change */
-/* if g==NULL, it only does r channel */
+/* r_col = current value, col = new value, fac==0 is no change */
 void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
 {
        float tmp, facm= 1.0f-fac;
@@ -1187,165 +1186,137 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
        switch (type) {
                case MA_RAMP_BLEND:
                        r_col[0] = facm*(r_col[0]) + fac*col[0];
-                       if(r_col[1]) {
-                               r_col[1] = facm*(r_col[1]) + fac*col[1];
-                               r_col[2] = facm*(r_col[2]) + fac*col[2];
-                       }
-                               break;
+                       r_col[1] = facm*(r_col[1]) + fac*col[1];
+                       r_col[2] = facm*(r_col[2]) + fac*col[2];
+                       break;
                case MA_RAMP_ADD:
                        r_col[0] += fac*col[0];
-                       if(r_col[1]) {
-                               r_col[1] += fac*col[1];
-                               r_col[2] += fac*col[2];
-                       }
-                               break;
+                       r_col[1] += fac*col[1];
+                       r_col[2] += fac*col[2];
+                       break;
                case MA_RAMP_MULT:
                        r_col[0] *= (facm + fac*col[0]);
-                       if(r_col[1]) {
-                               r_col[1] *= (facm + fac*col[1]);
-                               r_col[2] *= (facm + fac*col[2]);
-                       }
-                               break;
+                       r_col[1] *= (facm + fac*col[1]);
+                       r_col[2] *= (facm + fac*col[2]);
+                       break;
                case MA_RAMP_SCREEN:
                        r_col[0] = 1.0f - (facm + fac*(1.0f - col[0])) * (1.0f - r_col[0]);
-                       if(r_col[1]) {
-                               r_col[1] = 1.0f - (facm + fac*(1.0f - col[1])) * (1.0f - r_col[1]);
-                               r_col[2] = 1.0f - (facm + fac*(1.0f - col[2])) * (1.0f - r_col[2]);
-                       }
-                               break;
+                       r_col[1] = 1.0f - (facm + fac*(1.0f - col[1])) * (1.0f - r_col[1]);
+                       r_col[2] = 1.0f - (facm + fac*(1.0f - col[2])) * (1.0f - r_col[2]);
+                       break;
                case MA_RAMP_OVERLAY:
                        if(r_col[0] < 0.5f)
                                r_col[0] *= (facm + 2.0f*fac*col[0]);
                        else
                                r_col[0] = 1.0f - (facm + 2.0f*fac*(1.0f - col[0])) * (1.0f - r_col[0]);
-                       if(r_col[1]) {
-                               if(r_col[1] < 0.5f)
-                                       r_col[1] *= (facm + 2.0f*fac*col[1]);
-                               else
-                                       r_col[1] = 1.0f - (facm + 2.0f*fac*(1.0f - col[1])) * (1.0f - r_col[1]);
-                               if(r_col[2] < 0.5f)
-                                       r_col[2] *= (facm + 2.0f*fac*col[2]);
-                               else
-                                       r_col[2] = 1.0f - (facm + 2.0f*fac*(1.0f - col[2])) * (1.0f - r_col[2]);
-                       }
-                               break;
+                       if(r_col[1] < 0.5f)
+                               r_col[1] *= (facm + 2.0f*fac*col[1]);
+                       else
+                               r_col[1] = 1.0f - (facm + 2.0f*fac*(1.0f - col[1])) * (1.0f - r_col[1]);
+                       if(r_col[2] < 0.5f)
+                               r_col[2] *= (facm + 2.0f*fac*col[2]);
+                       else
+                               r_col[2] = 1.0f - (facm + 2.0f*fac*(1.0f - col[2])) * (1.0f - r_col[2]);
+                       break;
                case MA_RAMP_SUB:
                        r_col[0] -= fac*col[0];
-                       if(r_col[1]) {
-                               r_col[1] -= fac*col[1];
-                               r_col[2] -= fac*col[2];
-                       }
-                               break;
+                       r_col[1] -= fac*col[1];
+                       r_col[2] -= fac*col[2];
+                       break;
                case MA_RAMP_DIV:
                        if(col[0]!=0.0f)
                                r_col[0] = facm*(r_col[0]) + fac*(r_col[0])/col[0];
-                       if(r_col[1]) {
-                               if(col[1]!=0.0f)
-                                       r_col[1] = facm*(r_col[1]) + fac*(r_col[1])/col[1];
-                               if(col[2]!=0.0f)
-                                       r_col[2] = facm*(r_col[2]) + fac*(r_col[2])/col[2];
-                       }
-                               break;
+                       if(col[1]!=0.0f)
+                               r_col[1] = facm*(r_col[1]) + fac*(r_col[1])/col[1];
+                       if(col[2]!=0.0f)
+                               r_col[2] = facm*(r_col[2]) + fac*(r_col[2])/col[2];
+                       break;
                case MA_RAMP_DIFF:
                        r_col[0] = facm*(r_col[0]) + fac*fabsf(r_col[0]-col[0]);
-                       if(r_col[1]) {
-                               r_col[1] = facm*(r_col[1]) + fac*fabsf(r_col[1]-col[1]);
-                               r_col[2] = facm*(r_col[2]) + fac*fabsf(r_col[2]-col[2]);
-                       }
-                               break;
+                       r_col[1] = facm*(r_col[1]) + fac*fabsf(r_col[1]-col[1]);
+                       r_col[2] = facm*(r_col[2]) + fac*fabsf(r_col[2]-col[2]);
+                       break;
                case MA_RAMP_DARK:
-                       tmp=col[0]+((1-col[0])*facm); 
+                       tmp=col[0]+((1-col[0])*facm);
                        if(tmp < r_col[0]) r_col[0]= tmp;
-                       if(r_col[1]) {
-                               tmp=col[1]+((1-col[1])*facm); 
-                               if(tmp < r_col[1]) r_col[1]= tmp;
-                               tmp=col[2]+((1-col[2])*facm); 
-                               if(tmp < r_col[2]) r_col[2]= tmp;
-                       } 
-                               break; 
+                       tmp=col[1]+((1-col[1])*facm);
+                       if(tmp < r_col[1]) r_col[1]= tmp;
+                       tmp=col[2]+((1-col[2])*facm);
+                       if(tmp < r_col[2]) r_col[2]= tmp;
+                       break;
                case MA_RAMP_LIGHT:
                        tmp= fac*col[0];
                        if(tmp > r_col[0]) r_col[0]= tmp;
-                               if(r_col[1]) {
-                                       tmp= fac*col[1];
-                                       if(tmp > r_col[1]) r_col[1]= tmp;
-                                       tmp= fac*col[2];
-                                       if(tmp > r_col[2]) r_col[2]= tmp;
-                               }
-                                       break;  
-               case MA_RAMP_DODGE:                     
-                       
-                               
+                               tmp= fac*col[1];
+                               if(tmp > r_col[1]) r_col[1]= tmp;
+                               tmp= fac*col[2];
+                               if(tmp > r_col[2]) r_col[2]= tmp;
+                               break;
+               case MA_RAMP_DODGE:
                        if(r_col[0] !=0.0f){
                                tmp = 1.0f - fac*col[0];
                                if(tmp <= 0.0f)
                                        r_col[0] = 1.0f;
                                else if ((tmp = (r_col[0]) / tmp)> 1.0f)
                                        r_col[0] = 1.0f;
-                               else 
+                               else
                                        r_col[0] = tmp;
                        }
-                       if(r_col[1]) {
-                               if(r_col[1] !=0.0f){
-                                       tmp = 1.0f - fac*col[1];
-                                       if(tmp <= 0.0f )
-                                               r_col[1] = 1.0f;
-                                       else if ((tmp = (r_col[1]) / tmp) > 1.0f )
-                                               r_col[1] = 1.0f;
-                                       else
-                                               r_col[1] = tmp;
-                               }
-                               if(r_col[2] !=0.0f){
-                                       tmp = 1.0f - fac*col[2];
-                                       if(tmp <= 0.0f)
-                                               r_col[2] = 1.0f;
-                                       else if ((tmp = (r_col[2]) / tmp) > 1.0f )
-                                               r_col[2] = 1.0f;
-                                       else
-                                               r_col[2] = tmp;
-                               }
-
+                       if(r_col[1] !=0.0f){
+                               tmp = 1.0f - fac*col[1];
+                               if(tmp <= 0.0f )
+                                       r_col[1] = 1.0f;
+                               else if ((tmp = (r_col[1]) / tmp) > 1.0f )
+                                       r_col[1] = 1.0f;
+                               else
+                                       r_col[1] = tmp;
                        }
-                               break;  
+                       if(r_col[2] !=0.0f){
+                               tmp = 1.0f - fac*col[2];
+                               if(tmp <= 0.0f)
+                                       r_col[2] = 1.0f;
+                               else if ((tmp = (r_col[2]) / tmp) > 1.0f )
+                                       r_col[2] = 1.0f;
+                               else
+                                       r_col[2] = tmp;
+                       }
+                       break;
                case MA_RAMP_BURN:
-                       
                        tmp = facm + fac*col[0];
-                       
+
                        if(tmp <= 0.0f)
                                r_col[0] = 0.0f;
                        else if (( tmp = (1.0f - (1.0f - (r_col[0])) / tmp )) < 0.0f)
                                        r_col[0] = 0.0f;
                        else if (tmp > 1.0f)
                                r_col[0]=1.0f;
-                       else 
+                       else
                                r_col[0] = tmp;
 
-                       if(r_col[1]) {
-                               tmp = facm + fac*col[1];
-                               if(tmp <= 0.0f)
+                       tmp = facm + fac*col[1];
+                       if(tmp <= 0.0f)
+                               r_col[1] = 0.0f;
+                       else if (( tmp = (1.0f - (1.0f - (r_col[1])) / tmp )) < 0.0f )
                                        r_col[1] = 0.0f;
-                               else if (( tmp = (1.0f - (1.0f - (r_col[1])) / tmp )) < 0.0f )
-                                               r_col[1] = 0.0f;
-                               else if(tmp >1.0f)
-                                       r_col[1]=1.0f;
-                               else
-                                       r_col[1] = tmp;
+                       else if(tmp >1.0f)
+                               r_col[1]=1.0f;
+                       else
+                               r_col[1] = tmp;
 
-                                       tmp = facm + fac*col[2];
-                                       if(tmp <= 0.0f)
+                               tmp = facm + fac*col[2];
+                               if(tmp <= 0.0f)
+                               r_col[2] = 0.0f;
+                       else if (( tmp = (1.0f - (1.0f - (r_col[2])) / tmp )) < 0.0f  )
                                        r_col[2] = 0.0f;
-                               else if (( tmp = (1.0f - (1.0f - (r_col[2])) / tmp )) < 0.0f  )
-                                               r_col[2] = 0.0f;
-                               else if(tmp >1.0f)
-                                       r_col[2]= 1.0f;
-                               else
-                                       r_col[2] = tmp;
-                       }
-                               break;
-               case MA_RAMP_HUE:               
-                       if(r_col[1]){
+                       else if(tmp >1.0f)
+                               r_col[2]= 1.0f;
+                       else
+                               r_col[2] = tmp;
+                       break;
+               case MA_RAMP_HUE:
+                       {
                                float rH,rS,rV;
-                               float colH,colS,colV; 
+                               float colH,colS,colV;
                                float tmpr,tmpg,tmpb;
                                rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
                                if(colS!=0 ){
@@ -1356,9 +1327,9 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                                        r_col[2] = facm*(r_col[2]) + fac*tmpb;
                                }
                        }
-                               break;
-               case MA_RAMP_SAT:               
-                       if(r_col[1]){
+                       break;
+               case MA_RAMP_SAT:
+                       {
                                float rH,rS,rV;
                                float colH,colS,colV;
                                rgb_to_hsv(r_col[0],r_col[1],r_col[2],&rH,&rS,&rV);
@@ -1367,18 +1338,18 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                                        hsv_to_rgb( rH, (facm*rS +fac*colS), rV, r_col+0, r_col+1, r_col+2);
                                }
                        }
-                               break;
-               case MA_RAMP_VAL:               
-                       if(r_col[1]){
+                       break;
+               case MA_RAMP_VAL:
+                       {
                                float rH,rS,rV;
                                float colH,colS,colV;
                                rgb_to_hsv(r_col[0],r_col[1],r_col[2],&rH,&rS,&rV);
                                rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
                                hsv_to_rgb( rH, rS, (facm*rV +fac*colV), r_col+0, r_col+1, r_col+2);
                        }
-                               break;
-               case MA_RAMP_COLOR:             
-                       if(r_col[1]){
+                       break;
+               case MA_RAMP_COLOR:
+                       {
                                float rH,rS,rV;
                                float colH,colS,colV;
                                float tmpr,tmpg,tmpb;
@@ -1391,12 +1362,12 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                                        r_col[2] = facm*(r_col[2]) + fac*tmpb;
                                }
                        }
-                               break;
-               case MA_RAMP_SOFT: 
-                       if (r_col[1]){
-                               float scr, scg, scb; 
+                       break;
+               case MA_RAMP_SOFT:
+                       {
+                               float scr, scg, scb;
 
-                               /* first calculate non-fac based Screen mix */ 
+                               /* first calculate non-fac based Screen mix */
                                scr = 1.0f - (1.0f - col[0]) * (1.0f - r_col[0]);
                                scg = 1.0f - (1.0f - col[1]) * (1.0f - r_col[1]);
                                scb = 1.0f - (1.0f - col[2]) * (1.0f - r_col[2]);
@@ -1404,25 +1375,23 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
                                r_col[0] = facm*(r_col[0]) + fac*(((1.0f - r_col[0]) * col[0] * (r_col[0])) + (r_col[0] * scr));
                                r_col[1] = facm*(r_col[1]) + fac*(((1.0f - r_col[1]) * col[1] * (r_col[1])) + (r_col[1] * scg));
                                r_col[2] = facm*(r_col[2]) + fac*(((1.0f - r_col[2]) * col[2] * (r_col[2])) + (r_col[2] * scb));
-                       } 
-                               break; 
-               case MA_RAMP_LINEAR: 
-                       if (col[0] > 0.5f)  
+                       }
+                       break;
+               case MA_RAMP_LINEAR:
+                       if (col[0] > 0.5f)
                                r_col[0] = r_col[0] + fac*(2.0f*(col[0]-0.5f));
-                       else  
+                       else
                                r_col[0] = r_col[0] + fac*(2.0f*(col[0]) - 1.0f);
-                       if (r_col[1]){
-                               if (col[1] > 0.5f)  
-                                       r_col[1] = r_col[1] + fac*(2.0f*(col[1]-0.5f));
-                               else  
-                                       r_col[1] = r_col[1] + fac*(2.0f*(col[1]) -1.0f);
-                               if (col[2] > 0.5f)  
-                                       r_col[2] = r_col[2] + fac*(2.0f*(col[2]-0.5f));
-                               else  
-                                       r_col[2] = r_col[2] + fac*(2.0f*(col[2]) - 1.0f);
-                       } 
-                               break; 
-       }       
+                       if (col[1] > 0.5f)
+                               r_col[1] = r_col[1] + fac*(2.0f*(col[1]-0.5f));
+                       else
+                               r_col[1] = r_col[1] + fac*(2.0f*(col[1]) -1.0f);
+                       if (col[2] > 0.5f)
+                               r_col[2] = r_col[2] + fac*(2.0f*(col[2]-0.5f));
+                       else
+                               r_col[2] = r_col[2] + fac*(2.0f*(col[2]) - 1.0f);
+                       break;
+       }
 }
 
 /* copy/paste buffer, if we had a propper py api that would be better */
index f98919fadd3a0f850e4c5535a83116fe9c44f968..a46ba78aef0728a7cfe8292d357cac61fd255e80 100644 (file)
@@ -55,6 +55,7 @@ void *BLI_mempool_calloc(BLI_mempool *pool);
 void BLI_mempool_free(BLI_mempool *pool, void *addr);
 void BLI_mempool_destroy(BLI_mempool *pool);
 int BLI_mempool_count(BLI_mempool *pool);
+void *BLI_mempool_findelem(BLI_mempool *pool, const int index);
 
 /** iteration stuff.  note: this may easy to produce bugs with **/
 /*private structure*/
index 19ae89da8ea2bb276338be056b2f95ecd2d8c18b..f8da524d0975c6dac3f26888aa5c1d3d22389c91 100644 (file)
@@ -68,8 +68,9 @@ typedef struct BLI_mempool_chunk {
 
 struct BLI_mempool {
        struct ListBase chunks;
-       int esize, csize, pchunk;        /* size of elements and chunks in bytes
-                                         * and number of elements per chunk*/
+       int esize;         /* element size in bytes */
+       int csize;         /* chunk size in bytes */
+       int pchunk;        /* number of elements per chunk */
        short use_sysmalloc, allow_iter;
        /* keeps aligned to 16 bits */
 
@@ -240,6 +241,23 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
        }
 }
 
+void *BLI_mempool_findelem(BLI_mempool *pool, const int index)
+{
+       if ((index >= 0) && (index < pool->totused)) {
+               BLI_mempool_chunk *mpchunk;
+               int i= 0;
+
+               for (mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) {
+                       if (index < i + pool->pchunk) {
+                               return ((char *)mpchunk->data) + (pool->esize * (index - i));
+                       }
+                       i += pool->pchunk;
+               }
+       }
+
+       return NULL;
+}
+
 void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter)
 {
        if (!pool->allow_iter) {
index 6c68ba0ea71805ce35d3ab6402fc9484b0c9a8b5..c647ff3df53ea60b775ceafdf57e45b4ba39bafd 100644 (file)
@@ -383,6 +383,10 @@ static char *layer_menu(RenderResult *rr, short *UNUSED(curlay))
                a+= sprintf(str+a, "|Composite %%x0");
                nr= 1;
        }
+       else if(rr->rect32) {
+               a+= sprintf(str+a, "|Sequence %%x0");
+               nr= 1;
+       }
        for(rl= rr->layers.first; rl; rl= rl->next, nr++) {
                a+= sprintf(str+a, "|%s %%x%d", rl->name, nr);
        }
@@ -443,7 +447,10 @@ static void image_multi_inclay_cb(bContext *C, void *rr_v, void *iuser_v)
 {
        RenderResult *rr= rr_v;
        ImageUser *iuser= iuser_v;
-       int tot= BLI_countlist(&rr->layers) + (rr->rectf?1:0);  /* fake compo result layer */
+       int tot= BLI_countlist(&rr->layers);
+
+       if(rr->rectf || rr->rect32)
+               tot++; /* fake compo/sequencer layer */
 
        if(iuser->layer<tot-1) {
                iuser->layer++;
@@ -468,7 +475,11 @@ static void image_multi_incpass_cb(bContext *C, void *rr_v, void *iuser_v)
        RenderLayer *rl= BLI_findlink(&rr->layers, iuser->layer);
 
        if(rl) {
-               int tot= BLI_countlist(&rl->passes) + (rl->rectf?1:0);  /* builtin render result has no combined pass in list */
+               int tot= BLI_countlist(&rl->passes);
+
+               if(rr->rectf || rr->rect32)
+                       tot++; /* fake compo/sequencer layer */
+
                if(iuser->pass<tot-1) {
                        iuser->pass++;
                        BKE_image_multilayer_index(rr, iuser); 
@@ -509,7 +520,7 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image
        uiBlock *block= uiLayoutGetBlock(layout);
        uiBut *but;
        RenderLayer *rl= NULL;
-       int wmenu1, wmenu2, wmenu3;
+       int wmenu1, wmenu2, wmenu3, layer;
        char *strp;
 
        uiLayoutRow(layout, 1);
@@ -532,8 +543,12 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image
                but= uiDefButS(block, MENU, 0, strp,                                    0, 0, wmenu2, UI_UNIT_Y, &iuser->layer, 0,0,0,0, "Select Layer");
                uiButSetFunc(but, image_multi_cb, rr, iuser);
                MEM_freeN(strp);
+
+               layer = iuser->layer;
+               if(rr->rectf || rr->rect32)
+                       layer--; /* fake compo/sequencer layer */
                
-               rl= BLI_findlink(&rr->layers, iuser->layer - (rr->rectf?1:0)); /* fake compo layer, return NULL is meant to be */
+               rl= BLI_findlink(&rr->layers, layer); /* return NULL is meant to be */
                strp= pass_menu(rl, &iuser->pass);
                but= uiDefButS(block, MENU, 0, strp,                                    0, 0, wmenu3, UI_UNIT_Y, &iuser->pass, 0,0,0,0, "Select Pass");
                uiButSetFunc(but, image_multi_cb, rr, iuser);
index 73d954057c9611b49ead6f15333deb39cf6b1ae0..c31dadff3e1a9351724f1d010c3207e9ad4ec3e0 100644 (file)
@@ -151,9 +151,9 @@ PyObject *BPy_IDGroup_WrapData(ID *id, IDProperty *prop, IDProperty *parent)
        case IDP_GROUP:
                return idprop_py_from_idp_group(id, prop, parent);
        case IDP_ARRAY:
-               return idprop_py_from_idp_idparray(id, prop);
+               return idprop_py_from_idp_array(id, prop);
        case IDP_IDPARRAY: /* this could be better a internal type */
-               idprop_py_from_idp_array(id, prop);
+               return idprop_py_from_idp_idparray(id, prop);
        default:
                Py_RETURN_NONE;
        }
index e521479bbcd1075775d997174e426fae3437420c..02a94e56462deb545a5425f27c88be6a4cb6f470 100644 (file)
@@ -107,6 +107,8 @@ void RE_engine_report(RenderEngine *engine, int type, const char *msg);
 
 int RE_engine_render(struct Render *re, int do_all);
 
+int RE_engine_is_external(struct Render *re);
+
 /* Engine Types */
 
 void RE_engines_init(void);
index 38ace8d5121c35dae430aad7ce73310baacef558..2b44bad82ab1418e3955b3d4c23da9a1d40cf5e1 100644 (file)
@@ -113,6 +113,12 @@ RenderEngineType *RE_engines_find(const char *idname)
        return type;
 }
 
+int RE_engine_is_external(Render *re)
+{
+       RenderEngineType *type= RE_engines_find(re->r.engine);
+       return (type && type->render);
+}
+
 /* Create, Free */
 
 RenderEngine *RE_engine_create(RenderEngineType *type)
index c5cea980b04446b6d5e60ae7461a0c82c395a3b7..52fb1eb48dc03dbc21cc31e7326e9ea94b8e3c1b 100644 (file)
@@ -2849,6 +2849,11 @@ static void validate_render_settings(Render *re)
                if(re->r.osa==0)
                        re->r.scemode &= ~R_FULL_SAMPLE;
        } else re->r.scemode &= ~R_FULL_SAMPLE; /* clear to be sure */
+
+       if(RE_engine_is_external(re)) {
+               /* not supported yet */
+               re->r.scemode &= ~(R_EXR_TILE_FILE|R_FULL_SAMPLE);
+       }
 }
 
 static void update_physics_cache(Render *re, Scene *scene, int UNUSED(anim_init))