[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40623] branches/soc-2011-onion-uv-tools/ source/blender: *Add RNA runtime container to remember stitched uv indices
Antony Riakiotakis
kalast at gmail.com
Tue Sep 27 18:45:05 CEST 2011
Revision: 40623
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40623
Author: psy-fi
Date: 2011-09-27 16:45:04 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
*Add RNA runtime container to remember stitched uv indices
*comment out exec function from uv sculpt operator, looks like it can be omitted
Modified Paths:
--------------
branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c
branches/soc-2011-onion-uv-tools/source/blender/makesrna/RNA_access.h
branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_scene.c
Modified: branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c 2011-09-27 16:39:41 UTC (rev 40622)
+++ branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c 2011-09-27 16:45:04 UTC (rev 40623)
@@ -699,21 +699,23 @@
return OPERATOR_RUNNING_MODAL;
}
-
+/*
+ * After discussion with brecht looks like it may not be needed
static int uv_sculpt_stroke_exec(bContext *C, wmOperator *op)
{
- /*
-// Object *obedit = CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
+
if(!uv_paint_stroke_init(C, op)) {
uv_paint_stroke_exit(C, op);
return OPERATOR_CANCELLED;
}
-// uv_smooth_stroke_apply(C, op, event, obedit);
-*/
+ uv_smooth_stroke_apply(C, op, event, obedit);
+
uv_sculpt_stroke_exit(C, op);
return OPERATOR_FINISHED;
}
+*/
static int uv_sculpt_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
{
@@ -755,7 +757,7 @@
/* api callbacks */
ot->invoke = uv_sculpt_stroke_invoke;
- ot->exec = uv_sculpt_stroke_exec;
+// ot->exec = uv_sculpt_stroke_exec;
ot->modal = uv_sculpt_stroke_modal;
ot->poll = uv_sculpt_poll;
Modified: branches/soc-2011-onion-uv-tools/source/blender/makesrna/RNA_access.h
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/makesrna/RNA_access.h 2011-09-27 16:39:41 UTC (rev 40622)
+++ branches/soc-2011-onion-uv-tools/source/blender/makesrna/RNA_access.h 2011-09-27 16:45:04 UTC (rev 40623)
@@ -405,6 +405,7 @@
extern StructRNA RNA_Screen;
extern StructRNA RNA_ScrewModifier;
extern StructRNA RNA_Sculpt;
+extern StructRNA RNA_SelectedUvElement;
extern StructRNA RNA_Sensor;
extern StructRNA RNA_Sequence;
extern StructRNA RNA_SequenceColorBalance;
Modified: branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_scene.c 2011-09-27 16:39:41 UTC (rev 40622)
+++ branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_scene.c 2011-09-27 16:45:04 UTC (rev 40623)
@@ -3467,6 +3467,24 @@
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
}
+/* Runtime property, used to remember uv indices, used only in UV stitch for now.
+ */
+static void rna_def_selected_uv_element(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SelectedUvElement", "PropertyGroup");
+ RNA_def_struct_ui_text(srna, "Selected Uv Element", "");
+
+ /* store the index to the UV element selected */
+ prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_flag(prop, PROP_IDPROPERTY);
+ RNA_def_property_ui_text(prop, "Index", "");
+}
+
+
+
void RNA_def_scene(BlenderRNA *brna)
{
StructRNA *srna;
More information about the Bf-blender-cvs
mailing list