Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-03 21:20:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-03 21:20:03 +0300
commit65f92c893ed2929660e6cff611bdda3141a76318 (patch)
treeaa076e9311acf02437cf617c26d095d11c839c97 /source/blender
parent6680dcd24a10a12925c3a5d5fd4932b1714afdc7 (diff)
- remove UV mapping operator, call a header menu directly (so python can add items there)
- forgot to move bpy_sys.py last commit
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/mesh/mesh_ops.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_intern.h1
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c1
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c66
4 files changed, 2 insertions, 70 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index d2535bb5be2..1e1234d040a 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -291,8 +291,8 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", VKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_edit_mesh_vertices");
- /* UV's */
- WM_keymap_add_item(keymap, "UV_OT_mapping_menu", UKEY, KM_PRESS, 0, 0);
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", UKEY, KM_PRESS, 0, 0);
+ RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_uv_map");
ED_object_generic_keymap(keyconf, keymap, TRUE);
}
diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h
index cca357c8685..e9d128adc3a 100644
--- a/source/blender/editors/uvedit/uvedit_intern.h
+++ b/source/blender/editors/uvedit/uvedit_intern.h
@@ -70,7 +70,6 @@ void UV_OT_average_islands_scale(struct wmOperatorType *ot);
void UV_OT_cube_project(struct wmOperatorType *ot);
void UV_OT_cylinder_project(struct wmOperatorType *ot);
void UV_OT_from_view(struct wmOperatorType *ot);
-void UV_OT_mapping_menu(struct wmOperatorType *ot);
void UV_OT_minimize_stretch(struct wmOperatorType *ot);
void UV_OT_pack_islands(struct wmOperatorType *ot);
void UV_OT_reset(struct wmOperatorType *ot);
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 2ad2f003d6c..460f9970861 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -3090,7 +3090,6 @@ void ED_operatortypes_uvedit(void)
WM_operatortype_append(UV_OT_cube_project);
WM_operatortype_append(UV_OT_cylinder_project);
WM_operatortype_append(UV_OT_from_view);
- WM_operatortype_append(UV_OT_mapping_menu);
WM_operatortype_append(UV_OT_minimize_stretch);
WM_operatortype_append(UV_OT_pack_islands);
WM_operatortype_append(UV_OT_reset);
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 019ac33dfd0..29d9bb4864e 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1307,69 +1307,3 @@ void UV_OT_cube_project(wmOperatorType *ot)
RNA_def_float(ot->srna, "cube_size", 1.0f, 0.0f, FLT_MAX, "Cube Size", "Size of the cube to project on.", 0.001f, 100.0f);
uv_map_clip_correct_properties(ot);
}
-
-/******************* Mapping Menu operator ****************/
-
-static int mapping_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- uiPopupMenu *pup;
- uiLayout *layout;
-
- pup= uiPupMenuBegin(C, "UV Mapping", 0);
- layout= uiPupMenuLayout(pup);
-
- uiItemO(layout, NULL, 0, "UV_OT_unwrap");
- uiItemS(layout);
- uiItemO(layout, NULL, 0, "UV_OT_cube_project");
- uiItemO(layout, NULL, 0, "UV_OT_cylinder_project");
- uiItemO(layout, NULL, 0, "UV_OT_sphere_project");
- uiItemO(layout, NULL, 0, "UV_OT_project_from_view");
- uiItemS(layout);
- uiItemO(layout, NULL, 0, "UV_OT_reset");
-
- uiPupMenuEnd(C, pup);
-
- /* XXX python */
-#ifndef DISABLE_PYTHON
-#if 0
- /* note that we account for the 10 previous entries with i+10: */
- for(pym = BPyMenuTable[PYMENU_UVCALCULATION]; pym; pym = pym->next, i++) {
-
- if(!has_pymenu) {
- strcat(uvmenu, "|%l");
- has_pymenu = 1;
- }
-
- strcat(uvmenu, "|");
- strcat(uvmenu, pym->name);
- strcat(uvmenu, " %x");
- sprintf(menu_number, "%d", i+10);
- strcat(uvmenu, menu_number);
- }
-#endif
-#endif
-
-#ifndef DISABLE_PYTHON
-#if 0
- mode= pupmenu(uvmenu);
- if(mode >= 10) {
- BPY_menu_do_python(PYMENU_UVCALCULATION, mode - 10);
- return;
- }
-#endif
-#endif
-
- return OPERATOR_CANCELLED;
-}
-
-void UV_OT_mapping_menu(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "UV Mapping";
- ot->idname= "UV_OT_mapping_menu";
-
- /* api callbacks */
- ot->invoke= mapping_menu_invoke;
- ot->poll= ED_operator_uvmap;
-}
-