|
Blender V4.5
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_defaults.h"#include "DNA_meshdata_types.h"#include "DNA_modifier_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_global.hh"#include "BLI_array.hh"#include "BLI_linklist.h"#include "BLI_listbase.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_memarena.h"#include "BLI_string.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BLI_vector.hh"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_editmesh.hh"#include "BKE_image.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_mesh.hh"#include "BKE_object_types.hh"#include "BKE_report.hh"#include "BKE_screen.hh"#include "BKE_subdiv.hh"#include "BKE_subdiv_mesh.hh"#include "BKE_subdiv_modifier.hh"#include "BKE_uvproject.h"#include "DEG_depsgraph.hh"#include "GEO_uv_pack.hh"#include "GEO_uv_parametrizer.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "ED_image.hh"#include "ED_mesh.hh"#include "ED_screen.hh"#include "ED_undo.hh"#include "ED_uvedit.hh"#include "ED_view3d.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "uvedit_intern.hh"Go to the source code of this file.
Classes | |
| struct | UnwrapOptions |
| struct | MinStretch |
| struct | UVPackIslandsData |
| struct | ThickFace |
| struct | UV_FaceBranch |
| class | ParamHandle |
| struct | ParamSlimOptions |
| struct | [struct].g_live_unwrap |
Macros | |
| #define | PACK_ROTATE_METHOD_AXIS_ALIGNED_OFFSET 3 |
Typedefs | |
| using | ParamKey |
Functions | |
| static void | island_uv_transform (FaceIsland *island, const float matrix[2][2], const float pre_translate[2]) |
| static float | uv_nearest_image_tile_distance (const Image *image, const float coords[2], float nearest_tile_co[2]) |
| static float | uv_nearest_grid_tile_distance (const int udim_grid[2], const float coords[2], float nearest_tile_co[2]) |
| static bool | island_has_pins (const Scene *scene, FaceIsland *island, const blender::geometry::UVPackIsland_Params *params) |
| static void | uvedit_pack_islands_multi (const Scene *scene, const Span< Object * > objects, BMesh **bmesh_override, const SpaceImage *udim_source_closest, const bool original_selection, const bool notify_wm, blender::geometry::UVPackIsland_Params *params) |
Utility Functions | |
| static bool | uvedit_ensure_uvs (Object *obedit) |
Shared Properties | |
| static void | uv_map_operator_property_correct_aspect (wmOperatorType *ot) |
Parametrizer Conversion | |
| static void | modifier_unwrap_state (Object *obedit, const UnwrapOptions *options, bool *r_use_subsurf) |
| static UnwrapOptions | unwrap_options_get (wmOperator *op, Object *ob, const ToolSettings *ts) |
| static bool | rna_property_sync_flag (PointerRNA *ptr, const char *prop_name, char flag, bool flipped, char *value_p) |
| static bool | rna_property_sync_enum (PointerRNA *ptr, const char *prop_name, int *value_p) |
| static bool | rna_property_sync_enum_char (PointerRNA *ptr, const char *prop_name, char *value_p) |
| static bool | rna_property_sync_int (PointerRNA *ptr, const char *prop_name, int *value_p) |
| static bool | rna_property_sync_float (PointerRNA *ptr, const char *prop_name, float *value_p) |
| static bool | rna_property_sync_string (PointerRNA *ptr, const char *prop_name, char value_p[]) |
| static void | unwrap_options_sync_toolsettings (wmOperator *op, ToolSettings *ts) |
| static bool | uvedit_have_selection (const Scene *scene, BMEditMesh *em, const UnwrapOptions *options) |
| static bool | uvedit_have_selection_multi (const Scene *scene, const Span< Object * > objects, const UnwrapOptions *options) |
| void | ED_uvedit_get_aspect_from_material (Object *ob, const int material_index, float *r_aspx, float *r_aspy) |
| void | ED_uvedit_get_aspect (Object *ob, float *r_aspx, float *r_aspy) |
| float | ED_uvedit_get_aspect_y (Object *ob) |
| static bool | uvedit_is_face_affected (const Scene *scene, BMFace *efa, const UnwrapOptions *options, const BMUVOffsets &offsets) |
| static void | uvedit_prepare_pinned_indices (ParamHandle *handle, const Scene *scene, BMFace *efa, const UnwrapOptions *options, const BMUVOffsets &offsets) |
| static void | construct_param_handle_face_add (ParamHandle *handle, const Scene *scene, BMFace *efa, blender::geometry::ParamKey face_index, const UnwrapOptions *options, const BMUVOffsets &offsets, const int cd_weight_offset, const int cd_weight_index) |
| static void | construct_param_edge_set_seams (ParamHandle *handle, BMesh *bm, const UnwrapOptions *options) |
| static ParamHandle * | construct_param_handle (const Scene *scene, Object *ob, BMesh *bm, const UnwrapOptions *options, int *r_count_failed=nullptr) |
| static ParamHandle * | construct_param_handle_multi (const Scene *scene, const Span< Object * > objects, const UnwrapOptions *options) |
| static void | texface_from_original_index (const Scene *scene, const BMUVOffsets &offsets, BMFace *efa, int index, float **r_uv, bool *r_pin, bool *r_select) |
| static Mesh * | subdivide_edit_mesh (const Object *object, const BMEditMesh *em, const SubsurfModifierData *smd) |
| static ParamHandle * | construct_param_handle_subsurfed (const Scene *scene, Object *ob, BMEditMesh *em, const UnwrapOptions *options, int *r_count_failed=nullptr) |
Minimize Stretch Operator | |
| static bool | minimize_stretch_init (bContext *C, wmOperator *op) |
| static void | minimize_stretch_iteration (bContext *C, wmOperator *op, bool interactive) |
| static void | minimize_stretch_exit (bContext *C, wmOperator *op, bool cancel) |
| static wmOperatorStatus | minimize_stretch_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | minimize_stretch_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static wmOperatorStatus | minimize_stretch_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | minimize_stretch_cancel (bContext *C, wmOperator *op) |
| void | UV_OT_minimize_stretch (wmOperatorType *ot) |
Average UV Islands Scale Operator | |
| static wmOperatorStatus | average_islands_scale_exec (bContext *C, wmOperator *op) |
| void | UV_OT_average_islands_scale (wmOperatorType *ot) |
UV Map Clip & Correct | |
| static void | uv_map_clip_correct_properties_ex (wmOperatorType *ot, bool clip_to_bounds) |
| static void | uv_map_clip_correct_properties (wmOperatorType *ot) |
| static void | uv_map_clip_correct (const Scene *scene, const Span< Object * > objects, wmOperator *op, bool per_face_aspect, bool only_selected_uvs) |
Project UV From View Operator | |
| static wmOperatorStatus | uv_from_view_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | uv_from_view_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static bool | uv_from_view_poll (bContext *C) |
| void | UV_OT_project_from_view (wmOperatorType *ot) |
Reset UV Operator | |
| static wmOperatorStatus | reset_exec (bContext *C, wmOperator *) |
| void | UV_OT_reset (wmOperatorType *ot) |
Sphere UV Project Operator | |
| static void | uv_map_mirror (BMFace *efa, const bool *regular, const bool fan, const int cd_loop_uv_offset) |
| static float | uv_sphere_project (const Scene *scene, BMesh *bm, BMFace *efa_init, const float center[3], const float rotmat[3][3], const bool fan, const BMUVOffsets &offsets, const bool only_selected_uvs, const bool use_seams, const float branch_init) |
| static wmOperatorStatus | sphere_project_exec (bContext *C, wmOperator *op) |
| void | UV_OT_sphere_project (wmOperatorType *ot) |
Cylinder UV Project Operator | |
| static float | uv_cylinder_project (const Scene *scene, BMesh *bm, BMFace *efa_init, const float center[3], const float rotmat[3][3], const bool fan, const BMUVOffsets &offsets, const bool only_selected_uvs, const bool use_seams, const float branch_init) |
| static wmOperatorStatus | cylinder_project_exec (bContext *C, wmOperator *op) |
| void | UV_OT_cylinder_project (wmOperatorType *ot) |
Cube UV Project Operator | |
| static void | uvedit_unwrap_cube_project (const Scene *scene, BMesh *bm, float cube_size, const bool use_select, const bool only_selected_uvs, const float center[3]) |
| static wmOperatorStatus | cube_project_exec (bContext *C, wmOperator *op) |
| void | UV_OT_cube_project (wmOperatorType *ot) |
Simple UVs for Texture Painting | |
| void | ED_uvedit_add_simple_uvs (Main *bmain, const Scene *scene, Object *ob) |
UV Map Common Transforms | |
| #define | VIEW_ON_EQUATOR 0 |
| #define | VIEW_ON_POLES 1 |
| #define | ALIGN_TO_OBJECT 2 |
| #define | POLAR_ZX 0 |
| #define | POLAR_ZY 1 |
| enum | { PINCH = 0 , FAN = 1 } |
| static void | uv_map_transform_calc_bounds (BMEditMesh *em, float r_min[3], float r_max[3]) |
| static void | uv_map_transform_calc_center_median (BMEditMesh *em, float r_center[3]) |
| static void | uv_map_transform_center (const Scene *scene, View3D *v3d, Object *ob, BMEditMesh *em, float r_center[3], float r_bounds[2][3]) |
| static void | uv_map_rotation_matrix_ex (float result[4][4], RegionView3D *rv3d, Object *ob, float upangledeg, float sideangledeg, float radius, const float offset[4]) |
| static void | uv_map_transform (bContext *C, wmOperator *op, float rotmat[3][3]) |
| static void | uv_transform_properties (wmOperatorType *ot, int radius) |
| static void | shrink_loop_uv_by_aspect_ratio (BMFace *efa, const int cd_loop_uv_offset, const float aspect_y) |
| static void | correct_uv_aspect (Object *ob, BMEditMesh *em) |
| static void | correct_uv_aspect_per_face (Object *ob, BMEditMesh *em) |
Pack UV Islands Operator | |
| enum | { PACK_UDIM_SRC_CLOSEST = 0 , PACK_UDIM_SRC_ACTIVE , PACK_ORIGINAL_AABB } |
| static const EnumPropertyItem | pack_margin_method_items [] |
| static const EnumPropertyItem | pack_rotate_method_items [] |
| static const EnumPropertyItem | pack_shape_method_items [] |
| static const EnumPropertyItem | pinned_islands_method_items [] |
| static void | pack_islands_startjob (void *pidv, wmJobWorkerStatus *worker_status) |
| static void | pack_islands_endjob (void *pidv) |
| static void | pack_islands_freejob (void *pidv) |
| static wmOperatorStatus | pack_islands_exec (bContext *C, wmOperator *op) |
| static void | uv_pack_islands_ui (bContext *, wmOperator *op) |
| static wmOperatorStatus | uv_pack_islands_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | UV_OT_pack_islands (wmOperatorType *ot) |
UV Unwrap Operator | |
| enum | { UNWRAP_ERROR_NONUNIFORM = (1 << 0) , UNWRAP_ERROR_NEGATIVE = (1 << 1) } |
| static void | uvedit_unwrap (const Scene *scene, Object *obedit, const UnwrapOptions *options, int *r_count_changed, int *r_count_failed) |
| static void | uvedit_unwrap_multi (const Scene *scene, const Span< Object * > objects, const UnwrapOptions *options, int *r_count_changed=nullptr, int *r_count_failed=nullptr) |
| void | ED_uvedit_live_unwrap (const Scene *scene, const Span< Object * > objects) |
| static wmOperatorStatus | unwrap_exec (bContext *C, wmOperator *op) |
| static void | unwrap_draw (bContext *, wmOperator *op) |
| void | UV_OT_unwrap (wmOperatorType *ot) |
Live UV Unwrap | |
| static struct | g_live_unwrap = {nullptr} |
| bool | ED_uvedit_live_unwrap_timer_check (const wmTimer *timer) |
| static bool | uvedit_live_unwrap_timer_validate (const wmWindowManager *wm) |
| void | ED_uvedit_live_unwrap_begin (Scene *scene, Object *obedit, wmWindow *win_modal) |
| void | ED_uvedit_live_unwrap_re_solve () |
| void | ED_uvedit_live_unwrap_end (const bool cancel) |
Smart UV Project Operator | |
| static const float | smart_uv_project_area_ignore = 1e-12f |
| static int | smart_uv_project_thickface_area_cmp_fn (const void *tf_a_p, const void *tf_b_p) |
| static blender::Vector< blender::float3 > | smart_uv_project_calculate_project_normals (const ThickFace *thick_faces, const uint thick_faces_len, BMesh *bm, const float project_angle_limit_half_cos, const float project_angle_limit_cos, const float area_weight) |
| static wmOperatorStatus | smart_project_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | smart_project_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | UV_OT_smart_project (wmOperatorType *ot) |
| #define ALIGN_TO_OBJECT 2 |
Definition at line 2219 of file uvedit_unwrap_ops.cc.
Referenced by uv_map_transform(), and uv_transform_properties().
| #define PACK_ROTATE_METHOD_AXIS_ALIGNED_OFFSET 3 |
Referenced by UV_OT_smart_project().
| #define POLAR_ZX 0 |
Definition at line 2221 of file uvedit_unwrap_ops.cc.
Referenced by uv_transform_properties().
| #define POLAR_ZY 1 |
Definition at line 2222 of file uvedit_unwrap_ops.cc.
Referenced by uv_map_transform(), and uv_transform_properties().
| #define VIEW_ON_EQUATOR 0 |
Definition at line 2217 of file uvedit_unwrap_ops.cc.
Referenced by uv_map_transform(), and uv_transform_properties().
| #define VIEW_ON_POLES 1 |
Definition at line 2218 of file uvedit_unwrap_ops.cc.
Referenced by uv_transform_properties().
Definition at line 27 of file GEO_uv_parametrizer.hh.
| anonymous enum |
| Enumerator | |
|---|---|
| PACK_UDIM_SRC_CLOSEST | |
| PACK_UDIM_SRC_ACTIVE | |
| PACK_ORIGINAL_AABB | |
Definition at line 1655 of file uvedit_unwrap_ops.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| UNWRAP_ERROR_NONUNIFORM | |
| UNWRAP_ERROR_NEGATIVE | |
Definition at line 2770 of file uvedit_unwrap_ops.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| PINCH | |
| FAN | |
Definition at line 2224 of file uvedit_unwrap_ops.cc.
|
static |
Definition at line 2011 of file uvedit_unwrap_ops.cc.
References average_islands_scale_exec(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, C, construct_param_handle_multi(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), ID_RECALC_GEOMETRY, NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, options, wmOperator::ptr, RNA_boolean_get(), Scene::toolsettings, BMesh::totvertsel, unwrap_options_get(), ToolSettings::uv_flag, blender::geometry::uv_parametrizer_average(), blender::geometry::uv_parametrizer_flush(), UV_SYNC_SELECTION, uvedit_have_selection_multi(), and WM_event_add_notifier().
Referenced by average_islands_scale_exec(), and UV_OT_average_islands_scale().
|
static |
Definition at line 642 of file uvedit_unwrap_ops.cc.
References bm, BM_EDGES_OF_MESH, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_test, BM_elem_index_get, BM_ELEM_SEAM, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_EDGE, BM_uv_map_offsets_get(), construct_param_edge_set_seams(), l, BMLoop::next, options, BMUVOffsets::uv, blender::geometry::uv_find_pin_index(), blender::geometry::uv_parametrizer_edge_set_seam(), and BMLoop::v.
Referenced by construct_param_edge_set_seams(), construct_param_handle(), and construct_param_handle_multi().
|
static |
Definition at line 684 of file uvedit_unwrap_ops.cc.
References BKE_object_defgroup_name_index(), bm, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_mesh_elem_index_ensure(), BM_uv_map_offsets_get(), BM_VERT, CD_MDEFORMVERT, construct_param_edge_set_seams(), construct_param_handle(), construct_param_handle_face_add(), CustomData_get_offset(), ED_uvedit_get_aspect_y(), i, options, blender::geometry::uv_parametrizer_aspect_ratio(), blender::geometry::uv_parametrizer_construct_end(), uvedit_is_face_affected(), uvedit_prepare_pinned_indices(), and BMesh::vdata.
Referenced by construct_param_handle(), ED_uvedit_live_unwrap_begin(), and uvedit_unwrap().
|
static |
Definition at line 585 of file uvedit_unwrap_ops.cc.
References BKE_defvert_find_weight(), BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_GET_FLOAT_P, BM_ELEM_CD_GET_VOID_P, BM_elem_index_get, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, BMVert::co, construct_param_handle_face_add(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), i, l, BMFace::len, options, BMUVOffsets::pin, select, BMUVOffsets::uv, blender::geometry::uv_find_pin_index(), blender::geometry::uv_parametrizer_face_add(), uvedit_uv_select_test(), and BMLoop::v.
Referenced by construct_param_handle(), construct_param_handle_face_add(), and construct_param_handle_multi().
|
static |
Version of construct_param_handle that handles multiple objects.
Definition at line 731 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BKE_object_defgroup_name_index(), bm, BMEditMesh::bm, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_uv_map_offsets_get(), BM_VERT, CD_MDEFORMVERT, construct_param_edge_set_seams(), construct_param_handle_face_add(), construct_param_handle_multi(), CustomData_get_offset(), ED_uvedit_get_aspect_y(), EDBM_mesh_elem_index_ensure_multi(), i, options, BMesh::totface, BMUVOffsets::uv, blender::geometry::uv_parametrizer_aspect_ratio(), blender::geometry::uv_parametrizer_construct_end(), uvedit_is_face_affected(), uvedit_prepare_pinned_indices(), and BMesh::vdata.
Referenced by average_islands_scale_exec(), construct_param_handle_multi(), and minimize_stretch_init().
|
static |
Unwrap handle initialization for subsurf aware-unwrapper. The many modifications required to make the original function(see above) work justified the existence of a new function.
Definition at line 856 of file uvedit_unwrap_ops.cc.
References BKE_defvert_find_weight(), BKE_id_free(), BKE_object_defgroup_name_index(), BLI_assert, BMEditMesh::bm, BM_EDGE, BM_edge_at_index(), BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SEAM, BM_ELEM_SELECT, BM_FACE, BM_face_at_index(), BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_uv_map_offsets_get(), BM_VERT, CD_ORIGINDEX, construct_param_handle_subsurfed(), CustomData_get_layer(), ED_uvedit_get_aspect_y(), Mesh::edge_data, Mesh::edges_num, Mesh::face_data, faceMap, Mesh::faces_num, ListBase::first, SubsurfModifierData::flags, i, blender::offset_indices::OffsetIndices< T >::index_range(), blender::Span< T >::index_range(), SubsurfModifierData::levels, MEM_freeN(), MEM_malloc_arrayN(), Object::modifiers, options, ORIGINDEX_NONE, SubsurfModifierData::quality, select, blender::Span< T >::size(), blender::Span< T >::slice(), subdivide_edit_mesh(), SubsurfModifierData::subdivType, texface_from_original_index(), Scene::toolsettings, ToolSettings::uv_flag, blender::geometry::uv_parametrizer_aspect_ratio(), blender::geometry::uv_parametrizer_construct_end(), blender::geometry::uv_parametrizer_edge_set_seam(), blender::geometry::uv_parametrizer_face_add(), UV_SYNC_SELECTION, and Mesh::vert_data.
Referenced by construct_param_handle_subsurfed(), ED_uvedit_live_unwrap_begin(), and uvedit_unwrap().
|
static |
Definition at line 2480 of file uvedit_unwrap_ops.cc.
References BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, CD_PROP_FLOAT2, correct_uv_aspect(), CustomData_get_offset(), ED_uvedit_get_aspect_y(), BMesh::ldata, and shrink_loop_uv_by_aspect_ratio().
Referenced by correct_uv_aspect(), and uv_map_clip_correct().
|
static |
Definition at line 2497 of file uvedit_unwrap_ops.cc.
References BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, CD_PROP_FLOAT2, correct_uv_aspect_per_face(), CustomData_get_offset(), ED_uvedit_get_aspect_from_material(), BMesh::ldata, BMFace::mat_nr, shrink_loop_uv_by_aspect_ratio(), Object::totcol, and UNLIKELY.
Referenced by correct_uv_aspect_per_face(), and uv_map_clip_correct().
|
static |
Definition at line 4174 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CTX_wm_view3d(), cube_project_exec(), Object::data, DEG_id_tag_update(), ID_RECALC_GEOMETRY, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), max_fff(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_property_float_get(), RNA_property_float_set(), RNA_property_is_set(), RNA_struct_find_property(), sub_v3_v3v3(), BMesh::totfacesel, UNPACK3, uv_map_clip_correct(), uv_map_transform_center(), uvedit_ensure_uvs(), uvedit_unwrap_cube_project(), and WM_event_add_notifier().
Referenced by cube_project_exec(), and UV_OT_cube_project().
|
static |
Definition at line 4026 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_uv_map_offsets_get(), C, ceilf, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CTX_wm_view3d(), cylinder_project_exec(), DEG_id_tag_update(), ID_RECALC_GEOMETRY, max_ff(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), BMesh::totfacesel, uv_cylinder_project(), uv_map_clip_correct(), uv_map_transform(), uv_map_transform_center(), uvedit_ensure_uvs(), uvedit_face_select_disable(), uvedit_face_select_test(), and WM_event_add_notifier().
Referenced by cylinder_project_exec(), and UV_OT_cylinder_project().
Definition at line 4270 of file uvedit_unwrap_ops.cc.
References bm, bm_mesh_allocsize_default, BM_mesh_bm_from_me(), BM_mesh_bm_to_me(), BM_mesh_create(), BM_mesh_free(), BMeshFromMeshParams::calc_face_normal, BMeshFromMeshParams::calc_vert_normal, blender::geometry::UVPackIsland_Params::correct_aspect, Object::data, ED_mesh_uv_ensure(), ED_uvedit_add_simple_uvs(), ED_uvedit_select_all(), ED_UVPACK_MARGIN_SCALED, ED_UVPACK_ROTATION_ANY, blender::geometry::UVPackIsland_Params::margin, blender::geometry::UVPackIsland_Params::margin_method, blender::geometry::UVPackIsland_Params::only_selected_faces, blender::geometry::UVPackIsland_Params::only_selected_uvs, blender::geometry::UVPackIsland_Params::rotate_method, Scene::toolsettings, blender::geometry::UVPackIsland_Params::use_seams, BMeshCreateParams::use_toolflags, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_pack_islands_multi(), and uvedit_unwrap_cube_project().
Referenced by add_simple_uvs_exec(), ED_uvedit_add_simple_uvs(), and ED_uvedit_live_unwrap().
| void ED_uvedit_get_aspect | ( | Object * | ob, |
| float * | r_aspx, | ||
| float * | r_aspy ) |
Definition at line 512 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BLI_assert, BMEditMesh::bm, BM_mesh_active_face_get(), ED_uvedit_get_aspect(), ED_uvedit_get_aspect_from_material(), and BMFace::mat_nr.
Referenced by ED_uvedit_get_aspect(), ED_uvedit_get_aspect_y(), ED_uvedit_nearest_uv_multi(), and uv_rip_exec().
| void ED_uvedit_get_aspect_from_material | ( | Object * | ob, |
| const int | material_index, | ||
| float * | r_aspx, | ||
| float * | r_aspy ) |
Definition at line 497 of file uvedit_unwrap_ops.cc.
References ED_image_get_uv_aspect(), ED_object_get_active_image(), ED_uvedit_get_aspect_from_material(), Object::totcol, and UNLIKELY.
Referenced by correct_uv_aspect_per_face(), ED_uvedit_get_aspect(), ED_uvedit_get_aspect_from_material(), and ED_uvedit_nearest_uv_multi().
| float ED_uvedit_get_aspect_y | ( | Object * | obedit | ) |
Return the X / Y aspect (wider aspects are over 1, taller are below 1). Apply this aspect by multiplying with the Y axis (X aspect is always 1 & unchanged).
Definition at line 528 of file uvedit_unwrap_ops.cc.
References ED_uvedit_get_aspect(), and ED_uvedit_get_aspect_y().
Referenced by construct_param_handle(), construct_param_handle_multi(), construct_param_handle_subsurfed(), correct_uv_aspect(), ED_uvedit_get_aspect_y(), ED_uvedit_nearest_uv_multi(), stitch_init(), uv_shortest_path_pick_exec(), uv_shortest_path_pick_invoke(), uv_shortest_path_select_exec(), and uvedit_pack_islands_multi().
Definition at line 2749 of file uvedit_unwrap_ops.cc.
References ED_uvedit_live_unwrap(), ED_UVPACK_MARGIN_SCALED, ED_UVPACK_PIN_IGNORE, ED_UVPACK_ROTATION_ANY, ToolSettings::edge_mode_live_unwrap, blender::geometry::UVPackIsland_Params::margin, blender::geometry::UVPackIsland_Params::margin_method, options, blender::geometry::UVPackIsland_Params::pin_method, blender::geometry::UVPackIsland_Params::rotate_method, blender::geometry::UVPackIsland_Params::setFromUnwrapOptions(), Scene::toolsettings, unwrap_options_get(), ToolSettings::uvcalc_margin, uvedit_pack_islands_multi(), and uvedit_unwrap_multi().
| win_modal | Support interactive (modal) unwrapping that updates with a timer. |
Definition at line 2108 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BLI_assert, BMEditMesh::bm, construct_param_handle(), construct_param_handle_subsurfed(), ED_uvedit_live_unwrap_begin(), ED_uvedit_test(), g_live_unwrap, G_MAIN, MEM_malloc_arrayN(), MEM_reallocN, options, TIMER, Scene::toolsettings, unwrap_options_get(), blender::geometry::uv_parametrizer_lscm_begin(), blender::geometry::uv_parametrizer_slim_live_begin(), uvedit_live_unwrap_timer_validate(), and WM_event_timer_add().
Referenced by blender::ed::transform::createTransUVs(), ED_uvedit_live_unwrap_begin(), ED_uvedit_nearest_uv_multi(), uv_sculpt_stroke_init(), and uvedit_live_unwrap_update().
| void ED_uvedit_live_unwrap_end | ( | const bool | cancel | ) |
Definition at line 2178 of file uvedit_unwrap_ops.cc.
References ED_uvedit_live_unwrap_end(), g_live_unwrap, G_MAIN, i, MEM_freeN(), blender::geometry::uv_parametrizer_flush_restore(), blender::geometry::uv_parametrizer_is_slim(), blender::geometry::uv_parametrizer_lscm_end(), blender::geometry::uv_parametrizer_slim_live_end(), uvedit_live_unwrap_timer_validate(), and WM_event_timer_remove().
Referenced by ED_uvedit_live_unwrap_end(), ED_uvedit_nearest_uv_multi(), blender::ed::transform::postTrans(), uv_sculpt_stroke_exit(), and uvedit_live_unwrap_update().
| void ED_uvedit_live_unwrap_re_solve | ( | ) |
Definition at line 2162 of file uvedit_unwrap_ops.cc.
References ED_uvedit_live_unwrap_re_solve(), g_live_unwrap, i, blender::geometry::uv_parametrizer_flush(), blender::geometry::uv_parametrizer_is_slim(), blender::geometry::uv_parametrizer_lscm_solve(), and blender::geometry::uv_parametrizer_slim_live_solve_iteration().
Referenced by ED_uvedit_live_unwrap_re_solve(), ED_uvedit_nearest_uv_multi(), blender::ed::transform::recalcData_uv(), uv_sculpt_stroke_apply(), and uvedit_live_unwrap_update().
| bool ED_uvedit_live_unwrap_timer_check | ( | const wmTimer * | timer | ) |
Return true if the timer is managed by live-unwrap.
Definition at line 2084 of file uvedit_unwrap_ops.cc.
References ED_uvedit_live_unwrap_timer_check(), and g_live_unwrap.
Referenced by ED_uvedit_live_unwrap_timer_check(), ED_uvedit_nearest_uv_multi(), and blender::ed::transform::transformEvent().
|
static |
Definition at line 1395 of file uvedit_unwrap_ops.cc.
References BM_ELEM_CD_GET_BOOL, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_ELEM, BM_LOOPS_OF_FACE, FaceIsland::faces, FaceIsland::faces_len, i, island_has_pins(), l, FaceIsland::offsets, blender::geometry::UVPackIsland_Params::only_selected_faces, BMUVOffsets::pin, blender::geometry::UVPackIsland_Params::pin_unselected, and uvedit_uv_select_test().
Referenced by island_has_pins(), and uvedit_pack_islands_multi().
|
static |
Definition at line 1314 of file uvedit_unwrap_ops.cc.
References BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM, BM_LOOPS_OF_FACE, FaceIsland::faces, FaceIsland::faces_len, i, island_uv_transform(), l, blender::geometry::mul_v2_m2_add_v2v2(), FaceIsland::offsets, and BMUVOffsets::uv.
Referenced by island_uv_transform(), and uvedit_pack_islands_multi().
|
static |
Definition at line 1265 of file uvedit_unwrap_ops.cc.
References C, minimize_stretch_cancel(), and minimize_stretch_exit().
Referenced by minimize_stretch_cancel(), and UV_OT_minimize_stretch().
|
static |
Definition at line 1173 of file uvedit_unwrap_ops.cc.
References C, i, minimize_stretch_exec(), minimize_stretch_exit(), minimize_stretch_init(), minimize_stretch_iteration(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, and RNA_int_get().
Referenced by minimize_stretch_exec(), and UV_OT_minimize_stretch().
|
static |
Definition at line 1133 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, C, CTX_data_scene(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, Object::data, DEG_id_tag_update(), ED_area_status_text(), ED_workspace_status_text(), MinStretch::handle, ID_RECALC_GEOMETRY, minimize_stretch_exit(), NC_GEOM, ND_DATA, MinStretch::objects_edit, MinStretch::timer, Scene::toolsettings, BMesh::totfacesel, ToolSettings::uv_flag, blender::geometry::uv_parametrizer_flush(), blender::geometry::uv_parametrizer_flush_restore(), blender::geometry::uv_parametrizer_stretch_end(), UV_SYNC_SELECTION, WM_event_add_notifier(), and WM_event_timer_remove().
Referenced by minimize_stretch_cancel(), minimize_stretch_exec(), minimize_stretch_exit(), and minimize_stretch_modal().
|
static |
Definition at line 1055 of file uvedit_unwrap_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), MinStretch::blend, BLI_time_now_seconds(), C, construct_param_handle_multi(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), wmOperator::customdata, MinStretch::handle, MinStretch::i, MinStretch::iterations, MinStretch::lasttime, minimize_stretch_init(), MinStretch::objects_edit, options, wmOperator::ptr, RNA_boolean_get(), RNA_float_get(), RNA_int_get(), MinStretch::scene, blender::geometry::uv_parametrizer_stretch_begin(), blender::geometry::uv_parametrizer_stretch_blend(), and uvedit_have_selection_multi().
Referenced by minimize_stretch_exec(), minimize_stretch_init(), and minimize_stretch_invoke().
|
static |
Definition at line 1190 of file uvedit_unwrap_ops.cc.
References C, CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, minimize_stretch_init(), minimize_stretch_invoke(), minimize_stretch_iteration(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, TIMER, MinStretch::timer, WM_event_add_modal_handler(), and WM_event_timer_add().
Referenced by minimize_stretch_invoke(), and UV_OT_minimize_stretch().
|
static |
Definition at line 1093 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), MinStretch::blend, BLI_time_now_seconds(), BMEditMesh::bm, C, CTX_data_scene(), CTX_wm_area(), wmOperator::customdata, Object::data, DEG_id_tag_update(), ED_area_status_text(), ED_workspace_status_text(), MinStretch::handle, MinStretch::i, ID_RECALC_GEOMETRY, IFACE_, MinStretch::lasttime, minimize_stretch_iteration(), NC_GEOM, ND_DATA, MinStretch::objects_edit, wmOperator::ptr, RNA_int_set(), SNPRINTF, str, Scene::toolsettings, BMesh::totfacesel, UI_MAX_DRAW_STR, ToolSettings::uv_flag, blender::geometry::uv_parametrizer_flush(), blender::geometry::uv_parametrizer_stretch_blend(), blender::geometry::uv_parametrizer_stretch_iter(), UV_SYNC_SELECTION, and WM_event_add_notifier().
Referenced by minimize_stretch_exec(), minimize_stretch_invoke(), minimize_stretch_iteration(), and minimize_stretch_modal().
|
static |
Definition at line 1207 of file uvedit_unwrap_ops.cc.
References MinStretch::blend, BLI_time_now_seconds(), C, wmEvent::customdata, wmOperator::customdata, EVT_ESCKEY, EVT_PADENTER, EVT_PADMINUS, EVT_PADPLUSKEY, EVT_RETKEY, MinStretch::i, MinStretch::iterations, KM_PRESS, MinStretch::lasttime, LEFTMOUSE, minimize_stretch_exit(), minimize_stretch_iteration(), minimize_stretch_modal(), OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RIGHTMOUSE, RNA_float_set(), TIMER, MinStretch::timer, wmEvent::type, wmEvent::val, WHEELDOWNMOUSE, and WHEELUPMOUSE.
Referenced by minimize_stretch_modal(), and UV_OT_minimize_stretch().
|
static |
Definition at line 227 of file uvedit_unwrap_ops.cc.
References eModifierType_Subsurf, ListBase::first, SubsurfModifierData::levels, modifier_unwrap_state(), Object::modifiers, options, and ModifierData::type.
Referenced by modifier_unwrap_state(), unwrap_exec(), unwrap_options_get(), and uvedit_unwrap().
|
static |
Definition at line 1699 of file uvedit_unwrap_ops.cc.
References Object::data, DEG_id_tag_update(), ED_undo_push(), ID_RECALC_GEOMETRY, NC_GEOM, NC_SPACE, ND_DATA, ND_SPACE_IMAGE, UVPackIslandsData::objects, pack_islands_endjob(), UVPackIslandsData::undo_context, UVPackIslandsData::undo_str, and WM_main_add_notifier().
Referenced by pack_islands_endjob(), and pack_islands_exec().
|
static |
Definition at line 1721 of file uvedit_unwrap_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), CTX_wm_space_image(), CTX_wm_view3d(), CTX_wm_window(), ED_UVPACK_PIN_NONE, ED_UVPACK_ROTATION_NONE, wmOperator::flag, G, blender::geometry::UVPackIsland_Params::margin, blender::geometry::UVPackIsland_Params::margin_method, blender::geometry::UVPackIsland_Params::merge_overlap, wmOperatorType::name, UVPackIslandsData::objects, OP_IS_INVOKE, wmWindowManager::op_undo_depth, OPERATOR_CANCELLED, OPERATOR_FINISHED, options, UVPackIslandsData::pack_island_params, pack_islands_endjob(), pack_islands_exec(), pack_islands_freejob(), pack_islands_startjob(), PACK_UDIM_SRC_ACTIVE, blender::geometry::UVPackIsland_Params::pin_method, wmOperator::ptr, REGION_DRAW_LOCK_RENDER, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), RNA_float_set(), RNA_struct_property_is_set(), blender::geometry::UVPackIsland_Params::rotate_method, blender::geometry::UVPackIsland_Params::scale_to_fit, UVPackIslandsData::scene, blender::geometry::UVPackIsland_Params::setFromUnwrapOptions(), blender::geometry::UVPackIsland_Params::setUDIMOffsetFromSpaceImage(), blender::geometry::UVPackIsland_Params::shape_method, UVPackIslandsData::sima, Scene::toolsettings, wmOperator::type, UVPackIslandsData::udim_source, UVPackIslandsData::undo_context, UVPackIslandsData::undo_str, unwrap_options_get(), UVPackIslandsData::use_job, ToolSettings::uvcalc_margin, uvedit_have_selection_multi(), UVPackIslandsData::wm, WM_cursor_wait(), WM_JOB_PROGRESS, WM_JOB_TYPE_UV_PACK, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_start(), WM_jobs_timer(), and WM_set_locked_interface_with_flags().
Referenced by pack_islands_exec(), and UV_OT_pack_islands().
|
static |
Definition at line 1713 of file uvedit_unwrap_ops.cc.
References pack_islands_freejob(), UVPackIslandsData::wm, WM_cursor_wait(), and WM_set_locked_interface().
Referenced by pack_islands_exec(), and pack_islands_freejob().
|
static |
Definition at line 1677 of file uvedit_unwrap_ops.cc.
References blender::geometry::UVPackIsland_Params::do_update, UVPackIslandsData::objects, UVPackIslandsData::pack_island_params, pack_islands_startjob(), PACK_ORIGINAL_AABB, PACK_UDIM_SRC_CLOSEST, blender::geometry::UVPackIsland_Params::progress, UVPackIslandsData::scene, UVPackIslandsData::sima, blender::geometry::UVPackIsland_Params::stop, UVPackIslandsData::udim_source, UVPackIslandsData::use_job, and uvedit_pack_islands_multi().
Referenced by pack_islands_exec(), and pack_islands_startjob().
|
static |
Definition at line 3593 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), ED_mesh_uv_loop_reset(), ID_RECALC_GEOMETRY, NC_GEOM, ND_DATA, OPERATOR_FINISHED, reset_exec(), BMesh::totfacesel, uvedit_ensure_uvs(), and WM_event_add_notifier().
Referenced by reset_exec(), and UV_OT_reset().
|
static |
Definition at line 353 of file uvedit_unwrap_ops.cc.
References BLI_assert_unreachable, RNA_property_enum_get(), RNA_property_enum_set(), RNA_property_is_set(), rna_property_sync_enum(), and RNA_struct_find_property().
Referenced by rna_property_sync_enum(), and rna_property_sync_enum_char().
|
static |
Definition at line 367 of file uvedit_unwrap_ops.cc.
References rna_property_sync_enum(), and rna_property_sync_enum_char().
Referenced by rna_property_sync_enum_char(), and unwrap_options_sync_toolsettings().
|
static |
Definition at line 333 of file uvedit_unwrap_ops.cc.
References BLI_assert_unreachable, RNA_property_boolean_get(), RNA_property_boolean_set(), RNA_property_is_set(), rna_property_sync_flag(), and RNA_struct_find_property().
Referenced by rna_property_sync_flag(), and unwrap_options_sync_toolsettings().
|
static |
Definition at line 391 of file uvedit_unwrap_ops.cc.
References BLI_assert_unreachable, RNA_property_float_get(), RNA_property_float_set(), RNA_property_is_set(), rna_property_sync_float(), and RNA_struct_find_property().
Referenced by rna_property_sync_float(), and unwrap_options_sync_toolsettings().
|
static |
Definition at line 377 of file uvedit_unwrap_ops.cc.
References BLI_assert_unreachable, RNA_property_int_get(), RNA_property_int_set(), RNA_property_is_set(), rna_property_sync_int(), and RNA_struct_find_property().
Referenced by rna_property_sync_int(), and unwrap_options_sync_toolsettings().
|
static |
Definition at line 405 of file uvedit_unwrap_ops.cc.
References BLI_assert_unreachable, RNA_property_is_set(), RNA_property_string_get(), RNA_property_string_set(), rna_property_sync_string(), and RNA_struct_find_property().
Referenced by rna_property_sync_string(), and unwrap_options_sync_toolsettings().
|
static |
Definition at line 2458 of file uvedit_unwrap_ops.cc.
References BLI_assert, BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM, BM_LOOPS_OF_FACE, l, and shrink_loop_uv_by_aspect_ratio().
Referenced by correct_uv_aspect(), correct_uv_aspect_per_face(), and shrink_loop_uv_by_aspect_ratio().
|
static |
Definition at line 3158 of file uvedit_unwrap_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ThickFace::area, axis_dominant_v3_to_m3(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BLI_assert, BLI_linklist_prepend_arena(), BLI_memarena_clear(), BLI_memarena_free(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_face_calc_area(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_offsets_get(), C, BMVert::co, blender::geometry::UVPackIsland_Params::correct_aspect, cosf, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CTX_wm_view3d(), dot_v3v3(), ThickFace::efa, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), l, blender::geometry::UVPackIsland_Params::margin, blender::geometry::UVPackIsland_Params::margin_method, MEM_callocN(), MEM_freeN(), MEM_malloc_arrayN(), mul_v2_m3v3(), LinkNode::next, BMFace::no, blender::geometry::UVPackIsland_Params::only_selected_faces, blender::geometry::UVPackIsland_Params::only_selected_uvs, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), blender::geometry::UVPackIsland_Params::rotate_method, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), smart_project_exec(), smart_uv_project_area_ignore, smart_uv_project_calculate_project_normals(), smart_uv_project_thickface_area_cmp_fn(), Scene::toolsettings, BMesh::totface, blender::geometry::UVPackIsland_Params::use_seams, BMUVOffsets::uv, uv_map_clip_correct(), ToolSettings::uvcalc_margin, uvedit_ensure_uvs(), uvedit_face_select_disable(), uvedit_face_select_test(), uvedit_pack_islands_multi(), BMLoop::v, and zero_v2().
Referenced by smart_project_exec(), and UV_OT_smart_project().
|
static |
Definition at line 3336 of file uvedit_unwrap_ops.cc.
References C, IFACE_, smart_project_invoke(), and WM_operator_props_popup_confirm_ex().
Referenced by smart_project_invoke(), and UV_OT_smart_project().
|
static |
Definition at line 3061 of file uvedit_unwrap_ops.cc.
References add_v3_v3(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ThickFace::area, bm, BM_elem_flag_enable, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_TAG, BM_FACE, BM_mesh_elem_hflag_disable_all(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), dot_v3v3(), ThickFace::efa, madd_v3_v3fl(), max_ff(), BMFace::no, normalize_v3(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), smart_uv_project_calculate_project_normals(), and UNLIKELY.
Referenced by smart_project_exec(), and smart_uv_project_calculate_project_normals().
|
static |
Definition at line 3039 of file uvedit_unwrap_ops.cc.
References ThickFace::area, smart_uv_project_area_ignore, and smart_uv_project_thickface_area_cmp_fn().
Referenced by smart_project_exec(), and smart_uv_project_thickface_area_cmp_fn().
|
static |
Definition at line 3848 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_uv_map_offsets_get(), C, ceilf, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CTX_wm_view3d(), DEG_id_tag_update(), ID_RECALC_GEOMETRY, max_ff(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), sphere_project_exec(), BMesh::totfacesel, uv_map_clip_correct(), uv_map_transform(), uv_map_transform_center(), uv_sphere_project(), uvedit_ensure_uvs(), and WM_event_add_notifier().
Referenced by sphere_project_exec(), and UV_OT_sphere_project().
|
static |
Definition at line 818 of file uvedit_unwrap_ops.cc.
References BKE_id_free(), BKE_mesh_ensure_default_orig_index_customdata(), BKE_mesh_from_bmesh_for_eval_nomain(), BKE_subsurf_modifier_settings_init(), BLI_assert, BMEditMesh::bm, Object::data, eSubsurfModifierFlag_ControlEdges, SubsurfModifierData::flags, blender::bke::subdiv::free(), blender::bke::subdiv::Settings::level, SubsurfModifierData::levels, blender::bke::subdiv::new_from_mesh(), blender::bke::subdiv::ToMeshSettings::resolution, result, blender::bke::subdiv::subdiv_to_mesh(), subdivide_edit_mesh(), and blender::bke::subdiv::ToMeshSettings::use_optimal_display.
Referenced by construct_param_handle_subsurfed(), and subdivide_edit_mesh().
|
static |
Definition at line 788 of file uvedit_unwrap_ops.cc.
References BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_GET_FLOAT_P, BM_elem_index_get, BM_ITER_ELEM, BM_LOOPS_OF_FACE, l, ORIGINDEX_NONE, BMUVOffsets::pin, texface_from_original_index(), BMUVOffsets::uv, uvedit_uv_select_test(), and BMLoop::v.
Referenced by construct_param_handle_subsurfed(), and texface_from_original_index().
|
static |
Definition at line 2885 of file uvedit_unwrap_ops.cc.
References uiLayout::column(), wmOperator::layout, uiLayout::prop(), wmOperator::properties, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), RNA_pointer_create_discrete(), uiLayout::separator(), wmOperatorType::srna, wmOperator::type, UI_ITEM_NONE, uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), unwrap_draw(), and UVCALC_UNWRAP_METHOD_MINIMUM_STRETCH.
Referenced by unwrap_draw(), and UV_OT_unwrap().
|
static |
Definition at line 2775 of file uvedit_unwrap_ops.cc.
References BKE_report(), BKE_reportf(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CTX_wm_view3d(), ED_UVPACK_PIN_IGNORE, ED_UVPACK_ROTATION_ANY, fabsf, is_negative_m4(), blender::geometry::UVPackIsland_Params::margin, blender::geometry::UVPackIsland_Params::margin_method, mat4_to_size(), modifier_unwrap_state(), OPERATOR_CANCELLED, OPERATOR_FINISHED, options, blender::geometry::UVPackIsland_Params::pin_method, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_float_get(), blender::geometry::UVPackIsland_Params::rotate_method, RPT_INFO, RPT_WARNING, blender::geometry::UVPackIsland_Params::setFromUnwrapOptions(), Scene::toolsettings, UNWRAP_ERROR_NEGATIVE, UNWRAP_ERROR_NONUNIFORM, unwrap_exec(), unwrap_options_get(), unwrap_options_sync_toolsettings(), uvedit_ensure_uvs(), uvedit_have_selection_multi(), uvedit_pack_islands_multi(), and uvedit_unwrap_multi().
Referenced by unwrap_exec(), and UV_OT_unwrap().
|
static |
Definition at line 258 of file uvedit_unwrap_ops.cc.
References BKE_report(), modifier_unwrap_state(), options, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), RNA_int_get(), RNA_string_get(), RPT_WARNING, STRNCPY(), unwrap_options_get(), ToolSettings::unwrapper, UVCALC_FILLHOLES, ToolSettings::uvcalc_flag, ToolSettings::uvcalc_iterations, UVCALC_NO_ASPECT_CORRECT, UVCALC_UNWRAP_METHOD_ANGLE, UVCALC_UNWRAP_METHOD_CONFORMAL, UVCALC_UNWRAP_METHOD_MINIMUM_STRETCH, UVCALC_UNWRAP_NO_FLIP, UVCALC_UNWRAP_USE_WEIGHTS, UVCALC_USESUBSURF, ToolSettings::uvcalc_weight_factor, and ToolSettings::uvcalc_weight_group.
Referenced by average_islands_scale_exec(), ED_uvedit_live_unwrap(), ED_uvedit_live_unwrap_begin(), pack_islands_exec(), unwrap_exec(), and unwrap_options_get().
|
static |
Definition at line 419 of file uvedit_unwrap_ops.cc.
References wmOperator::ptr, rna_property_sync_enum_char(), rna_property_sync_flag(), rna_property_sync_float(), rna_property_sync_int(), rna_property_sync_string(), unwrap_options_sync_toolsettings(), ToolSettings::unwrapper, UVCALC_FILLHOLES, ToolSettings::uvcalc_flag, ToolSettings::uvcalc_iterations, ToolSettings::uvcalc_margin, UVCALC_NO_ASPECT_CORRECT, UVCALC_UNWRAP_NO_FLIP, UVCALC_UNWRAP_USE_WEIGHTS, UVCALC_USESUBSURF, ToolSettings::uvcalc_weight_factor, and ToolSettings::uvcalc_weight_group.
Referenced by unwrap_exec(), and unwrap_options_sync_toolsettings().
|
static |
Definition at line 3939 of file uvedit_unwrap_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_SEAM, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACES_OF_EDGE, BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, UV_FaceBranch::branch, ceilf, BMVert::co, blender::Array< T, InlineBufferCapacity, Allocator >::data(), BMLoop::e, UV_FaceBranch::efa, i, l, BMFace::len, map_to_tube(), max_ff(), mul_m3_v3(), blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), sub_v3_v3v3(), BMUVOffsets::uv, uv_cylinder_project(), uv_map_mirror(), uvedit_face_select_disable(), uvedit_face_select_test(), and BMLoop::v.
Referenced by cylinder_project_exec(), and uv_cylinder_project().
|
static |
Definition at line 3434 of file uvedit_unwrap_ops.cc.
References add_v4_v4(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_editmesh_from_object(), BKE_uvproject_camera_info(), BKE_uvproject_camera_info_free(), BKE_uvproject_from_camera(), BKE_uvproject_from_view(), BKE_uvproject_from_view_ortho(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, C, View3D::camera, CD_PROP_FLOAT2, BMVert::co, copy_m4_m4(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), CustomData_get_offset(), DEG_id_tag_update(), ED_view3d_camera_data_get(), ID_RECALC_GEOMETRY, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), l, BMesh::ldata, mul_v4_fl(), NC_GEOM, ND_DATA, negate_v4_v4(), OPERATOR_CANCELLED, OPERATOR_FINISHED, RegionView3D::persmat, wmOperator::ptr, Scene::r, RNA_boolean_get(), uv_from_view_exec(), uv_map_clip_correct(), uv_map_rotation_matrix_ex(), uvedit_ensure_uvs(), BMLoop::v, ARegion::winx, ARegion::winy, WM_event_add_notifier(), RenderData::xasp, RenderData::xsch, RenderData::yasp, and RenderData::ysch.
Referenced by uv_from_view_exec(), uv_from_view_invoke(), and UV_OT_project_from_view().
|
static |
Definition at line 3415 of file uvedit_unwrap_ops.cc.
References C, CTX_wm_region_view3d(), CTX_wm_view3d(), ED_view3d_camera_data_get(), wmOperator::ptr, RNA_property_boolean_set(), RNA_property_is_set(), RNA_struct_find_property(), uv_from_view_exec(), and uv_from_view_invoke().
Referenced by uv_from_view_invoke(), and UV_OT_project_from_view().
|
static |
Definition at line 3552 of file uvedit_unwrap_ops.cc.
References C, CTX_wm_region_view3d(), ED_operator_uvmap(), and uv_from_view_poll().
Referenced by uv_from_view_poll(), and UV_OT_project_from_view().
|
static |
| per_face_aspect | Calculate the aspect ratio per-face, otherwise use a single aspect for all UVs based on the material of the active face. TODO: using per-face aspect may split UV islands so more advanced UV projection methods such as "Unwrap" & "Smart UV Projections" will need to handle aspect correction themselves. For now keep using a single aspect for all faces in this case. |
Definition at line 2583 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_offsets_get(), clamp_v2(), correct_uv_aspect(), correct_uv_aspect_per_face(), INIT_MINMAX2, l, max, min, minmax_v2v2_v2(), wmOperator::ptr, RNA_boolean_get(), RNA_struct_find_property(), BMUVOffsets::uv, uv_map_clip_correct(), and uvedit_face_select_test().
Referenced by cube_project_exec(), cylinder_project_exec(), smart_project_exec(), sphere_project_exec(), uv_from_view_exec(), and uv_map_clip_correct().
|
static |
Definition at line 2571 of file uvedit_unwrap_ops.cc.
References uv_map_clip_correct_properties(), and uv_map_clip_correct_properties_ex().
Referenced by uv_map_clip_correct_properties(), UV_OT_cube_project(), UV_OT_cylinder_project(), UV_OT_project_from_view(), and UV_OT_sphere_project().
|
static |
Definition at line 2553 of file uvedit_unwrap_ops.cc.
References RNA_def_boolean(), wmOperatorType::srna, uv_map_clip_correct_properties_ex(), and uv_map_operator_property_correct_aspect().
Referenced by uv_map_clip_correct_properties(), uv_map_clip_correct_properties_ex(), and UV_OT_smart_project().
|
static |
Definition at line 3643 of file uvedit_unwrap_ops.cc.
References BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, ELEM, i, l, BMFace::len, max_ff(), min_ff(), and uv_map_mirror().
Referenced by uv_cylinder_project(), uv_map_mirror(), and uv_sphere_project().
|
static |
Definition at line 132 of file uvedit_unwrap_ops.cc.
References RNA_def_boolean(), wmOperatorType::srna, and uv_map_operator_property_correct_aspect().
Referenced by uv_map_clip_correct_properties_ex(), uv_map_operator_property_correct_aspect(), and UV_OT_unwrap().
|
static |
Definition at line 2315 of file uvedit_unwrap_ops.cc.
References add_v4_v4(), copy_m4_m4(), cosf, M_PI, mul_m4_series, result, sinf, unit_m4(), uv_map_rotation_matrix_ex(), RegionView3D::viewmat, zero_m4(), and zero_v3().
Referenced by uv_from_view_exec(), uv_map_rotation_matrix_ex(), and uv_map_transform().
|
static |
Definition at line 2369 of file uvedit_unwrap_ops.cc.
References ALIGN_TO_OBJECT, C, copy_m3_m4(), CTX_data_edit_object(), CTX_wm_region_view3d(), POLAR_ZY, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), RNA_struct_find_property(), unit_m3(), uv_map_rotation_matrix_ex(), uv_map_transform(), and VIEW_ON_EQUATOR.
Referenced by cylinder_project_exec(), sphere_project_exec(), and uv_map_transform().
|
static |
Definition at line 2229 of file uvedit_unwrap_ops.cc.
References BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_face_calc_bounds_expand(), BM_FACES_OF_MESH, BM_ITER_MESH, INIT_MINMAX, and uv_map_transform_calc_bounds().
Referenced by uv_map_transform_calc_bounds(), and uv_map_transform_center().
|
static |
Definition at line 2241 of file uvedit_unwrap_ops.cc.
References add_v3_v3(), BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_face_calc_center_median(), BM_FACES_OF_MESH, BM_ITER_MESH, mul_v3_fl(), uv_map_transform_calc_center_median(), and zero_v3().
Referenced by uv_map_transform_calc_center_median(), and uv_map_transform_center().
|
static |
Definition at line 2258 of file uvedit_unwrap_ops.cc.
References ATTR_FALLTHROUGH, BMEditMesh::bm, BM_editselection_center(), BM_select_history_active_get(), copy_v3_v3(), Scene::cursor, INIT_MINMAX, invert_m4_m4(), View3DCursor::location, mid_v3_v3v3(), mul_v3_m4v3(), Object::runtime, Scene::toolsettings, ToolSettings::transform_pivot_point, uv_map_transform_calc_bounds(), uv_map_transform_calc_center_median(), uv_map_transform_center(), V3D_AROUND_ACTIVE, V3D_AROUND_CENTER_BOUNDS, V3D_AROUND_CENTER_MEDIAN, V3D_AROUND_CURSOR, V3D_AROUND_LOCAL_ORIGINS, and zero_v3().
Referenced by cube_project_exec(), cylinder_project_exec(), sphere_project_exec(), and uv_map_transform_center().
|
static |
Calculates distance to nearest UDIM grid tile in UV space and its UDIM tile number.
Definition at line 1362 of file uvedit_unwrap_ops.cc.
References add_v2_fl(), floorf, len_squared_v2v2(), and uv_nearest_grid_tile_distance().
Referenced by uv_nearest_grid_tile_distance(), and uvedit_pack_islands_multi().
|
static |
Calculates distance to nearest UDIM image tile in UV space and its UDIM tile number.
Definition at line 1346 of file uvedit_unwrap_ops.cc.
References add_v2_fl(), BKE_image_find_nearest_tile_with_offset(), len_squared_v2v2(), and uv_nearest_image_tile_distance().
Referenced by uv_nearest_image_tile_distance(), and uvedit_pack_islands_multi().
| void UV_OT_average_islands_scale | ( | wmOperatorType * | ot | ) |
Definition at line 2054 of file uvedit_unwrap_ops.cc.
References average_islands_scale_exec(), wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and UV_OT_average_islands_scale().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_average_islands_scale().
| void UV_OT_cube_project | ( | wmOperatorType * | ot | ) |
Definition at line 4238 of file uvedit_unwrap_ops.cc.
References cube_project_exec(), wmOperatorType::description, ED_operator_uvmap(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, uv_map_clip_correct_properties(), and UV_OT_cube_project().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_cube_project().
| void UV_OT_cylinder_project | ( | wmOperatorType * | ot | ) |
Definition at line 4102 of file uvedit_unwrap_ops.cc.
References cylinder_project_exec(), wmOperatorType::description, ED_operator_uvmap(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, uv_map_clip_correct_properties(), UV_OT_cylinder_project(), and uv_transform_properties().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_cylinder_project().
| void UV_OT_minimize_stretch | ( | wmOperatorType * | ot | ) |
Definition at line 1270 of file uvedit_unwrap_ops.cc.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, minimize_stretch_cancel(), minimize_stretch_exec(), minimize_stretch_invoke(), minimize_stretch_modal(), wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_XY, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), RNA_def_float_factor(), RNA_def_int(), wmOperatorType::srna, and UV_OT_minimize_stretch().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_minimize_stretch().
| void UV_OT_pack_islands | ( | wmOperatorType * | ot | ) |
Definition at line 1926 of file uvedit_unwrap_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), ED_UVPACK_MARGIN_SCALED, ED_UVPACK_PIN_LOCK_ALL, ED_UVPACK_ROTATION_ANY, ED_UVPACK_SHAPE_CONCAVE, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, pack_islands_exec(), pack_margin_method_items, PACK_ORIGINAL_AABB, pack_rotate_method_items, pack_shape_method_items, PACK_UDIM_SRC_ACTIVE, PACK_UDIM_SRC_CLOSEST, pinned_islands_method_items, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum(), RNA_def_float_factor(), wmOperatorType::srna, wmOperatorType::ui, UV_OT_pack_islands(), uv_pack_islands_invoke(), uv_pack_islands_ui(), and WM_operator_props_popup_call().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_pack_islands().
| void UV_OT_project_from_view | ( | wmOperatorType * | ot | ) |
Definition at line 3563 of file uvedit_unwrap_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, uv_from_view_exec(), uv_from_view_invoke(), uv_from_view_poll(), uv_map_clip_correct_properties(), and UV_OT_project_from_view().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_project_from_view().
| void UV_OT_reset | ( | wmOperatorType * | ot | ) |
Definition at line 3623 of file uvedit_unwrap_ops.cc.
References wmOperatorType::description, ED_operator_uvmap(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, reset_exec(), and UV_OT_reset().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_reset().
| void UV_OT_smart_project | ( | wmOperatorType * | ot | ) |
Definition at line 3342 of file uvedit_unwrap_ops.cc.
References DEG2RADF, wmOperatorType::description, ED_operator_uvmap(), ED_UVPACK_MARGIN_SCALED, ED_UVPACK_ROTATION_AXIS_ALIGNED_Y, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, pack_margin_method_items, PACK_ROTATE_METHOD_AXIS_ALIGNED_OFFSET, pack_rotate_method_items, wmOperatorType::poll, RNA_def_enum(), RNA_def_float(), RNA_def_float_rotation(), RNA_def_property_float_default(), smart_project_exec(), smart_project_invoke(), wmOperatorType::srna, uv_map_clip_correct_properties_ex(), and UV_OT_smart_project().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_smart_project().
| void UV_OT_sphere_project | ( | wmOperatorType * | ot | ) |
Definition at line 3914 of file uvedit_unwrap_ops.cc.
References wmOperatorType::description, ED_operator_uvmap(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, sphere_project_exec(), uv_map_clip_correct_properties(), UV_OT_sphere_project(), and uv_transform_properties().
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_sphere_project().
| void UV_OT_unwrap | ( | wmOperatorType * | ot | ) |
Definition at line 2927 of file uvedit_unwrap_ops.cc.
References wmOperatorType::description, DNA_struct_default_get, ED_operator_uvmap(), ED_UVPACK_MARGIN_SCALED, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, MAX_ID_NAME, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, pack_margin_method_items, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), RNA_def_float(), RNA_def_float_factor(), RNA_def_int(), RNA_def_string(), wmOperatorType::srna, wmOperatorType::ui, unwrap_draw(), unwrap_exec(), ToolSettings::unwrapper, uv_map_operator_property_correct_aspect(), UV_OT_unwrap(), UVCALC_FILLHOLES, ToolSettings::uvcalc_flag, ToolSettings::uvcalc_iterations, UVCALC_UNWRAP_METHOD_ANGLE, UVCALC_UNWRAP_METHOD_CONFORMAL, UVCALC_UNWRAP_METHOD_MINIMUM_STRETCH, UVCALC_UNWRAP_NO_FLIP, UVCALC_UNWRAP_USE_WEIGHTS, ToolSettings::uvcalc_weight_factor, and ToolSettings::uvcalc_weight_group.
Referenced by ED_operatortypes_uvedit(), uv_find_nearest_face_multi(), and UV_OT_unwrap().
|
static |
Definition at line 1921 of file uvedit_unwrap_ops.cc.
References C, IFACE_, uv_pack_islands_invoke(), and WM_operator_props_popup_confirm_ex().
Referenced by UV_OT_pack_islands(), and uv_pack_islands_invoke().
|
static |
Definition at line 1892 of file uvedit_unwrap_ops.cc.
References IFACE_, wmOperator::layout, uiLayout::prop(), wmOperator::ptr, RNA_boolean_get(), uiLayout::row(), uiLayout::separator(), UI_ITEM_NONE, uiLayoutSetActive(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), and uv_pack_islands_ui().
Referenced by UV_OT_pack_islands(), and uv_pack_islands_ui().
|
static |
Compute the sphere projection for a BMFace using map_to_sphere and store on BMLoops.
Heuristics are used in uv_map_mirror to improve winding.
if fan is true, faces with UVs at the pole have corrections applied to fan the UVs.
if use_seams is true, the unwrapping will flood fill across the mesh, using seams to mark boundaries, and BM_ELEM_TAG to prevent revisiting faces.
Definition at line 3765 of file uvedit_unwrap_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_SEAM, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACES_OF_EDGE, BM_ITER_ELEM, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, UV_FaceBranch::branch, ceilf, BMVert::co, blender::Array< T, InlineBufferCapacity, Allocator >::data(), BMLoop::e, UV_FaceBranch::efa, i, l, BMFace::len, map_to_sphere(), max_ff(), mul_m3_v3(), blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), sub_v3_v3v3(), BMUVOffsets::uv, uv_map_mirror(), uv_sphere_project(), uvedit_face_select_disable(), uvedit_face_select_test(), and BMLoop::v.
Referenced by sphere_project_exec(), and uv_sphere_project().
|
static |
Definition at line 2402 of file uvedit_unwrap_ops.cc.
References ALIGN_TO_OBJECT, FAN, FLT_MAX, PINCH, POLAR_ZX, POLAR_ZY, RNA_def_boolean(), RNA_def_enum(), RNA_def_float(), wmOperatorType::srna, uv_transform_properties(), VIEW_ON_EQUATOR, and VIEW_ON_POLES.
Referenced by UV_OT_cylinder_project(), UV_OT_sphere_project(), and uv_transform_properties().
|
static |
Definition at line 88 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, BM_ELEM_CD_SET_BOOL, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_attr_edge_select_ensure(), BM_uv_map_attr_vert_select_ensure(), BM_uv_map_offsets_get(), CD_PROP_FLOAT2, CustomData_get_active_layer_name(), CustomData_has_layer(), Object::data, ED_mesh_uv_add(), ED_uvedit_test(), l, BMesh::ldata, BMUVOffsets::select_edge, BMUVOffsets::select_vert, BMesh::totface, and uvedit_ensure_uvs().
Referenced by cube_project_exec(), cylinder_project_exec(), reset_exec(), smart_project_exec(), sphere_project_exec(), unwrap_exec(), uv_from_view_exec(), and uvedit_ensure_uvs().
|
static |
Definition at line 443 of file uvedit_unwrap_ops.cc.
References BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_offsets_get(), l, options, Scene::toolsettings, BMesh::totfacesel, BMUVOffsets::uv, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_have_selection(), and uvedit_uv_select_test().
Referenced by uvedit_have_selection(), and uvedit_have_selection_multi().
|
static |
Definition at line 482 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), options, uvedit_have_selection(), and uvedit_have_selection_multi().
Referenced by average_islands_scale_exec(), minimize_stretch_init(), pack_islands_exec(), unwrap_exec(), and uvedit_have_selection_multi().
|
static |
Definition at line 535 of file uvedit_unwrap_ops.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ITER_ELEM, BM_LOOPS_OF_FACE, l, options, uvedit_is_face_affected(), and uvedit_uv_select_test().
Referenced by construct_param_handle(), construct_param_handle_multi(), and uvedit_is_face_affected().
|
static |
In practice the timer should practically always be valid. Use this to prevent the unlikely case of a stale timer being set.
Loading a new file while unwrapping is running could cause this for example.
Definition at line 2096 of file uvedit_unwrap_ops.cc.
References BLI_findindex(), g_live_unwrap, and uvedit_live_unwrap_timer_validate().
Referenced by ED_uvedit_live_unwrap_begin(), ED_uvedit_live_unwrap_end(), and uvedit_live_unwrap_timer_validate().
|
static |
Pack UV islands from multiple objects.
| scene | Scene containing the objects to be packed. |
| objects | Array of Objects to pack. |
| objects_len | Length of objects array. |
| bmesh_override | BMesh array aligned with objects. Optional, when non-null this overrides object's BMesh. This is needed to perform UV packing on objects that aren't in edit-mode. |
| udim_source_closest | UDIM source SpaceImage. |
| original_selection | Pack to original selection. |
| notify_wm | Notify the WM of any changes. (UI thread only.) |
| params | Parameters and options to pass to the packing engine. |
Definition at line 1435 of file uvedit_unwrap_ops.cc.
References blender::geometry::PackIsland::add_polygon(), blender::geometry::PackIsland::angle, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::PackIsland::aspect_y, FaceIsland::aspect_y, BKE_editmesh_from_object(), BLI_assert, BLI_heap_free(), BLI_heap_new(), BLI_memarena_clear(), BLI_memarena_free(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_remlink(), bm, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_face_uv_minmax(), BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, bm_mesh_calc_uv_islands(), BM_uv_map_offsets_get(), blender::geometry::PackIsland::build_transformation(), blender::geometry::PackIsland::caller_index, blender::geometry::PackIsland::can_scale_(), copy_v2_v2(), blender::geometry::UVPackIsland_Params::correct_aspect, DEG_id_tag_update(), ED_uvedit_get_aspect_y(), ED_UVPACK_PIN_IGNORE, ED_UVPACK_PIN_LOCK_ALL, FaceIsland::faces, FaceIsland::faces_len, floorf, FLT_MAX, i, ID_RECALC_GEOMETRY, SpaceImage::image, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), INIT_MINMAX2, invert_m2_m2(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::geometry::UVPackIsland_Params::isCancelled(), island_has_pins(), island_uv_transform(), l, BMFace::len, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), mid_v2_v2v2(), mul_v2_m2v2(), NC_GEOM, ND_DATA, FaceIsland::offsets, blender::geometry::UVPackIsland_Params::only_selected_faces, blender::geometry::UVPackIsland_Params::only_selected_uvs, blender::geometry::pack_islands(), blender::geometry::UVPackIsland_Params::pin_method, blender::geometry::UVPackIsland_Params::pin_unselected, blender::geometry::PackIsland::pinned, blender::geometry::PackIsland::pre_translate, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::geometry::UVPackIsland_Params::target_aspect_y, blender::geometry::UVPackIsland_Params::target_extent, SpaceImage::tile_grid_shape, blender::geometry::UVPackIsland_Params::udim_base_offset, blender::geometry::UVPackIsland_Params::use_seams, BMUVOffsets::uv, uv_coords_isect_udim(), uv_nearest_grid_tile_distance(), uv_nearest_image_tile_distance(), uvedit_pack_islands_multi(), and WM_main_add_notifier().
Referenced by ED_uvedit_add_simple_uvs(), ED_uvedit_live_unwrap(), pack_islands_startjob(), smart_project_exec(), unwrap_exec(), and uvedit_pack_islands_multi().
|
static |
Definition at line 564 of file uvedit_unwrap_ops.cc.
References BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_GET_FLOAT_P, BM_elem_index_get, BM_ITER_ELEM, BM_LOOPS_OF_FACE, l, options, BMUVOffsets::pin, BMUVOffsets::uv, blender::geometry::uv_prepare_pin_index(), uvedit_prepare_pinned_indices(), uvedit_uv_select_test(), and BMLoop::v.
Referenced by construct_param_handle(), construct_param_handle_multi(), and uvedit_prepare_pinned_indices().
|
static |
Definition at line 2698 of file uvedit_unwrap_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, CD_PROP_FLOAT2, construct_param_handle(), construct_param_handle_subsurfed(), CustomData_has_layer(), BMesh::ldata, modifier_unwrap_state(), options, blender::geometry::uv_parametrizer_average(), blender::geometry::uv_parametrizer_flush(), blender::geometry::uv_parametrizer_lscm_begin(), blender::geometry::uv_parametrizer_lscm_end(), blender::geometry::uv_parametrizer_lscm_solve(), blender::geometry::uv_parametrizer_slim_solve(), and uvedit_unwrap().
Referenced by uvedit_unwrap(), and uvedit_unwrap_multi().
|
static |
Definition at line 4126 of file uvedit_unwrap_ops.cc.
References axis_dominant_v3(), bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_offsets_get(), BMVert::co, copy_v3_v3(), l, BMFace::no, UNLIKELY, BMUVOffsets::uv, uvedit_face_select_disable(), uvedit_face_select_test(), uvedit_unwrap_cube_project(), BMLoop::v, and zero_v3().
Referenced by cube_project_exec(), ED_uvedit_add_simple_uvs(), and uvedit_unwrap_cube_project().
|
static |
Definition at line 2736 of file uvedit_unwrap_ops.cc.
References DEG_id_tag_update(), ID_RECALC_GEOMETRY, NC_GEOM, ND_DATA, options, uvedit_unwrap(), uvedit_unwrap_multi(), and WM_main_add_notifier().
Referenced by ED_uvedit_live_unwrap(), unwrap_exec(), and uvedit_unwrap_multi().
| struct [struct].g_live_unwrap g_live_unwrap |
|
static |
Definition at line 1823 of file uvedit_unwrap_ops.cc.
Referenced by UV_OT_pack_islands(), UV_OT_smart_project(), and UV_OT_unwrap().
|
static |
Definition at line 1838 of file uvedit_unwrap_ops.cc.
Referenced by UV_OT_pack_islands(), and UV_OT_smart_project().
|
static |
Definition at line 1866 of file uvedit_unwrap_ops.cc.
Referenced by UV_OT_pack_islands().
|
static |
Definition at line 1880 of file uvedit_unwrap_ops.cc.
Referenced by UV_OT_pack_islands().
|
static |
Definition at line 3032 of file uvedit_unwrap_ops.cc.
Referenced by smart_project_exec(), and smart_uv_project_thickface_area_cmp_fn().