[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38802] branches/soc-2011-onion/source/ blender/editors: Some code to deal with UV synch selection.

Antony Riakiotakis kalast at gmail.com
Fri Jul 29 00:35:34 CEST 2011


Revision: 38802
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38802
Author:   psy-fi
Date:     2011-07-28 22:35:31 +0000 (Thu, 28 Jul 2011)
Log Message:
-----------
Some code to deal with UV synch selection. (Initial request is for this to work in Synch selection mode, will discuss with mentor)

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/include/ED_screen.h
    branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c

Modified: branches/soc-2011-onion/source/blender/editors/include/ED_screen.h
===================================================================
--- branches/soc-2011-onion/source/blender/editors/include/ED_screen.h	2011-07-28 22:15:37 UTC (rev 38801)
+++ branches/soc-2011-onion/source/blender/editors/include/ED_screen.h	2011-07-28 22:35:31 UTC (rev 38802)
@@ -170,6 +170,7 @@
 int		ED_operator_uvedit(struct bContext *C);
 int		ED_operator_uvmap(struct bContext *C);
 int		ED_operator_uvmap_mesh(struct bContext *C);
+int		ED_operator_uv_seam_tag_active(struct bContext *C);
 int		ED_operator_posemode(struct bContext *C);
 
 

Modified: branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c	2011-07-28 22:15:37 UTC (rev 38801)
+++ branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c	2011-07-28 22:35:31 UTC (rev 38802)
@@ -396,6 +396,12 @@
 	return 0;
 }
 
+int	ED_operator_uv_seam_tag_active(struct bContext *C)
+{
+	Scene *scene = CTX_data_scene(C);
+	return ed_spacetype_test(C, SPACE_IMAGE) && (scene->toolsettings->uv_flag & UV_SYNC_SELECTION);
+}
+
 int ED_operator_editsurfcurve(bContext *C)
 {
 	Object *obedit= CTX_data_edit_object(C);

Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c	2011-07-28 22:15:37 UTC (rev 38801)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c	2011-07-28 22:35:31 UTC (rev 38802)
@@ -4356,7 +4356,6 @@
 static int mark_seam_uv_intern(bContext *C, wmOperator *op, wmEvent *event){
 	Object *ob = CTX_data_edit_object(C);
 	Scene *scene = CTX_data_scene(C);
-	SpaceImage *sima = CTX_wm_space_image(C);
 	EditMesh *em= BKE_mesh_get_editmesh((Mesh*)ob->data);
 
 	char selection = RNA_boolean_get(op->ptr, "selection");
@@ -4396,11 +4395,9 @@
 			(*(&hit.efa->e1 + hit.edge))->seam = 1;
 		}
 	}
-//(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) &&
+
 	if((scene->toolsettings->edge_mode_live_unwrap) && (CustomData_has_layer(&em->fdata, CD_MTFACE))){
 		ED_unwrap_lscm(scene, ob, FALSE);
-	}else{
-		uvedit_live_unwrap_update(sima, scene, ob);
 	}
 
 	BKE_mesh_end_editmesh((Mesh*)ob->data, em);
@@ -4435,7 +4432,7 @@
 	/* api callbacks */
 	ot->invoke= mark_seam_uv_invoke;
 	ot->exec= mark_seam_uv_exec;
-	ot->poll= ED_operator_image_active;
+	ot->poll= ED_operator_uv_seam_tag_active;
 
 	RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Mark edge seams for selection");
 	RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,




More information about the Bf-blender-cvs mailing list