[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38580] branches/soc-2011-onion/source/ blender/editors/uvedit/uvedit_ops.c: smart stitch
Antony Riakiotakis
kalast at gmail.com
Thu Jul 21 20:39:50 CEST 2011
Revision: 38580
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38580
Author: psy-fi
Date: 2011-07-21 18:39:49 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
smart stitch
============================
-smart stitch: extra RNA stuff for redo. Note: redo works based on selection 'before' the operator was called.
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.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-21 18:31:01 UTC (rev 38579)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c 2011-07-21 18:39:49 UTC (rev 38580)
@@ -1940,7 +1940,6 @@
{
StitchState *stitch_state = MEM_mallocN(sizeof(StitchState), "stitch_state");
StitchPreviewer *preview = stitch_preview_init();
- EditMesh *em;
Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
@@ -1953,9 +1952,9 @@
stitch_state->use_limit = RNA_boolean_get(op->ptr, "use_limit");
stitch_state->limitDist = RNA_float_get(op->ptr, "limit");
- stitch_state->em = em = BKE_mesh_get_editmesh((Mesh*)obedit->data);
- stitch_state->mode = EDGE_STITCH;
- stitch_state->snapIslands = 0;
+ stitch_state->em = BKE_mesh_get_editmesh((Mesh*)obedit->data);
+ stitch_state->mode = RNA_enum_get(op->ptr, "mode");
+ stitch_state->snapIslands = RNA_boolean_get(op->ptr, "snap_islands");
stitch_state->vmap = EM_make_uv_vert_map2(stitch_state->em, 1);
if(!stitch_state->vmap){
@@ -2261,7 +2260,7 @@
/* properties */
RNA_def_boolean(ot->srna, "use_limit", 0, "Use Limit", "Stitch UVs within a specified limit distance.");
RNA_def_boolean(ot->srna, "snap_islands", 0, "Snap Islands", "Snap islands together. On edge stitch mode, rotates the islands too");
- RNA_def_enum(ot->srna, "mode", mode, 0, "Mode", "Vertex or edge stitching mode. In Edge stitching, both uv's must be stitchable to stitch");
+ RNA_def_enum(ot->srna, "mode", mode, EDGE_STITCH, "Mode", "Vertex or edge stitching mode. In Edge stitching, both uv's must be stitchable to stitch");
RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, "Limit", "Limit distance in normalized coordinates.", -FLT_MAX, FLT_MAX);
}
More information about the Bf-blender-cvs
mailing list