[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45347] trunk/blender/source/blender/ editors: Fix #30769: cycles showing wrong image from active face in the uv editor,

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Apr 2 18:30:02 CEST 2012


Revision: 45347
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45347
Author:   blendix
Date:     2012-04-02 16:30:01 +0000 (Mon, 02 Apr 2012)
Log Message:
-----------
Fix #30769: cycles showing wrong image from active face in the uv editor,
with multiple material slots.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
    trunk/blender/source/blender/editors/space_image/space_image.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2012-04-02 16:29:34 UTC (rev 45346)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2012-04-02 16:30:01 UTC (rev 45347)
@@ -531,7 +531,7 @@
 
 	if (scene_use_new_shading_nodes(s->scene)) {
 		MFace *mf = &s->dm_mface[face_index];
-		ED_object_get_active_image(s->ob, mf->mat_nr, &ima, NULL, NULL);
+		ED_object_get_active_image(s->ob, mf->mat_nr+1, &ima, NULL, NULL);
 	}
 	else {
 		MTFace *tf = &s->dm_mtface[face_index];
@@ -547,7 +547,7 @@
 
 	if (ps->do_new_shading_nodes) { /* cached scene_use_new_shading_nodes result */
 		MFace *mf = ps->dm_mface + face_index;
-		ED_object_get_active_image(ps->ob, mf->mat_nr, &ima, NULL, NULL);
+		ED_object_get_active_image(ps->ob, mf->mat_nr+1, &ima, NULL, NULL);
 	}
 	else {
 		ima = dm_mtface[face_index].tpage;

Modified: trunk/blender/source/blender/editors/space_image/space_image.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/space_image.c	2012-04-02 16:29:34 UTC (rev 45346)
+++ trunk/blender/source/blender/editors/space_image/space_image.c	2012-04-02 16:30:01 UTC (rev 45347)
@@ -603,7 +603,7 @@
 
 			if (efa) {
 				Image *node_ima;
-				ED_object_get_active_image(obedit, efa->mat_nr, &node_ima, NULL, NULL);
+				ED_object_get_active_image(obedit, efa->mat_nr+1, &node_ima, NULL, NULL);
 
 				if (node_ima)
 					sima->image = node_ima;




More information about the Bf-blender-cvs mailing list