WIP commit on getting the 'render result layers' saved in a single
authorTon Roosendaal <ton@blender.org>
Tue, 14 Mar 2006 17:48:40 +0000 (17:48 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 14 Mar 2006 17:48:40 +0000 (17:48 +0000)
file. Previous fix accidentally committed parts of that... :)

Note: it is currently disabled still... will commit the real version
soon.

source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/scaling.c
source/blender/render/extern/include/RE_pipeline.h
source/blender/src/editnode.c

index 6252caa2918c6e20d55e8d63bae629b34031d325..4b5cf64cd49effd9e4d46180314bcc4b47c3bd84 100644 (file)
@@ -381,7 +381,7 @@ void IMB_exr_add_channel(void *handle, const char *layname, const char *channame
        }
        else
                strncpy(echan->name, channame, 2*CHANMAXNAME);
-       printf("added channel %s\n", echan->name);
+       // printf("added channel %s\n", echan->name);
        BLI_addtail(&data->channels, echan);
 }
 
@@ -491,7 +491,7 @@ void IMB_exrtile_write_channels(void *handle, int partx, int party)
        }
        
        data->tofile->setFrameBuffer (frameBuffer);
-       printf("write tile %d %d\n", partx/data->tilex, party/data->tiley);
+       // printf("write tile %d %d\n", partx/data->tilex, party/data->tiley);
        data->tofile->writeTile (partx/data->tilex, party/data->tiley); 
        
 }
@@ -522,6 +522,8 @@ void IMB_exr_read_channels(void *handle)
                if(echan->rect)
                        frameBuffer.insert (echan->name, Slice (FLOAT,  (char *)echan->rect, 
                                                                                                echan->xstride*sizeof(float), echan->ystride*sizeof(float)));
+               else 
+                       printf("warning, channel with no rect set %s\n", echan->name);
        }
        
        data->ifile->setFrameBuffer (frameBuffer);
index c461381ba10a497698d4003bb69977c554f93b11..a21e5c7b5924afb6b418033f6bf2538279fde5d4 100644 (file)
@@ -466,13 +466,13 @@ static struct ImBuf *scaledownx(struct ImBuf *ibuf, int newx)
 
        add = (ibuf->x - 0.001) / newx;
 
-               rect = (uchar *) ibuf->rect;
-               newrect = _newrect;
-               
-               if (do_float) {
-                       rectf = ibuf->rect_float;
-                       newrectf = _newrectf;
-               }
+       rect = (uchar *) ibuf->rect;
+       newrect = _newrect;
+       
+       if (do_float) {
+               rectf = ibuf->rect_float;
+               newrectf = _newrectf;
+       }
                
        for (y = ibuf->y; y>0 ; y--) {
                sample = 0.0f;
index 1b5b2d5940a21efa57a5706f1f8f049b840ddfdc..785d496dadece6d1156a69752c84fe2498f5499d 100644 (file)
@@ -163,9 +163,7 @@ void RE_TileProcessor(struct Render *re, int firsttile);
 void RE_BlenderFrame(struct Render *re, struct Scene *scene, int frame);
 void RE_BlenderAnim(struct Render *re, struct Scene *scene, int sfra, int efra);
 
-/* render a specific scene, with image size and disprect of Render *re */
-/* currently in use to render Composite Nodes */
-void RE_RenderScene(struct Render *re, struct Scene *sce, int cfra);
+void RE_ReadRenderResult(struct Scene *scene, struct Scene *scenode);
 
 /* display and event callbacks */
 void RE_display_init_cb        (struct Render *re, void (*f)(RenderResult *rr));
index f7cf5be5df4d593283b216e540ca27e17c3df8fc..8cd6a3ac75d6c48337ec91c8111a69877f6bb898 100644 (file)
@@ -1860,7 +1860,16 @@ void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                case HKEY:
                        node_hide(snode);
                        break;
-                       
+               case RKEY:
+               {
+                       bNode *node= editnode_get_active(snode->edittree);
+                       if(node && node->type==CMP_NODE_R_RESULT) {
+                               //RE_ReadRenderResult(G.scene, (Scene *)node->id);
+                               //ntreeCompositTagRender(snode->edittree);
+                               //snode_handle_recalc(snode);
+                       }
+               }
+                       break;
                case DELKEY:
                case XKEY:
                        if(fromlib) fromlib= -1;