[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47886] branches/soc-2011-tomato: Merging r47874 through r47885 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Thu Jun 14 13:22:30 CEST 2012


Revision: 47886
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47886
Author:   nazgul
Date:     2012-06-14 11:22:24 +0000 (Thu, 14 Jun 2012)
Log Message:
-----------
Merging r47874 through r47885 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47874
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47885

Modified Paths:
--------------
    branches/soc-2011-tomato/extern/recastnavigation/Recast/Include/RecastAssert.h
    branches/soc-2011-tomato/intern/raskter/raskter.c
    branches/soc-2011-tomato/source/blender/collada/ExportSettings.h
    branches/soc-2011-tomato/source/blender/collada/collada.cpp
    branches/soc-2011-tomato/source/blender/collada/collada.h
    branches/soc-2011-tomato/source/blender/collada/collada_utils.cpp
    branches/soc-2011-tomato/source/blender/collada/collada_utils.h
    branches/soc-2011-tomato/source/blender/compositor/COM_defines.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_InputSocket.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_InputSocket.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeBase.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeBase.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_OutputSocket.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_OutputSocket.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_Socket.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_Socket.h
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MuteNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_OutputFileNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_SwitchNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_SocketProxyOperation.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene_api.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2011-tomato/source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.h
    branches/soc-2011-tomato/source/gameengine/Rasterizer/RAS_2DFilterManager.h
    branches/soc-2011-tomato/source/gameengine/Rasterizer/RAS_MeshObject.h

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47873
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47885

Modified: branches/soc-2011-tomato/extern/recastnavigation/Recast/Include/RecastAssert.h
===================================================================
--- branches/soc-2011-tomato/extern/recastnavigation/Recast/Include/RecastAssert.h	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/extern/recastnavigation/Recast/Include/RecastAssert.h	2012-06-14 11:22:24 UTC (rev 47886)
@@ -24,7 +24,7 @@
 
 #ifdef NDEBUG
 // From http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/
-#	define rcAssert(x) do { (void)sizeof(x); } while(__LINE__==-1,false)  
+#	define rcAssert(x) do { (void)sizeof(x); } while((void)(__LINE__ == -1), false)
 #else
 #	include <assert.h> 
 #	define rcAssert assert

Modified: branches/soc-2011-tomato/intern/raskter/raskter.c
===================================================================
--- branches/soc-2011-tomato/intern/raskter/raskter.c	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/intern/raskter/raskter.c	2012-06-14 11:22:24 UTC (rev 47886)
@@ -810,9 +810,9 @@
 		buf[i] *= 0.5f;
 	}
 #endif
-	buf_x = buf_x;
-	buf_y = buf_y;
-	buf[0] = buf[0];
+	(void)buf_x;
+	(void)buf_y;
+	(void)buf;
 	return 1;
 #else
 	/*XXX - TODO: THIS IS NOT FINAL CODE - IT DOES NOT WORK - DO NOT ENABLE IT */

Modified: branches/soc-2011-tomato/source/blender/collada/ExportSettings.h
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/ExportSettings.h	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/collada/ExportSettings.h	2012-06-14 11:22:24 UTC (rev 47886)
@@ -39,6 +39,7 @@
  bool include_armatures;
  bool include_children;
  bool use_object_instantiation;
+ bool sort_by_name;
  bool second_life;
  char *filepath;
  LinkNode *export_set;

Modified: branches/soc-2011-tomato/source/blender/collada/collada.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/collada.cpp	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/collada/collada.cpp	2012-06-14 11:22:24 UTC (rev 47886)
@@ -59,6 +59,7 @@
     int include_children,
 
     int use_object_instantiation,
+	int sort_by_name,
     int second_life)
 {
 	ExportSettings export_settings;
@@ -79,6 +80,7 @@
 	export_settings.include_children         = include_children != 0;
 	export_settings.second_life              = second_life != 0;
 	export_settings.use_object_instantiation = use_object_instantiation != 0;
+	export_settings.sort_by_name             = sort_by_name != 0;
 	export_settings.filepath                 = (char *)filepath;
 
 	int includeFilter = OB_REL_NONE;
@@ -88,6 +90,9 @@
 	eObjectSet objectSet = (export_settings.selected) ? OB_SET_SELECTED : OB_SET_ALL;
 	export_settings.export_set = BKE_object_relational_superset(sce, objectSet, (eObRelationTypes)includeFilter);
 
+	if (export_settings.sort_by_name)
+		bc_bubble_sort_by_Object_name(export_settings.export_set);
+
 	DocumentExporter exporter(&export_settings);
 	exporter.exportCurrentScene(sce);
 

Modified: branches/soc-2011-tomato/source/blender/collada/collada.h
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/collada.h	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/collada/collada.h	2012-06-14 11:22:24 UTC (rev 47886)
@@ -47,6 +47,7 @@
 		int include_children,
 
 		int use_object_instantiation,
+		int sort_by_name,
 		int second_life);
 
 

Modified: branches/soc-2011-tomato/source/blender/collada/collada_utils.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/collada_utils.cpp	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/collada/collada_utils.cpp	2012-06-14 11:22:24 UTC (rev 47886)
@@ -226,3 +226,31 @@
 {
 	ob->id.flag &= ~LIB_DOIT;
 }
+
+// Use bubble sort algorithm for sorting the export set
+void bc_bubble_sort_by_Object_name(LinkNode *export_set)
+{
+	int i, j; // loop indices
+	bool unsorted = true;
+
+	LinkNode *current;
+	int set_size = BLI_linklist_length(export_set);
+	for(i = 0; (i < set_size) && unsorted; i++) {
+		unsorted = false;
+		
+		for (current=export_set; current->next; current = current->next) {
+			Object *a = (Object *)current->link;
+			Object *b = (Object *)current->next->link;
+
+			std::string str_a (a->id.name);
+			std::string str_b (b->id.name);
+
+			if (str_a.compare(str_b) > 0) {
+				current->link       = b;
+				current->next->link = a;
+				unsorted = true;
+			}
+			
+		}
+	}
+}
\ No newline at end of file

Modified: branches/soc-2011-tomato/source/blender/collada/collada_utils.h
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/collada_utils.h	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/collada/collada_utils.h	2012-06-14 11:22:24 UTC (rev 47886)
@@ -71,4 +71,6 @@
 extern char *bc_CustomData_get_layer_name(const CustomData *data, int type, int n);
 extern char *bc_CustomData_get_active_layer_name(const CustomData *data, int type);
 
+extern void bc_bubble_sort_by_Object_name(LinkNode *export_set);
+
 #endif

Modified: branches/soc-2011-tomato/source/blender/compositor/COM_defines.h
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/COM_defines.h	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/compositor/COM_defines.h	2012-06-14 11:22:24 UTC (rev 47886)
@@ -28,8 +28,6 @@
  * @ingroup Model
  */
 typedef enum DataType {
-	/** @brief Unknown data type (or not yet known) */
-	COM_DT_UNKNOWN = 0,
 	/** @brief Value data type */
 	COM_DT_VALUE   = 1,
 	/** @brief Vector data type */

Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp	2012-06-14 11:22:24 UTC (rev 47886)
@@ -370,8 +370,8 @@
 {
 	OutputSocket *outputSocket = connection->getFromSocket();
 	InputSocket *inputSocket = connection->getToSocket();
-	DataType fromDatatype = outputSocket->getActualDataType();
-	DataType toDatatype = inputSocket->getActualDataType();
+	DataType fromDatatype = outputSocket->getDataType();
+	DataType toDatatype = inputSocket->getDataType();
 	NodeOperation * converter = NULL;
 	if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_COLOR) {
 		converter = new ConvertValueToColourProg();

Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.cpp	2012-06-14 11:05:15 UTC (rev 47885)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.cpp	2012-06-14 11:22:24 UTC (rev 47886)
@@ -212,7 +212,9 @@
 		writeOperation = new WriteBufferOperation();
 		writeOperation->setbNodeTree(this->getContext().getbNodeTree());
 		this->addOperation(writeOperation);
-		for (index = 0 ; index < outputsocket->getNumberOfConnections();index ++) {
+		ExecutionSystemHelper::addLink(this->getConnections(), outputsocket, writeOperation->getInputSocket(0));
+		writeOperation->readResolutionFromInputSocket();
+		for (index = 0 ; index < outputsocket->getNumberOfConnections()-1;index ++) {
 			SocketConnection * connection = outputsocket->getConnection(index);
 			ReadBufferOperation *readoperation = new ReadBufferOperation();
 			readoperation->setMemoryProxy(writeOperation->getMemoryProxy());
@@ -221,27 +223,21 @@
 			readoperation->readResolutionFromWriteBuffer();
 			this->addOperation(readoperation);
 		}
-		ExecutionSystemHelper::addLink(this->getConnections(), outputsocket, writeOperation->getInputSocket(0));
-		writeOperation->readResolutionFromInputSocket();
 	}
 }
 
 void ExecutionSystem::convertToOperations()
 {
 	unsigned int index;
-	// first determine data types of the nodes, this can be used by the node to convert to a different operation system
-	this->determineActualSocketDataTypes((vector<NodeBase*>&)this->nodes);
 	for (index = 0; index < this->nodes.size(); index++) {
 		Node *node = (Node*)this->nodes[index];
 		node->convertToOperations(this, &this->context);
 	}
 
-	// update the socket types of the operations. this will be used to add conversion operations in the system
-	this->determineActualSocketDataTypes((vector<NodeBase*>&)this->operations);
 	for (index = 0 ; index < this->connections.size(); index ++) {
 		SocketConnection *connection = this->connections[index];
 		if (connection->isValid()) {
-			if (connection->getFromSocket()->getActualDataType() != connection->getToSocket()->getActualDataType()) {
+			if (connection->getFromSocket()->getDataType() != connection->getToSocket()->getDataType()) {
 				Converter::convertDataType(connection, this);
 			}
 		}
@@ -307,26 +303,6 @@
 }
 
 
-void ExecutionSystem::determineActualSocketDataTypes(vector<NodeBase*> &nodes)
-{
-	unsigned int index;
-	/* first do all input nodes */
-	for (index = 0; index < nodes.size(); index++) {
-		NodeBase *node = nodes[index];
-		if (node->isInputNode()) {
-			node->determineActualSocketDataTypes();
-		}
-	}
-
-	/* then all other nodes */

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list