[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50882] trunk/blender/source/blender/ editors/space_node/drawnode.c: Expose image's and clip' s input color space settings to properties panel in compositor,

Sergey Sharybin sergey.vfx at gmail.com
Tue Sep 25 12:14:08 CEST 2012


Revision: 50882
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50882
Author:   nazgul
Date:     2012-09-25 10:14:07 +0000 (Tue, 25 Sep 2012)
Log Message:
-----------
Expose image's and clip's input color space settings to properties panel in compositor,
so now input color space could be changed directly from the compositor.

The only unfinished thing is missed compositor update when color space is
changing. Not sure about correct fix for this yet.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_node/drawnode.c

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/drawnode.c	2012-09-25 09:40:04 UTC (rev 50881)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c	2012-09-25 10:14:07 UTC (rev 50882)
@@ -1494,6 +1494,21 @@
 	node_buts_image_user(layout, C, ptr, &imaptr, &iuserptr);
 }
 
+static void node_composit_buts_image_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+{
+	bNode *node = ptr->data;
+	PointerRNA imaptr;
+
+	node_composit_buts_image(layout, C, ptr);
+
+	if (!node->id)
+		return;
+
+	imaptr = RNA_pointer_get(ptr, "image");
+
+	uiTemplateColorspaceSettings(layout, &imaptr, "colorspace_settings");
+}
+
 static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, PointerRNA *ptr)
 {
 	bNode *node = ptr->data;
@@ -2221,6 +2236,21 @@
 	uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL);
 }
 
+static void node_composit_buts_movieclip_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+{
+	bNode *node = ptr->data;
+	PointerRNA clipptr;
+
+	uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL);
+
+	if (!node->id)
+		return;
+
+	clipptr = RNA_pointer_get(ptr, "clip");
+
+	uiTemplateColorspaceSettings(layout, &clipptr, "colorspace_settings");
+}
+
 static void node_composit_buts_stabilize2d(uiLayout *layout, bContext *C, PointerRNA *ptr)
 {
 	bNode *node = ptr->data;
@@ -2619,6 +2649,7 @@
 
 		case CMP_NODE_IMAGE:
 			ntype->uifunc = node_composit_buts_image;
+			ntype->uifuncbut = node_composit_buts_image_details;
 			break;
 		case CMP_NODE_R_LAYERS:
 			ntype->uifunc = node_composit_buts_renderlayers;
@@ -2773,6 +2804,7 @@
 			break;
 		case CMP_NODE_MOVIECLIP:
 			ntype->uifunc = node_composit_buts_movieclip;
+			ntype->uifuncbut = node_composit_buts_movieclip_details;
 			break;
 		case CMP_NODE_STABILIZE2D:
 			ntype->uifunc = node_composit_buts_stabilize2d;




More information about the Bf-blender-cvs mailing list