[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23811] trunk/blender/source/blender: - Identify and use retopo icon from icons image.
Martin Poirier
theeth at yahoo.com
Tue Oct 13 18:08:03 CEST 2009
Revision: 23811
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23811
Author: theeth
Date: 2009-10-13 18:08:02 +0200 (Tue, 13 Oct 2009)
Log Message:
-----------
- Identify and use retopo icon from icons image.
- Reuse proportional edit enums between rna scene and transform operator
Modified Paths:
--------------
trunk/blender/source/blender/editors/include/UI_icons.h
trunk/blender/source/blender/editors/space_view3d/view3d_header.c
trunk/blender/source/blender/editors/transform/transform_ops.c
trunk/blender/source/blender/makesrna/RNA_enum_types.h
trunk/blender/source/blender/makesrna/intern/rna_scene.c
Modified: trunk/blender/source/blender/editors/include/UI_icons.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_icons.h 2009-10-13 16:05:57 UTC (rev 23810)
+++ trunk/blender/source/blender/editors/include/UI_icons.h 2009-10-13 16:08:02 UTC (rev 23811)
@@ -685,7 +685,7 @@
DEF_ICON(ICON_BLANK231)
DEF_ICON(ICON_BLANK232)
DEF_ICON(ICON_BLANK233)
-DEF_ICON(ICON_BLANK234)
+DEF_ICON(ICON_RETOPO)
DEF_ICON(ICON_UV_VERTEXSEL)
DEF_ICON(ICON_UV_EDGESEL)
DEF_ICON(ICON_UV_FACESEL)
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_header.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_header.c 2009-10-13 16:05:57 UTC (rev 23810)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_header.c 2009-10-13 16:08:02 UTC (rev 23811)
@@ -2145,7 +2145,7 @@
xco+= XIC;
}
if (ts->snap_mode == SCE_SNAP_MODE_FACE) {
- uiDefIconButBitS(block, TOG, SCE_SNAP_PROJECT, B_REDR, ICON_ROTATECOLLECTION,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Project elements instead of snapping them");
+ uiDefIconButBitS(block, TOG, SCE_SNAP_PROJECT, B_REDR, ICON_RETOPO,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Project elements instead of snapping them");
xco+= XIC;
}
uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SNAP_VERTEX, snapmode_pup(), xco,yco,XIC+10,YIC, &(ts->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode");
Modified: trunk/blender/source/blender/editors/transform/transform_ops.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_ops.c 2009-10-13 16:05:57 UTC (rev 23810)
+++ trunk/blender/source/blender/editors/transform/transform_ops.c 2009-10-13 16:08:02 UTC (rev 23811)
@@ -55,14 +55,6 @@
static float VecOne[3] = {1, 1, 1};
-/* need constants for this */
-EnumPropertyItem proportional_mode_types[] = {
- {0, "OFF", 0, "Off", ""},
- {1, "ON", 0, "On", ""},
- {2, "CONNECTED", 0, "Connected", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
char OP_TRANSLATION[] = "TFM_OT_translate";
char OP_ROTATION[] = "TFM_OT_rotate";
char OP_TOSPHERE[] = "TFM_OT_tosphere";
@@ -341,8 +333,8 @@
void Properties_Proportional(struct wmOperatorType *ot)
{
- RNA_def_enum(ot->srna, "proportional", proportional_mode_types, 0, "Proportional Editing", "");
- RNA_def_enum(ot->srna, "proportional_editing_falloff", prop_mode_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
+ RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, "Proportional Editing", "");
+ RNA_def_enum(ot->srna, "proportional_editing_falloff", proportional_falloff_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
RNA_def_float(ot->srna, "proportional_size", 1, 0, FLT_MAX, "Proportional Size", "", 0, 100);
}
Modified: trunk/blender/source/blender/makesrna/RNA_enum_types.h
===================================================================
--- trunk/blender/source/blender/makesrna/RNA_enum_types.h 2009-10-13 16:05:57 UTC (rev 23810)
+++ trunk/blender/source/blender/makesrna/RNA_enum_types.h 2009-10-13 16:08:02 UTC (rev 23811)
@@ -31,7 +31,8 @@
extern EnumPropertyItem object_mode_items[];
-extern EnumPropertyItem prop_mode_items[];
+extern EnumPropertyItem proportional_falloff_items[];
+extern EnumPropertyItem proportional_editing_items[];
extern EnumPropertyItem snap_mode_items[];
extern EnumPropertyItem space_type_items[];
extern EnumPropertyItem region_type_items[];
Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c 2009-10-13 16:05:57 UTC (rev 23810)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c 2009-10-13 16:08:02 UTC (rev 23811)
@@ -51,7 +51,7 @@
{SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem prop_mode_items[] ={
+EnumPropertyItem proportional_falloff_items[] ={
{PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
{PROP_ROOT, "ROOT", 0, "Root", ""},
@@ -61,7 +61,13 @@
{PROP_RANDOM, "RANDOM", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}};
-
+
+EnumPropertyItem proportional_editing_items[] = {
+ {PROP_EDIT_OFF, "DISABLED", 0, "Disable", ""},
+ {PROP_EDIT_ON, "ENABLED", 0, "Enable", ""},
+ {PROP_EDIT_CONNECTED, "CONNECTED", 0, "Connected", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "DNA_anim_types.h"
@@ -502,12 +508,6 @@
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem proportional_editing_items[] = {
- {PROP_EDIT_OFF, "DISABLED", 0, "Disable", ""},
- {PROP_EDIT_ON, "ENABLED", 0, "Enable", ""},
- {PROP_EDIT_CONNECTED, "CONNECTED", 0, "Connected", ""},
- {0, NULL, 0, NULL, NULL}};
-
srna= RNA_def_struct(brna, "ToolSettings", NULL);
RNA_def_struct_ui_text(srna, "Tool Settings", "");
@@ -540,7 +540,7 @@
prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
- RNA_def_property_enum_items(prop, prop_mode_items);
+ RNA_def_property_enum_items(prop, proportional_falloff_items);
RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
@@ -583,7 +583,7 @@
prop= RNA_def_property(srna, "snap_project", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
RNA_def_property_ui_text(prop, "Project Individual Elements", "DOC_BROKEN");
- RNA_def_property_ui_icon(prop, ICON_ROTATECOLLECTION, 0);
+ RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
/* Auto Keying */
prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
More information about the Bf-blender-cvs
mailing list