svn merge ^/trunk/blender -r49333:49361
authorCampbell Barton <ideasman42@gmail.com>
Sun, 29 Jul 2012 18:48:34 +0000 (18:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 29 Jul 2012 18:48:34 +0000 (18:48 +0000)
18 files changed:
1  2 
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_sequencer.py
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/node.c
source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
source/blender/compositor/operations/COM_ViewerBaseOperation.h
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/imbuf/intern/divers.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_scene.c

@@@ -60,10 -61,10 +62,10 @@@ void ViewerBaseOperation::initImage(
  {
        Image *anImage = this->m_image;
        ImBuf *ibuf = BKE_image_acquire_ibuf(anImage, this->m_imageUser, &this->m_lock);
 -      
 +
        if (!ibuf) return;
+       BLI_lock_thread(LOCK_DRAW_IMAGE);
        if (ibuf->x != (int)getWidth() || ibuf->y != (int)getHeight()) {
-               BLI_lock_thread(LOCK_DRAW_IMAGE);
  
                imb_freerectImBuf(ibuf);
                imb_freerectfloatImBuf(ibuf);
                imb_addrectfloatImBuf(ibuf);
                anImage->ok = IMA_OK_LOADED;
  
 +              IMB_display_buffer_invalidate(ibuf);
 +
 +              BLI_unlock_thread(LOCK_DRAW_IMAGE);
        }
 -      
 -      
 +
+       if (m_doDepthBuffer) 
+       {
+               addzbuffloatImBuf(ibuf);
+       }
+       BLI_unlock_thread(LOCK_DRAW_IMAGE);
++
        /* now we combine the input with ibuf */
        this->m_outputBuffer = ibuf->rect_float;
        this->m_outputBufferDisplay = (unsigned char *)ibuf->rect;
 -      
 +
 +      /* needed for display buffer update
 +       *
 +       * no need to lock / reference the image buffer because it's seems
 +       * to be the single place which changes buffers of viewer image
 +       * which is this node
 +       */
 +      this->m_ibuf = ibuf;
 +
+       if (m_doDepthBuffer)
+       {
+               this->m_depthBuffer = ibuf->zbuf_float;
+       }
++
        BKE_image_release_ibuf(this->m_image, this->m_lock);
  }
  void ViewerBaseOperation:: updateImage(rcti *rect)
@@@ -39,7 -40,7 +40,8 @@@ protected
        OrderOfChunks m_chunkOrder;
        bool m_doColorManagement;
        bool m_doColorPredivide;
+       bool m_doDepthBuffer;
 +      ImBuf *m_ibuf;
  
  public:
        bool isOutputOperation(bool rendering) const { return isActiveViewerOutput(); }
Simple merge