[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56070] trunk/blender/source/blender/ editors: Fix #34978: for cycles, images displayed in the UV editor where coupled to the

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Apr 15 20:05:54 CEST 2013


Revision: 56070
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56070
Author:   blendix
Date:     2013-04-15 18:05:53 +0000 (Mon, 15 Apr 2013)
Log Message:
-----------
Fix #34978: for cycles, images displayed in the UV editor where coupled to the
active image texture node in the material, now this is removed and the image in
the image editor is decoupled and not changed upon entering edit mode.

This system caused more confusion then it's worth, changing or removing textures
would modify the material but users would often not be aware of this.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_image/space_image.c
    trunk/blender/source/blender/editors/uvedit/uvedit_ops.c

Modified: trunk/blender/source/blender/editors/space_image/space_image.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/space_image.c	2013-04-15 17:45:15 UTC (rev 56069)
+++ trunk/blender/source/blender/editors/space_image/space_image.c	2013-04-15 18:05:53 UTC (rev 56070)
@@ -398,16 +398,7 @@
 		int selected = !(scene->toolsettings->uv_flag & UV_SYNC_SELECTION); /* only selected active face? */
 
 		if (BKE_scene_use_new_shading_nodes(scene)) {
-			/* new shading system, get image from material */
-			BMFace *efa = BM_active_face_get(em->bm, sloppy, selected);
-
-			if (efa) {
-				Image *node_ima;
-				ED_object_get_active_image(obedit, efa->mat_nr + 1, &node_ima, NULL, NULL);
-
-				if (node_ima)
-					sima->image = node_ima;
-			}
+			/* new shading system does not alter image */
 		}
 		else {
 			/* old shading system, we set texface */

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_ops.c	2013-04-15 17:45:15 UTC (rev 56069)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_ops.c	2013-04-15 18:05:53 UTC (rev 56070)
@@ -167,13 +167,12 @@
 
 //#define USE_SWITCH_ASPECT
 
-void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *ima, Image *previma)
+void ED_uvedit_assign_image(Main *UNUSED(bmain), Scene *scene, Object *obedit, Image *ima, Image *previma)
 {
 	BMEditMesh *em;
 	BMIter iter;
 	MTexPoly *tf;
 	int update = 0;
-	int sloppy = TRUE;
 	int selected = !(scene->toolsettings->uv_flag & UV_SYNC_SELECTION);
 	
 	/* skip assigning these procedural images... */
@@ -190,11 +189,7 @@
 	}
 
 	if (BKE_scene_use_new_shading_nodes(scene)) {
-		/* new shading system, assign image in material */
-		BMFace *efa = BM_active_face_get(em->bm, sloppy, selected);
-
-		if (efa)
-			ED_object_assign_active_image(bmain, obedit, efa->mat_nr + 1, ima);
+		/* new shading system, do not assign anything */
 	}
 	else {
 		BMFace *efa;




More information about the Bf-blender-cvs mailing list