[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46182] branches/tile/source/blender/ compositor/operations: TileBranch

Jeroen Bakker j.bakker at atmind.nl
Wed May 2 12:36:29 CEST 2012


Revision: 46182
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46182
Author:   jbakker
Date:     2012-05-02 10:36:29 +0000 (Wed, 02 May 2012)
Log Message:
-----------
TileBranch
 * Fix for [#31222] Rendering compo fails with texture input

Compositor output resolution will always be set to the render output size

Modified Paths:
--------------
    branches/tile/source/blender/compositor/operations/COM_CompositorOperation.cpp
    branches/tile/source/blender/compositor/operations/COM_CompositorOperation.h

Modified: branches/tile/source/blender/compositor/operations/COM_CompositorOperation.cpp
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_CompositorOperation.cpp	2012-05-02 10:10:05 UTC (rev 46181)
+++ branches/tile/source/blender/compositor/operations/COM_CompositorOperation.cpp	2012-05-02 10:36:29 UTC (rev 46182)
@@ -108,3 +108,15 @@
 		offset += (this->getWidth()-(x2-x1))*4;
 	}
 }
+
+void CompositorOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[]) {
+	int width = this->scene->r.xsch*this->scene->r.size/100;
+	int height= this->scene->r.ysch*this->scene->r.size/100;
+	preferredResolution[0] = width;
+	preferredResolution[1] = height;
+	
+	NodeOperation::determineResolution(resolution, preferredResolution);
+
+	resolution[0] = width;
+	resolution[1] = height;
+}

Modified: branches/tile/source/blender/compositor/operations/COM_CompositorOperation.h
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_CompositorOperation.h	2012-05-02 10:10:05 UTC (rev 46181)
+++ branches/tile/source/blender/compositor/operations/COM_CompositorOperation.h	2012-05-02 10:36:29 UTC (rev 46182)
@@ -26,13 +26,34 @@
 #include "DNA_scene_types.h"
 #include "BLI_rect.h"
 
+/**
+  * @brief Compositor output operation
+  */
 class CompositorOperation : public NodeOperation {
 private:
+	/**
+	  * @brief local reference to the scene
+	  */
 	const Scene* scene;
+	
+	/**
+	  * @brief local reference to the node tree
+	  */
 	const bNodeTree* tree;
+	
+	/**
+	  * @brief reference to the output float buffer
+	  */
 	float *outputBuffer;
 	
+	/**
+	  * @brief local reference to the input image operation
+	  */
 	SocketReader* imageInput;
+
+	/**
+	  * @brief local reference to the input alpha operation
+	  */
 	SocketReader* alphaInput;
 public:
 	CompositorOperation();
@@ -43,5 +64,6 @@
 	void initExecution();
 	void deinitExecution();
 	const int getRenderPriority() const {return 7;}
+	void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
 };
 #endif




More information about the Bf-blender-cvs mailing list