diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index ce31cb27c9a..9335b3619fc 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -246,19 +246,10 @@ static void rna_def_space_image_uv(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; -#if 0 - static EnumPropertyItem select_mode_items[] = { - {SI_SELECT_VERTEX, "VERTEX", 0, "Vertex", "Vertex selection mode."}, - //{SI_SELECT_EDGE, "Edge", 0, "Edge", "Edge selection mode."}, - {SI_SELECT_FACE, "FACE", 0, "Face", "Face selection mode."}, - {SI_SELECT_ISLAND, "ISLAND", 0, "Island", "Island selection mode."}, - {0, NULL, 0, NULL, NULL}}; -#endif - static EnumPropertyItem sticky_mode_items[] = { - {SI_STICKY_DISABLE, "DISABLED", 0, "Disabled", "Sticky vertex selection disabled."}, - {SI_STICKY_LOC, "SHARED_LOCATION", 0, "SHARED_LOCATION", "Select UVs that are at the same location and share a mesh vertex."}, - {SI_STICKY_VERTEX, "SHARED_VERTEX", 0, "SHARED_VERTEX", "Select UVs that share mesh vertex, irrespective if they are in the same location."}, + {SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled."}, + {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "SHARED_LOCATION", "Select UVs that are at the same location and share a mesh vertex."}, + {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "SHARED_VERTEX", "Select UVs that share mesh vertex, irrespective if they are in the same location."}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem dt_uv_items[] = { @@ -273,17 +264,18 @@ static void rna_def_space_image_uv(BlenderRNA *brna) {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces."}, {0, NULL, 0, NULL, NULL}}; + static EnumPropertyItem pivot_items[] = { + {V3D_CENTER, "CENTER", ICON_ROTATE, "Bounding Box Center", ""}, + {V3D_CENTROID, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""}, + {V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""}, + {0, NULL, 0, NULL, NULL}}; + srna= RNA_def_struct(brna, "SpaceUVEditor", NULL); RNA_def_struct_sdna(srna, "SpaceImage"); RNA_def_struct_nested(brna, srna, "SpaceImageEditor"); RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space."); /* selection */ - /*prop= RNA_def_property(srna, "selection_mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "selectmode"); - RNA_def_property_enum_items(prop, select_mode_items); - RNA_def_property_ui_text(prop, "Selection Mode", "UV selection and display mode.");*/ - prop= RNA_def_property(srna, "sticky_selection_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sticky"); RNA_def_property_enum_items(prop, sticky_mode_items); @@ -313,16 +305,15 @@ static void rna_def_space_image_uv(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw."); RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL); - prop= RNA_def_property(srna, "draw_modified_edges", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch"); - RNA_def_property_enum_items(prop, dt_uvstretch_items); - RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges from the final mesh after object modifier evaluation."); + prop= RNA_def_property(srna, "draw_modified_edges", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW); + RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied."); RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL); - /*prop= RNA_def_property(srna, "local_view", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LOCAL_UV); - RNA_def_property_ui_text(prop, "Local View", "Draw only faces with the currently displayed image assigned."); - RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);*/ + prop= RNA_def_property(srna, "draw_other_objects", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER); + RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image."); + RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL); prop= RNA_def_property(srna, "normalized_coordinates", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS); @@ -331,12 +322,6 @@ static void rna_def_space_image_uv(BlenderRNA *brna) /* todo: move edge and face drawing options here from G.f */ - /* editing */ - /*prop= RNA_def_property(srna, "sync_selection", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SYNC_UVSEL); - RNA_def_property_ui_text(prop, "Sync Selection", "Keep UV and edit mode mesh selection in sync."); - RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);*/ - prop= RNA_def_property(srna, "snap_to_pixels", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP); RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing."); @@ -348,6 +333,12 @@ static void rna_def_space_image_uv(BlenderRNA *brna) prop= RNA_def_property(srna, "live_unwrap", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP); RNA_def_property_ui_text(prop, "Live Unwrap", "Continuously unwrap the selected UV island while transforming pinned vertices."); + + prop= RNA_def_property(srna, "pivot", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "around"); + RNA_def_property_enum_items(prop, pivot_items); + RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot."); + RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL); } static void rna_def_space_outliner(BlenderRNA *brna) |