UV: add rip tool
New rip tool matching edit-mesh rip functionality. Useful as disconnecting UV's, especially for loops is inconvenient without this. This uses 'V' to rip, changing stitch to 'Alt-V'.
This commit is contained in:
parent
9353477383
commit
80393a0eba
Notes:
blender-bot
2023-02-14 11:27:34 +01:00
Referenced by issue #78751, UV rip gives strange results on some faces Referenced by issue #37880, Rip Tool for UV editing
|
@ -867,7 +867,8 @@ def km_uv_editor(params):
|
|||
*_template_items_select_actions(params, "uv.select_all"),
|
||||
("uv.select_pinned", {"type": 'P', "value": 'PRESS', "shift": True}, None),
|
||||
op_menu("IMAGE_MT_uvs_weldalign", {"type": 'W', "value": 'PRESS', "shift": True}),
|
||||
("uv.stitch", {"type": 'V', "value": 'PRESS'}, None),
|
||||
("uv.stitch", {"type": 'V', "value": 'PRESS', "alt": True}, None),
|
||||
("uv.rip_move", {"type": 'V', "value": 'PRESS'}, None),
|
||||
("uv.pin", {"type": 'P', "value": 'PRESS'},
|
||||
{"properties": [("clear", False)]}),
|
||||
("uv.pin", {"type": 'P', "value": 'PRESS', "alt": True},
|
||||
|
|
|
@ -47,6 +47,7 @@ struct wmKeyConfig;
|
|||
|
||||
/* uvedit_ops.c */
|
||||
void ED_operatortypes_uvedit(void);
|
||||
void ED_operatormacros_uvedit(void);
|
||||
void ED_keymap_uvedit(struct wmKeyConfig *keyconf);
|
||||
|
||||
bool ED_uvedit_minmax(const struct Scene *scene,
|
||||
|
|
|
@ -159,6 +159,7 @@ void ED_spacemacros_init(void)
|
|||
* We need to have them go after python operators too */
|
||||
ED_operatormacros_armature();
|
||||
ED_operatormacros_mesh();
|
||||
ED_operatormacros_uvedit();
|
||||
ED_operatormacros_metaball();
|
||||
ED_operatormacros_node();
|
||||
ED_operatormacros_object();
|
||||
|
|
|
@ -39,6 +39,7 @@ set(SRC
|
|||
uvedit_buttons.c
|
||||
uvedit_draw.c
|
||||
uvedit_ops.c
|
||||
uvedit_rip.c
|
||||
uvedit_parametrizer.c
|
||||
uvedit_select.c
|
||||
uvedit_smart_stitch.c
|
||||
|
|
|
@ -106,6 +106,7 @@ void UV_OT_pack_islands(struct wmOperatorType *ot);
|
|||
void UV_OT_reset(struct wmOperatorType *ot);
|
||||
void UV_OT_sphere_project(struct wmOperatorType *ot);
|
||||
void UV_OT_unwrap(struct wmOperatorType *ot);
|
||||
void UV_OT_rip(struct wmOperatorType *ot);
|
||||
void UV_OT_stitch(struct wmOperatorType *ot);
|
||||
|
||||
/* uvedit_select.c */
|
||||
|
|
|
@ -2087,6 +2087,7 @@ void ED_operatortypes_uvedit(void)
|
|||
|
||||
WM_operatortype_append(UV_OT_align);
|
||||
|
||||
WM_operatortype_append(UV_OT_rip);
|
||||
WM_operatortype_append(UV_OT_stitch);
|
||||
|
||||
WM_operatortype_append(UV_OT_seams_from_islands);
|
||||
|
@ -2111,6 +2112,21 @@ void ED_operatortypes_uvedit(void)
|
|||
WM_operatortype_append(UV_OT_cursor_set);
|
||||
}
|
||||
|
||||
void ED_operatormacros_uvedit(void)
|
||||
{
|
||||
wmOperatorType *ot;
|
||||
wmOperatorTypeMacro *otmacro;
|
||||
|
||||
ot = WM_operatortype_append_macro("UV_OT_rip_move",
|
||||
"UV Rip Move",
|
||||
"unstitch UV's and move the result",
|
||||
OPTYPE_UNDO | OPTYPE_REGISTER);
|
||||
WM_operatortype_macro_define(ot, "UV_OT_rip");
|
||||
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
|
||||
RNA_enum_set(otmacro->ptr, "proportional", 0);
|
||||
RNA_boolean_set(otmacro->ptr, "mirror", false);
|
||||
}
|
||||
|
||||
void ED_keymap_uvedit(wmKeyConfig *keyconf)
|
||||
{
|
||||
wmKeyMap *keymap;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue