[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35629] trunk/blender/source/blender/ editors/space_buttons: Todo item:

Ton Roosendaal ton at blender.org
Sat Mar 19 19:23:22 CET 2011


Revision: 35629
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35629
Author:   ton
Date:     2011-03-19 18:23:21 +0000 (Sat, 19 Mar 2011)
Log Message:
-----------
Todo item:

Improving UI visualization of using Material nodes:
- Property editor: the context top line now shows the linkage path
  (in material and texture view mode)
- Activating new material node refreshes preview in property editor
  when in texture mode.

This should make editing textures with node materials a bit more clear.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_buttons/buttons_context.c
    trunk/blender/source/blender/editors/space_buttons/space_buttons.c

Modified: trunk/blender/source/blender/editors/space_buttons/buttons_context.c
===================================================================
--- trunk/blender/source/blender/editors/space_buttons/buttons_context.c	2011-03-19 16:30:52 UTC (rev 35628)
+++ trunk/blender/source/blender/editors/space_buttons/buttons_context.c	2011-03-19 18:23:21 UTC (rev 35629)
@@ -236,6 +236,12 @@
 			ma= give_current_material(ob, ob->actcol);
 			RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
 			path->len++;
+			
+			ma= give_node_material(ma);
+			if(ma) {
+				RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
+				path->len++;
+			}			
 			return 1;
 		}
 	}

Modified: trunk/blender/source/blender/editors/space_buttons/space_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_buttons/space_buttons.c	2011-03-19 16:30:52 UTC (rev 35628)
+++ trunk/blender/source/blender/editors/space_buttons/space_buttons.c	2011-03-19 18:23:21 UTC (rev 35629)
@@ -356,8 +356,12 @@
 			}
 			break;
 		case NC_NODE:
-			if(wmn->action==NA_SELECTED)
+			if(wmn->action==NA_SELECTED) {
 				ED_area_tag_redraw(sa);
+				/* new active node, update texture preview */
+				if(sbuts->mainb == BCONTEXT_TEXTURE)
+					sbuts->preview= 1;
+			}
 			break;
 		/* Listener for preview render, when doing an global undo. */
 		case NC_WINDOW:




More information about the Bf-blender-cvs mailing list