[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43565] branches/bmesh/blender: svn merge ^/trunk/blender -r43554:43564

Campbell Barton ideasman42 at gmail.com
Fri Jan 20 16:34:46 CET 2012


Revision: 43565
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43565
Author:   campbellbarton
Date:     2012-01-20 15:34:40 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r43554:43564

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

Modified Paths:
--------------
    branches/bmesh/blender/build_files/scons/tools/Blender.py
    branches/bmesh/blender/source/blender/blenkernel/intern/key.c
    branches/bmesh/blender/source/blender/blenkernel/intern/node.c
    branches/bmesh/blender/source/blender/blenkernel/intern/text.c
    branches/bmesh/blender/source/blender/editors/include/ED_image.h
    branches/bmesh/blender/source/blender/editors/space_image/image_draw.c
    branches/bmesh/blender/source/blender/editors/space_image/image_ops.c
    branches/bmesh/blender/source/blender/editors/space_node/node_edit.c
    branches/bmesh/blender/source/blender/editors/space_node/node_templates.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_edit.c
    branches/bmesh/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
    branches/bmesh/blender/source/blender/imbuf/intern/divers.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_tracking.c
    branches/bmesh/blender/source/blender/nodes/NOD_socket.h
    branches/bmesh/blender/source/blender/nodes/intern/node_common.c
    branches/bmesh/blender/source/blender/nodes/intern/node_socket.c

Property Changed:
----------------
    branches/bmesh/blender/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43554
   + /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43564

Modified: branches/bmesh/blender/build_files/scons/tools/Blender.py
===================================================================
--- branches/bmesh/blender/build_files/scons/tools/Blender.py	2012-01-20 15:22:20 UTC (rev 43564)
+++ branches/bmesh/blender/build_files/scons/tools/Blender.py	2012-01-20 15:34:40 UTC (rev 43565)
@@ -272,7 +272,7 @@
         syslibs += Split(lenv['BF_PTHREADS_LIB'])
     if lenv['WITH_BF_COLLADA']:
         syslibs.append(lenv['BF_PCRE_LIB'])
-        if lenv['BF_DEBUG']:
+        if lenv['BF_DEBUG'] and (lenv['OURPLATFORM'] != 'linux'):
             syslibs += [colladalib+'_d' for colladalib in Split(lenv['BF_OPENCOLLADA_LIB'])]
         else:
             syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/key.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/key.c	2012-01-20 15:22:20 UTC (rev 43564)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/key.c	2012-01-20 15:34:40 UTC (rev 43565)
@@ -420,7 +420,7 @@
 			if(k1->next==NULL) k[0]=k1;
 			k1=k1->next;
 		}
-		k1= k[1];
+		/* k1= k[1]; */ /* UNUSED */
 		t[0]= k[0]->pos;
 		t[1]+= dpos;
 		t[2]= k[2]->pos + dpos;

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/node.c	2012-01-20 15:22:20 UTC (rev 43564)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/node.c	2012-01-20 15:34:40 UTC (rev 43565)
@@ -159,7 +159,6 @@
 
 static bNodeSocket *make_socket(bNodeTree *UNUSED(ntree), int in_out, const char *name, int type)
 {
-	bNodeSocketType *stype= ntreeGetSocketType(type);
 	bNodeSocket *sock;
 	
 	sock= MEM_callocN(sizeof(bNodeSocket), "sock");
@@ -169,8 +168,8 @@
 	sock->type= type;
 	sock->storage = NULL;
 	
-	if (stype->value_structsize > 0)
-		sock->default_value = MEM_callocN(stype->value_structsize, "default socket value");
+	sock->default_value = node_socket_make_default_value(type);
+	node_socket_init_default_value(type, sock->default_value);
 	
 	return sock;
 }
@@ -216,8 +215,7 @@
 	BLI_remlink(&node->inputs, sock);
 	BLI_remlink(&node->outputs, sock);
 	
-	if (sock->default_value)
-		MEM_freeN(sock->default_value);
+	node_socket_free_default_value(sock->type, sock->default_value);
 	MEM_freeN(sock);
 	
 	node->update |= NODE_UPDATE;
@@ -236,13 +234,10 @@
 	}
 	
 	for (sock=node->inputs.first; sock; sock=sock->next)
-		if (sock->default_value)
-			MEM_freeN(sock->default_value);
+		node_socket_free_default_value(sock->type, sock->default_value);
 	BLI_freelistN(&node->inputs);
 	for (sock=node->outputs.first; sock; sock=sock->next)
-		if (sock->default_value)
-			MEM_freeN(sock->default_value);
-	
+		node_socket_free_default_value(sock->type, sock->default_value);
 	BLI_freelistN(&node->outputs);
 	
 	node->update |= NODE_UPDATE;
@@ -396,7 +391,8 @@
 		oldsock->new_sock= sock;
 		sock->stack_index= 0;
 		
-		sock->default_value = (oldsock->default_value ? MEM_dupallocN(oldsock->default_value) : NULL);
+		sock->default_value = node_socket_make_default_value(oldsock->type);
+		node_socket_copy_default_value(oldsock->type, sock->default_value, oldsock->default_value);
 		
 		/* XXX some compositor node (e.g. image, render layers) still store
 		 * some persistent buffer data here, need to clear this to avoid dangling pointers.
@@ -410,7 +406,8 @@
 		oldsock->new_sock= sock;
 		sock->stack_index= 0;
 		
-		sock->default_value = (oldsock->default_value ? MEM_dupallocN(oldsock->default_value) : NULL);
+		sock->default_value = node_socket_make_default_value(oldsock->type);
+		node_socket_copy_default_value(oldsock->type, sock->default_value, oldsock->default_value);
 		
 		/* XXX some compositor node (e.g. image, render layers) still store
 		 * some persistent buffer data here, need to clear this to avoid dangling pointers.
@@ -658,13 +655,15 @@
 	for(gsock= newtree->inputs.first, oldgsock= ntree->inputs.first; gsock; gsock=gsock->next, oldgsock=oldgsock->next) {
 		oldgsock->new_sock= gsock;
 		gsock->groupsock = (oldgsock->groupsock ? oldgsock->groupsock->new_sock : NULL);
-		gsock->default_value = (oldgsock->default_value ? MEM_dupallocN(oldgsock->default_value) : NULL);
+		gsock->default_value = node_socket_make_default_value(oldgsock->type);
+		node_socket_copy_default_value(oldgsock->type, gsock->default_value, oldgsock->default_value);
 	}
 	BLI_duplicatelist(&newtree->outputs, &ntree->outputs);
 	for(gsock= newtree->outputs.first, oldgsock= ntree->outputs.first; gsock; gsock=gsock->next, oldgsock=oldgsock->next) {
 		oldgsock->new_sock= gsock;
 		gsock->groupsock = (oldgsock->groupsock ? oldgsock->groupsock->new_sock : NULL);
-		gsock->default_value = (oldgsock->default_value ? MEM_dupallocN(oldgsock->default_value) : NULL);
+		gsock->default_value = node_socket_make_default_value(oldgsock->type);
+		node_socket_copy_default_value(oldgsock->type, gsock->default_value, oldgsock->default_value);
 	}
 	
 	/* copy links */
@@ -863,14 +862,12 @@
 	
 	for (sock=node->inputs.first; sock; sock = nextsock) {
 		nextsock = sock->next;
-		if (sock->default_value)
-			MEM_freeN(sock->default_value);
+		node_socket_free_default_value(sock->type, sock->default_value);
 		MEM_freeN(sock);
 	}
 	for (sock=node->outputs.first; sock; sock = nextsock) {
 		nextsock = sock->next;
-		if (sock->default_value)
-			MEM_freeN(sock->default_value);
+		node_socket_free_default_value(sock->type, sock->default_value);
 		MEM_freeN(sock);
 	}
 
@@ -924,12 +921,10 @@
 	}
 	
 	for (sock=ntree->inputs.first; sock; sock=sock->next)
-		if (sock->default_value)
-			MEM_freeN(sock->default_value);
+		node_socket_free_default_value(sock->type, sock->default_value);
 	BLI_freelistN(&ntree->inputs);
 	for (sock=ntree->outputs.first; sock; sock=sock->next)
-		if (sock->default_value)
-			MEM_freeN(sock->default_value);
+		node_socket_free_default_value(sock->type, sock->default_value);
 	BLI_freelistN(&ntree->outputs);
 }
 

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/text.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/text.c	2012-01-20 15:22:20 UTC (rev 43564)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/text.c	2012-01-20 15:34:40 UTC (rev 43565)
@@ -1944,6 +1944,10 @@
 			break;
 		case 4: /* 32-bit unicode symbol */
 			unicode= txt_undo_read_uint32(undo_buf, undo_pos);
+		default:
+			/* should never happen */
+			BLI_assert(0);
+			unicode= 0;
 	}
 	
 	return unicode;

Modified: branches/bmesh/blender/source/blender/editors/include/ED_image.h
===================================================================
--- branches/bmesh/blender/source/blender/editors/include/ED_image.h	2012-01-20 15:22:20 UTC (rev 43564)
+++ branches/bmesh/blender/source/blender/editors/include/ED_image.h	2012-01-20 15:34:40 UTC (rev 43565)
@@ -67,8 +67,8 @@
 /* UI level image (texture) updating... render calls own stuff (too) */
 void ED_image_update_frame(const struct Main *mainp, int cfra);
 
-void ED_image_draw_info(struct ARegion *ar, int color_manage, int channels,
-                        int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf);
+void ED_image_draw_info(struct ARegion *ar, int color_manage, int channels, int x, int y,
+                        const unsigned char cp[4], const float fp[4], int *zp, float *zpf);
 
 #endif /* ED_IMAGE_H */
 

Modified: branches/bmesh/blender/source/blender/editors/space_image/image_draw.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/space_image/image_draw.c	2012-01-20 15:22:20 UTC (rev 43564)
+++ branches/bmesh/blender/source/blender/editors/space_image/image_draw.c	2012-01-20 15:34:40 UTC (rev 43565)
@@ -111,7 +111,8 @@
 }
 
 /* used by node view too */
-void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf)
+void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int y,
+                        const unsigned char cp[4], const float fp[4], int *zp, float *zpf)
 {
 	char str[256];
 	float dx= 6;
@@ -211,39 +212,46 @@
 	
 	/* color rectangle */
 	if (channels==1) {
-		if (fp)
+		if (fp) {
 			col[0] = col[1] = col[2] = fp[0];
-		else if (cp)
+		}
+		else if (cp) {
 			col[0] = col[1] = col[2] = (float)cp[0]/255.0f;
-		else
+		}
+		else {
 			col[0] = col[1] = col[2] = 0.0f;
+		}
+		col[3] = 1.0f;
 	}
 	else if (channels==3) {
-		if (fp)
+		if (fp) {
 			copy_v3_v3(col, fp);
+		}
 		else if (cp) {
-			col[0] = (float)cp[0]/255.0f;
-			col[1] = (float)cp[1]/255.0f;
-			col[2] = (float)cp[2]/255.0f;
+			rgb_uchar_to_float(col, cp);
 		}
-		else
+		else {
 			zero_v3(col);
+		}
+		col[3] = 1.0f;
 	}
 	else if (channels==4) {
 		if (fp)
 			copy_v4_v4(col, fp);
 		else if (cp) {
-			col[0] = (float)cp[0]/255.0f;
-			col[1] = (float)cp[1]/255.0f;
-			col[2] = (float)cp[2]/255.0f;
-			col[3] = (float)cp[3]/255.0f;
+			rgba_uchar_to_float(col, cp);
 		}
-		else
+		else {
 			zero_v4(col);
+		}
 	}
+	else {
+		BLI_assert(0);
+		zero_v4(col);
+	}
+
 	if (color_manage) {
-		linearrgb_to_srgb_v3_v3(finalcol, col);
-		finalcol[3] = col[3];
+		linearrgb_to_srgb_v4(finalcol, col);
 	}
 	else {
 		copy_v4_v4(finalcol, col);

Modified: branches/bmesh/blender/source/blender/editors/space_image/image_ops.c
===================================================================

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list