Blender
V3.3
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_mesh_mapping.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "UI_interface.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_uvedit.h"
#include "GPU_batch.h"
#include "GPU_state.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "uvedit_intern.h"
Go to the source code of this file.
Classes | |
struct | StitchPreviewer |
struct | IslandStitchData |
struct | UVVertAverage |
struct | UvEdge |
struct | StitchState |
struct | StitchStateContainer |
struct | PreviewPosition |
struct | UvElementID |
struct | StitchStateInit |
Macros | |
#define | STITCH_SELECTED 1 |
#define | STITCH_STITCHABLE 2 |
#define | STITCH_PROCESSED 4 |
#define | STITCH_BOUNDARY 8 |
#define | STITCH_STITCHABLE_CANDIDATE 16 |
#define | STITCH_NO_PREVIEW -1 |
Typedefs | |
typedef struct StitchPreviewer | StitchPreviewer |
typedef struct IslandStitchData | IslandStitchData |
typedef struct UVVertAverage | UVVertAverage |
typedef struct UvEdge | UvEdge |
typedef struct StitchState | StitchState |
typedef struct StitchStateContainer | StitchStateContainer |
typedef struct PreviewPosition | PreviewPosition |
typedef struct UvElementID | UvElementID |
typedef struct StitchStateInit | StitchStateInit |
Enumerations | |
enum | StitchModes { STITCH_VERT , STITCH_EDGE } |
#define STITCH_BOUNDARY 8 |
Definition at line 206 of file uvedit_smart_stitch.c.
#define STITCH_NO_PREVIEW -1 |
Definition at line 209 of file uvedit_smart_stitch.c.
#define STITCH_PROCESSED 4 |
Definition at line 205 of file uvedit_smart_stitch.c.
#define STITCH_SELECTED 1 |
Definition at line 203 of file uvedit_smart_stitch.c.
#define STITCH_STITCHABLE 2 |
Definition at line 204 of file uvedit_smart_stitch.c.
#define STITCH_STITCHABLE_CANDIDATE 16 |
Definition at line 207 of file uvedit_smart_stitch.c.
typedef struct IslandStitchData IslandStitchData |
This is a straightforward implementation, count the UVs in the island that will move and take the mean displacement/rotation and apply it to all elements of the island except from the stitchable.
typedef struct PreviewPosition PreviewPosition |
typedef struct StitchPreviewer StitchPreviewer |
typedef struct StitchState StitchState |
typedef struct StitchStateContainer StitchStateContainer |
typedef struct StitchStateInit StitchStateInit |
StitchState initialization.
typedef struct UvElementID UvElementID |
UvElement identification.
typedef struct UVVertAverage UVVertAverage |
enum StitchModes |
Enumerator | |
---|---|
STITCH_VERT | |
STITCH_EDGE |
Definition at line 211 of file uvedit_smart_stitch.c.
|
static |
Definition at line 789 of file uvedit_smart_stitch.c.
References UvEdge::element, UvElement::island, UvEdge::next, state, stitch_check_edges_stitchable(), STITCH_STITCHABLE_CANDIDATE, and IslandStitchData::stitchableCandidate.
Referenced by stitch_process_data().
|
static |
Definition at line 764 of file uvedit_smart_stitch.c.
References BM_elem_index_get, element, UvElement::island, l, UvElement::next, UvElement::separate, state, stitch_check_uvs_stitchable(), STITCH_STITCHABLE_CANDIDATE, IslandStitchData::stitchableCandidate, and BMLoop::v.
Referenced by stitch_process_data().
|
static |
Definition at line 292 of file uvedit_smart_stitch.c.
References UvElementMap::islandIndices, UvElementMap::totalIslands, and UvElementMap::totalUVs.
Referenced by stitch_calculate_island_snapping(), and stitch_process_data().
|
static |
Definition at line 2198 of file uvedit_smart_stitch.c.
References StitchStateContainer::active_object_index, StitchState::element_map, StitchState::island_is_stitchable, StitchStateContainer::objects_len, StitchStateContainer::states, StitchStateContainer::static_island, and UvElementMap::totalIslands.
Referenced by stitch_init_all(), and stitch_modal().
|
static |
Definition at line 631 of file uvedit_smart_stitch.c.
References BLI_ghash_free(), BM_uv_element_map_free(), MEM_freeN, NULL, state, and stitch_preview_delete().
Referenced by state_delete_all(), and stitch_init().
|
static |
Definition at line 668 of file uvedit_smart_stitch.c.
References MEM_freeN, StitchStateContainer::objects, StitchStateContainer::objects_len, state_delete(), and StitchStateContainer::states.
Referenced by stitch_exit(), and stitch_init_all().
|
static |
Definition at line 1691 of file uvedit_smart_stitch.c.
References BMEditMesh::bm, CD_MLOOPUV, CustomData_bmesh_get(), BMHeader::data, BMLoop::head, BMesh::ldata, BMLoop::next, normal, normalize_v2(), sub_v2_v2v2(), and MLoopUV::uv.
Referenced by stitch_init().
|
static |
Definition at line 417 of file uvedit_smart_stitch.c.
References add_v2_v2(), angle_to_mat2(), bm, BM_elem_index_get, CD_MLOOPUV, CustomData_bmesh_get(), BMHeader::data, PreviewPosition::data_position, element, float(), getNumOfIslandUvs(), BMLoop::head, l, BMesh::ldata, M_PI, M_PI_2, IslandStitchData::medianPoint, IslandStitchData::num_rot_elements, IslandStitchData::num_rot_elements_neg, IslandStitchData::numOfElements, usdtokens::preview(), IslandStitchData::rotation, IslandStitchData::rotation_neg, state, STITCH_PROCESSED, STITCH_SELECTED, stitch_uv_rotate(), IslandStitchData::translation, and MLoopUV::uv.
Referenced by stitch_process_data().
|
static |
Definition at line 2500 of file uvedit_smart_stitch.c.
References C, and stitch_exit().
Referenced by stitch_exec(), stitch_modal(), and UV_OT_stitch().
|
static |
Definition at line 403 of file uvedit_smart_stitch.c.
References UvEdge::element, UvElement::island, StitchStateContainer::midpoints, StitchStateContainer::snap_islands, state, and stitch_check_edges_stitchable().
Referenced by stitch_process_data(), and stitch_validate_edge_stitchability().
|
static |
Definition at line 350 of file uvedit_smart_stitch.c.
References bm, CD_MLOOPUV, CustomData_bmesh_get(), BMHeader::data, fabsf, BMLoop::head, l, BMesh::ldata, StitchStateContainer::limit_dist, state, StitchStateContainer::use_limit, MLoopUV::uv, UvEdge::uv1, and UvEdge::uv2.
Referenced by determine_uv_edge_stitchability(), and stitch_check_edges_state_stitchable().
|
static |
Definition at line 390 of file uvedit_smart_stitch.c.
References element, UvElement::island, StitchStateContainer::midpoints, StitchStateContainer::snap_islands, state, and stitch_check_uvs_stitchable().
Referenced by stitch_island_calculate_vert_rotation(), stitch_process_data(), and stitch_validate_uv_stitchability().
|
static |
Definition at line 318 of file uvedit_smart_stitch.c.
References bm, CD_MLOOPUV, CustomData_bmesh_get(), BMHeader::data, element, fabsf, BMLoop::head, UvElement::l, l, BMesh::ldata, StitchStateContainer::limit_dist, state, StitchStateContainer::use_limit, and MLoopUV::uv.
Referenced by determine_uv_stitchability(), and stitch_check_uvs_state_stitchable().
Definition at line 1723 of file uvedit_smart_stitch.c.
References BLI_assert, col, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_point_size(), GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRIS, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), StitchStateContainer::mode, StitchPreviewer::num_polys, StitchPreviewer::num_static_tris, StitchPreviewer::num_stitchable, StitchPreviewer::num_unstitchable, StitchStateContainer::objects_len, StitchPreviewer::preview_polys, StitchPreviewer::preview_stitchable, StitchPreviewer::preview_unstitchable, state, StitchStateContainer::states, StitchPreviewer::static_tris, stitch_draw_vbo(), STITCH_VERT, TH_STITCH_PREVIEW_ACTIVE, TH_STITCH_PREVIEW_EDGE, TH_STITCH_PREVIEW_FACE, TH_STITCH_PREVIEW_STITCHABLE, TH_STITCH_PREVIEW_UNSTITCHABLE, TH_VERTEX_SIZE, UI_GetThemeColor4fv(), UI_GetThemeValuef(), and StitchPreviewer::uvs_per_polygon.
Referenced by stitch_init_all().
|
static |
Definition at line 1712 of file uvedit_smart_stitch.c.
References batch, col, GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv, GPU_SHADER_2D_UNIFORM_COLOR, GPUBatch, and NULL.
Referenced by stitch_draw().
|
static |
Definition at line 2505 of file uvedit_smart_stitch.c.
References C, CTX_data_scene(), wmOperator::customdata, OPERATOR_CANCELLED, OPERATOR_FINISHED, scene, stitch_cancel(), stitch_exit(), stitch_init_all(), and stitch_process_data_all().
Referenced by UV_OT_stitch().
|
static |
Definition at line 2415 of file uvedit_smart_stitch.c.
References StitchStateContainer::active_object_index, blender::compositor::area(), BKE_editmesh_from_object(), BMEditMesh::bm, BM_elem_index_get, C, StitchStateContainer::clear_seams, CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), CTX_wm_space_image(), wmOperator::customdata, Object::data, DEG_id_tag_update(), StitchStateContainer::draw_handle, ED_region_draw_cb_exit(), ED_workspace_status_text(), element, if(), StitchStateContainer::limit_dist, MEM_freeN, MEM_mallocN, StitchStateContainer::midpoints, StitchStateContainer::mode, NC_GEOM, ND_DATA, NULL, StitchStateContainer::objects_len, wmOperator::ptr, RNA_boolean_set(), RNA_collection_add(), RNA_collection_clear(), RNA_def_property_array(), RNA_enum_set(), RNA_float_set(), RNA_int_set(), RNA_int_set_array(), RNA_struct_find_property(), scene, StitchStateContainer::snap_islands, state, state_delete_all(), StitchStateContainer::states, StitchStateContainer::static_island, STITCH_VERT, Scene::toolsettings, BMesh::totvertsel, type, StitchStateContainer::use_limit, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by stitch_cancel(), stitch_exec(), and stitch_modal().
|
static |
Definition at line 1870 of file uvedit_smart_stitch.c.
References add_v2_v2(), BKE_editmesh_from_object(), BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashIterator_getKey(), BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_FACE, BM_face_at_index(), BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_iter_at_index(), BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_elem_table_ensure(), BM_uv_element_get(), BM_uv_element_map_create(), C, CD_MLOOPUV, counter, CTX_data_scene(), CustomData_get_offset(), ED_uvedit_get_aspect(), element, UvEdge::element, UvElementID::elementIndex, UvElementID::faceIndex, UvEdge::first, UvEdge::flag, GHASH_ITER, l, BMesh::ldata, BMFace::len, map, MEM_callocN, MEM_freeN, MEM_mallocN, StitchStateContainer::mode, BMLoop::next, UvEdge::next, normal, normalize_v2(), NULL, wmOperator::ptr, RNA_enum_get(), SCE_SELECT_VERTEX, scene, ToolSettings::selectmode, state, state_delete(), STITCH_BOUNDARY, stitch_calculate_edge_normal(), stitch_process_data(), stitch_select_edge(), stitch_select_uv(), stitch_set_selection_mode(), stitch_uv_edge_generate_linked_edges(), STITCH_VERT, StitchStateInit::to_select, Scene::toolsettings, BMesh::totvert, UvEdge::uv1, UvEdge::uv2, uv_edge_compare(), uv_edge_get(), uv_edge_hash(), ToolSettings::uv_flag, StitchStateInit::uv_selected_count, UV_SYNC_SELECTION, uvedit_edge_select_test(), and uvedit_uv_select_test().
Referenced by stitch_init_all().
|
static |
Definition at line 2225 of file uvedit_smart_stitch.c.
References StitchStateContainer::active_object_index, BKE_report(), BKE_reportf(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs, BLI_assert, C, StitchStateContainer::clear_seams, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), CTX_wm_view3d(), wmOperator::customdata, StitchStateContainer::draw_handle, ED_region_draw_cb_activate(), UvElementID::elementIndex, UvElementID::faceIndex, goto_next_island(), StitchStateContainer::limit_dist, MEM_callocN, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, StitchStateContainer::midpoints, StitchStateContainer::mode, NULL, StitchStateContainer::objects, StitchStateContainer::objects_len, wmOperator::ptr, REGION_DRAW_POST_VIEW, wmOperator::reports, RNA_BEGIN, RNA_boolean_get(), RNA_collection_clear(), RNA_END, RNA_enum_get(), RNA_float_get(), RNA_int_get(), RNA_int_get_array(), RNA_MAX_ARRAY_LENGTH, RNA_struct_property_is_set(), RPT_ERROR, SCE_SELECT_VERTEX, scene, ToolSettings::selectmode, StitchStateContainer::snap_islands, state, state_delete_all(), StitchStateContainer::states, StitchStateContainer::static_island, stitch_draw(), STITCH_EDGE, stitch_init(), stitch_process_data(), stitch_update_header(), STITCH_VERT, StitchStateInit::to_select, Scene::toolsettings, ARegion::type, StitchStateContainer::use_limit, ToolSettings::uv_flag, UV_SELECT_VERTEX, StitchStateInit::uv_selected_count, ToolSettings::uv_selectmode, and UV_SYNC_SELECTION.
Referenced by stitch_exec(), and stitch_invoke().
|
static |
Definition at line 2386 of file uvedit_smart_stitch.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, C, CTX_data_scene(), wmOperator::customdata, Object::data, NC_GEOM, ND_DATA, StitchStateContainer::objects_len, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, scene, state, StitchStateContainer::states, stitch_init_all(), Scene::toolsettings, BMesh::totvertsel, ToolSettings::uv_flag, UV_SYNC_SELECTION, WM_event_add_modal_handler(), and WM_event_add_notifier().
Referenced by UV_OT_stitch().
|
static |
Definition at line 510 of file uvedit_smart_stitch.c.
References acosf, bm, CD_MLOOPUV, cross_v2v2(), CustomData_bmesh_get(), BMHeader::data, dot_v2v2(), BMLoop::head, UvElement::island, UvElement::l, BMesh::ldata, max_ff(), min_ff(), StitchStateContainer::mode, normalize_v2(), IslandStitchData::num_rot_elements, IslandStitchData::num_rot_elements_neg, IslandStitchData::rotation, IslandStitchData::rotation_neg, state, STITCH_VERT, UVVertAverage::uv, and MLoopUV::uv.
Referenced by stitch_process_data().
|
static |
Definition at line 569 of file uvedit_smart_stitch.c.
References acosf, BM_elem_index_get, cross_v2v2(), dot_v2v2(), element, UvElement::island, l, max_ff(), StitchStateContainer::midpoints, min_ff(), negate_v2_v2(), UvElement::next, normal, IslandStitchData::num_rot_elements, IslandStitchData::num_rot_elements_neg, IslandStitchData::rotation, IslandStitchData::rotation_neg, UvElement::separate, state, StitchStateContainer::static_island, stitch_check_uvs_state_stitchable(), and BMLoop::v.
Referenced by stitch_process_data().
|
static |
Definition at line 2573 of file uvedit_smart_stitch.c.
References StitchStateContainer::active_object_index, C, CTX_data_scene(), CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), EVT_ESCKEY, EVT_IKEY, EVT_LKEY, EVT_MKEY, EVT_PADENTER, EVT_PADMINUS, EVT_PADPLUSKEY, EVT_RETKEY, EVT_SKEY, EVT_TABKEY, goto_next_island(), KM_ALT, KM_PRESS, KM_SHIFT, LEFTMOUSE, StitchStateContainer::limit_dist, MAX2, MIDDLEMOUSE, StitchStateContainer::midpoints, wmEvent::modifier, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, scene, StitchStateContainer::snap_islands, StitchStateContainer::states, stitch_cancel(), stitch_exit(), stitch_process_data(), stitch_process_data_all(), stitch_select(), stitch_switch_selection_mode_all(), stitch_update_header(), wmEvent::type, StitchStateContainer::use_limit, wmEvent::val, WHEELDOWNMOUSE, and WHEELUPMOUSE.
Referenced by UV_OT_stitch().
|
static |
Definition at line 252 of file uvedit_smart_stitch.c.
References MEM_freeN, MEM_SAFE_FREE, StitchPreviewer::preview_polys, StitchPreviewer::preview_stitchable, StitchPreviewer::preview_unstitchable, StitchPreviewer::static_tris, and StitchPreviewer::uvs_per_polygon.
Referenced by state_delete(), and stitch_process_data().
|
static |
Definition at line 229 of file uvedit_smart_stitch.c.
References MEM_mallocN, NULL, StitchPreviewer::num_polys, StitchPreviewer::num_static_tris, StitchPreviewer::num_stitchable, StitchPreviewer::num_unstitchable, StitchPreviewer::preview_polys, StitchPreviewer::preview_stitchable, StitchPreviewer::preview_unstitchable, StitchPreviewer::preview_uvs, StitchPreviewer::static_tris, and StitchPreviewer::uvs_per_polygon.
Referenced by stitch_process_data().
|
static |
Definition at line 985 of file uvedit_smart_stitch.c.
References StitchStateContainer::active_object_index, add_v2_v2(), BLI_assert, bm, BM_elem_flag_disable, BM_elem_index_get, BM_ELEM_SEAM, BM_FACE, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_ELEM_INDEX, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_elem_index_ensure(), BM_uv_element_get(), BM_VERT, CD_MLOOPUV, StitchStateContainer::clear_seams, copy_v2_v2(), UVVertAverage::count, CustomData_bmesh_get(), BMHeader::data, PreviewPosition::data_position, determine_uv_edge_stitchability(), determine_uv_stitchability(), element, UvEdge::element, getNumOfIslandUvs(), BMLoop::head, if(), UvElement::island, UvElement::l, l, BMesh::ldata, BMFace::len, IslandStitchData::medianPoint, MEM_callocN, MEM_freeN, MEM_mallocN, StitchStateContainer::midpoints, StitchStateContainer::mode, UvElement::next, BMLoop::next, UvEdge::next, NULL, IslandStitchData::numOfElements, PreviewPosition::polycount_position, usdtokens::preview(), scene, UvElement::separate, StitchStateContainer::snap_islands, state, StitchStateContainer::states, StitchStateContainer::static_island, STITCH_BOUNDARY, stitch_calculate_island_snapping(), stitch_check_edges_state_stitchable(), stitch_check_uvs_state_stitchable(), STITCH_EDGE, stitch_island_calculate_edge_rotation(), stitch_island_calculate_vert_rotation(), STITCH_NO_PREVIEW, stitch_preview_delete(), stitch_preview_init(), stitch_propagate_uv_final_position(), STITCH_SELECTED, stitch_set_face_preview_buffer_position(), STITCH_STITCHABLE, STITCH_STITCHABLE_CANDIDATE, stitch_validate_edge_stitchability(), stitch_validate_uv_stitchability(), STITCH_VERT, IslandStitchData::stitchableCandidate, BMesh::totface, IslandStitchData::translation, IslandStitchData::use_edge_rotation, UVVertAverage::uv, MLoopUV::uv, UvEdge::uv1, UvEdge::uv2, and BMLoop::v.
Referenced by stitch_init(), stitch_init_all(), stitch_modal(), and stitch_process_data_all().
|
static |
Definition at line 1532 of file uvedit_smart_stitch.c.
References StitchStateContainer::objects_len, scene, StitchStateContainer::states, and stitch_process_data().
Referenced by stitch_exec(), and stitch_modal().
|
static |
Definition at line 932 of file uvedit_smart_stitch.c.
References bm, BM_elem_index_get, CD_MLOOPUV, copy_v2_v2(), CustomData_bmesh_get(), CustomData_get_offset(), BMHeader::data, PreviewPosition::data_position, element, BMLoop::f, UvElement::flag, BMLoop::head, UvElement::island, UvElement::l, l, BMesh::ldata, UvElement::loop_of_poly_index, StitchStateContainer::midpoints, UvElement::next, usdtokens::preview(), scene, UvElement::separate, StitchStateContainer::snap_islands, state, StitchStateContainer::static_island, STITCH_NO_PREVIEW, STITCH_PROCESSED, STITCH_SELECTED, STITCH_STITCHABLE, UVVertAverage::uv, MLoopUV::uv, and uvedit_uv_select_enable().
Referenced by stitch_process_data().
|
static |
Definition at line 2520 of file uvedit_smart_stitch.c.
References BM_uv_element_get(), C, CTX_wm_region(), UvNearestHit::efa, element, UvNearestHit::l, StitchStateContainer::mode, wmEvent::mval, NULL, UvNearestHit::ob, StitchStateContainer::objects, StitchStateContainer::objects_len, scene, state, StitchStateContainer::states, stitch_select_edge(), stitch_select_uv(), STITCH_VERT, UI_view2d_region_to_view(), uv_edge_get(), uv_find_nearest_edge_multi(), uv_find_nearest_vert_multi(), UV_NEAREST_HIT_INIT_MAX, and ARegion::v2d.
Referenced by stitch_modal().
|
static |
Definition at line 1562 of file uvedit_smart_stitch.c.
References UvEdge::flag, UvEdge::next, state, and STITCH_SELECTED.
Referenced by stitch_init(), stitch_select(), and stitch_set_selection_mode().
|
static |
Definition at line 1591 of file uvedit_smart_stitch.c.
References BM_elem_index_get, element, UvElement::flag, l, UvElement::next, UvElement::separate, state, STITCH_SELECTED, and BMLoop::v.
Referenced by stitch_init(), stitch_select(), and stitch_set_selection_mode().
|
static |
Definition at line 806 of file uvedit_smart_stitch.c.
References BM_elem_index_get, PreviewPosition::data_position, BMFace::len, PreviewPosition::polycount_position, usdtokens::preview(), and STITCH_NO_PREVIEW.
Referenced by stitch_process_data(), and stitch_setup_face_preview_for_uv_group().
|
static |
Definition at line 1627 of file uvedit_smart_stitch.c.
References element, UvElement::flag, MEM_freeN, MEM_mallocN, state, stitch_select_edge(), stitch_select_uv(), STITCH_SELECTED, and STITCH_VERT.
Referenced by stitch_init(), and stitch_switch_selection_mode_all().
|
static |
Definition at line 820 of file uvedit_smart_stitch.c.
References IslandStitchData::addedForPreview, element, StitchStateContainer::midpoints, usdtokens::preview(), StitchStateContainer::snap_islands, state, StitchStateContainer::static_island, and stitch_set_face_preview_buffer_position().
Referenced by stitch_validate_edge_stitchability(), and stitch_validate_uv_stitchability().
|
static |
Definition at line 1677 of file uvedit_smart_stitch.c.
References StitchStateContainer::mode, StitchStateContainer::objects_len, StitchStateContainer::states, STITCH_EDGE, stitch_set_selection_mode(), and STITCH_VERT.
Referenced by stitch_modal().
|
static |
Definition at line 265 of file uvedit_smart_stitch.c.
References blender::compositor::area(), BLI_snprintf(), C, CTX_wm_area(), ED_workspace_status_text(), StitchStateContainer::limit_dist, StitchStateContainer::midpoints, StitchStateContainer::mode, StitchStateContainer::snap_islands, STITCH_VERT, str, TIP_, UI_MAX_DRAW_STR, StitchStateContainer::use_limit, and WM_bool_as_string().
Referenced by stitch_init_all(), and stitch_modal().
|
static |
Definition at line 680 of file uvedit_smart_stitch.c.
References BLI_ghash_lookup(), BM_elem_index_get, BM_uv_element_get(), UvElementMap::buf, BMLoop::f, UvEdge::first, UvElement::l, map, UvElement::next, BMLoop::next, UvEdge::next, NULL, BMLoop::prev, state, STITCH_BOUNDARY, SWAP, UvEdge::uv1, UvEdge::uv2, BMLoop::v, and UvElementMap::vert.
Referenced by stitch_init().
|
static |
Definition at line 300 of file uvedit_smart_stitch.c.
References add_v2_v2v2(), mul_v2_m2v2(), and sub_v2_v2().
Referenced by stitch_calculate_island_snapping().
|
static |
Definition at line 892 of file uvedit_smart_stitch.c.
References StitchStateContainer::active_object_index, UvEdge::element, UvElement::island, UvEdge::next, usdtokens::preview(), state, StitchStateContainer::states, StitchStateContainer::static_island, stitch_check_edges_state_stitchable(), stitch_setup_face_preview_for_uv_group(), and STITCH_STITCHABLE.
Referenced by stitch_process_data().
|
static |
Definition at line 844 of file uvedit_smart_stitch.c.
References StitchStateContainer::active_object_index, BM_elem_index_get, element, UvElement::island, l, UvElement::next, usdtokens::preview(), UvElement::separate, state, StitchStateContainer::states, StitchStateContainer::static_island, stitch_check_uvs_state_stitchable(), stitch_setup_face_preview_for_uv_group(), STITCH_STITCHABLE, and BMLoop::v.
Referenced by stitch_process_data().
Definition at line 1550 of file uvedit_smart_stitch.c.
References Freestyle::a, usdtokens::b(), UvEdge::uv1, and UvEdge::uv2.
Referenced by stitch_init().
|
static |
Definition at line 1848 of file uvedit_smart_stitch.c.
References BLI_ghash_lookup(), BM_uv_element_get(), BMLoop::f, l, BMLoop::next, state, UvEdge::uv1, and UvEdge::uv2.
Referenced by stitch_init(), and stitch_select().
Definition at line 1544 of file uvedit_smart_stitch.c.
References BLI_ghashutil_uinthash().
Referenced by stitch_init().
void UV_OT_stitch | ( | wmOperatorType * | ot | ) |
Definition at line 2734 of file uvedit_smart_stitch.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, RNA_def_boolean(), RNA_def_collection_runtime(), RNA_def_enum(), RNA_def_float(), RNA_def_int(), RNA_def_int_array(), RNA_def_property_array(), RNA_def_property_flag(), wmOperatorType::srna, stitch_cancel(), STITCH_EDGE, stitch_exec(), stitch_invoke(), stitch_modal(), and STITCH_VERT.
Referenced by ED_operatortypes_uvedit().