Blender V5.0
uvedit_unwrap_ops.cc File Reference
#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_utf8.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_layout.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

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, const BMesh *bm, 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, const rctf *custom_region, 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, const BMesh *bm, BMFace *efa, const UnwrapOptions *options, const BMUVOffsets &offsets)
static void uvedit_prepare_pinned_indices (ParamHandle *handle, const Scene *scene, const BMesh *bm, BMFace *efa, const UnwrapOptions *options, const BMUVOffsets &offsets)
static void construct_param_handle_face_add (ParamHandle *handle, const Scene *scene, const BMesh *bm, 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 ParamHandleconstruct_param_handle (const Scene *scene, Object *ob, BMesh *bm, const UnwrapOptions *options, int *r_count_failed=nullptr)
static ParamHandleconstruct_param_handle_multi (const Scene *scene, const Span< Object * > objects, const UnwrapOptions *options)
static void texface_from_original_index (const Scene *scene, const BMesh *bm, const BMUVOffsets &offsets, BMFace *efa, int index, float **r_uv, bool *r_pin, bool *r_select)
static Meshsubdivide_edit_mesh (const Object *object, const BMEditMesh *em, const SubsurfModifierData *smd)
static ParamHandleconstruct_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 , PACK_CUSTOM_REGION }
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

struct { 
   ParamHandle **   handles 
   uint   len 
   uint   len_alloc 
   wmTimer *   timer 
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::float3smart_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)

Macro Definition Documentation

◆ ALIGN_TO_OBJECT

#define ALIGN_TO_OBJECT   2

Definition at line 2265 of file uvedit_unwrap_ops.cc.

Referenced by uv_map_transform(), and uv_transform_properties().

◆ PACK_ROTATE_METHOD_AXIS_ALIGNED_OFFSET

#define PACK_ROTATE_METHOD_AXIS_ALIGNED_OFFSET   3

Referenced by UV_OT_smart_project().

◆ POLAR_ZX

#define POLAR_ZX   0

Definition at line 2267 of file uvedit_unwrap_ops.cc.

Referenced by uv_transform_properties().

◆ POLAR_ZY

#define POLAR_ZY   1

Definition at line 2268 of file uvedit_unwrap_ops.cc.

Referenced by uv_map_transform(), and uv_transform_properties().

◆ VIEW_ON_EQUATOR

#define VIEW_ON_EQUATOR   0

Definition at line 2263 of file uvedit_unwrap_ops.cc.

Referenced by uv_map_transform(), and uv_transform_properties().

◆ VIEW_ON_POLES

#define VIEW_ON_POLES   1

Definition at line 2264 of file uvedit_unwrap_ops.cc.

Referenced by uv_transform_properties().

Typedef Documentation

◆ ParamKey

Definition at line 31 of file GEO_uv_parametrizer.hh.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PACK_UDIM_SRC_CLOSEST 
PACK_UDIM_SRC_ACTIVE 
PACK_ORIGINAL_AABB 
PACK_CUSTOM_REGION 

Definition at line 1680 of file uvedit_unwrap_ops.cc.

◆ anonymous enum

anonymous enum
Enumerator
UNWRAP_ERROR_NONUNIFORM 
UNWRAP_ERROR_NEGATIVE 

Definition at line 2817 of file uvedit_unwrap_ops.cc.

◆ anonymous enum

anonymous enum
Enumerator
PINCH 
FAN 

Definition at line 2270 of file uvedit_unwrap_ops.cc.

Function Documentation

◆ average_islands_scale_exec()

◆ construct_param_edge_set_seams()

◆ construct_param_handle()

◆ construct_param_handle_face_add()

◆ construct_param_handle_multi()

◆ construct_param_handle_subsurfed()

ParamHandle * construct_param_handle_subsurfed ( const Scene * scene,
Object * ob,
BMEditMesh * em,
const UnwrapOptions * options,
int * r_count_failed = nullptr )
static

◆ correct_uv_aspect()

◆ correct_uv_aspect_per_face()

◆ cube_project_exec()

◆ cylinder_project_exec()

◆ ED_uvedit_add_simple_uvs()

◆ ED_uvedit_get_aspect()

void ED_uvedit_get_aspect ( Object * ob,
float * r_aspx,
float * r_aspy )

◆ ED_uvedit_get_aspect_from_material()

void ED_uvedit_get_aspect_from_material ( Object * ob,
const int material_index,
float * r_aspx,
float * r_aspy )

◆ ED_uvedit_get_aspect_y()

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 525 of file uvedit_unwrap_ops.cc.

References ED_uvedit_get_aspect().

Referenced by construct_param_handle(), construct_param_handle_multi(), construct_param_handle_subsurfed(), correct_uv_aspect(), stitch_init(), uv_shortest_path_pick_exec(), uv_shortest_path_pick_invoke(), uv_shortest_path_select_exec(), and uvedit_pack_islands_multi().

◆ ED_uvedit_live_unwrap()

◆ ED_uvedit_live_unwrap_begin()

◆ ED_uvedit_live_unwrap_end()

◆ ED_uvedit_live_unwrap_re_solve()

◆ ED_uvedit_live_unwrap_timer_check()

bool ED_uvedit_live_unwrap_timer_check ( const wmTimer * timer)

Return true if the timer is managed by live-unwrap.

Definition at line 2130 of file uvedit_unwrap_ops.cc.

References g_live_unwrap, and timer.

Referenced by blender::ed::transform::transformEvent().

◆ island_has_pins()

◆ island_uv_transform()

void island_uv_transform ( FaceIsland * island,
const float matrix[2][2],
const float pre_translate[2] )
static

◆ minimize_stretch_cancel()

void minimize_stretch_cancel ( bContext * C,
wmOperator * op )
static

Definition at line 1277 of file uvedit_unwrap_ops.cc.

References C, and minimize_stretch_exit().

Referenced by UV_OT_minimize_stretch().

◆ minimize_stretch_exec()

◆ minimize_stretch_exit()

◆ minimize_stretch_init()

◆ minimize_stretch_invoke()

◆ minimize_stretch_iteration()

◆ minimize_stretch_modal()

◆ modifier_unwrap_state()

void modifier_unwrap_state ( Object * obedit,
const UnwrapOptions * options,
bool * r_use_subsurf )
static

◆ pack_islands_endjob()

◆ pack_islands_exec()

wmOperatorStatus pack_islands_exec ( bContext * C,
wmOperator * op )
static

Definition at line 1750 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(), UVPackIslandsData::custom_region, 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, PACK_CUSTOM_REGION, UVPackIslandsData::pack_island_params, pack_islands_endjob(), 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::uv_custom_region, ToolSettings::uv_flag, UV_FLAG_CUSTOM_REGION, 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(), WM_locked_interface_set_with_flags(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by UV_OT_pack_islands().

◆ pack_islands_freejob()

void pack_islands_freejob ( void * pidv)
static

◆ pack_islands_startjob()

◆ reset_exec()

◆ rna_property_sync_enum()

bool rna_property_sync_enum ( PointerRNA * ptr,
const char * prop_name,
int * value_p )
static

◆ rna_property_sync_enum_char()

bool rna_property_sync_enum_char ( PointerRNA * ptr,
const char * prop_name,
char * value_p )
static

Definition at line 364 of file uvedit_unwrap_ops.cc.

References ptr, and rna_property_sync_enum().

Referenced by unwrap_options_sync_toolsettings().

◆ rna_property_sync_flag()

bool rna_property_sync_flag ( PointerRNA * ptr,
const char * prop_name,
char flag,
bool flipped,
char * value_p )
static

◆ rna_property_sync_float()

bool rna_property_sync_float ( PointerRNA * ptr,
const char * prop_name,
float * value_p )
static

◆ rna_property_sync_int()

bool rna_property_sync_int ( PointerRNA * ptr,
const char * prop_name,
int * value_p )
static

◆ rna_property_sync_string()

bool rna_property_sync_string ( PointerRNA * ptr,
const char * prop_name,
char value_p[] )
static

◆ shrink_loop_uv_by_aspect_ratio()

void shrink_loop_uv_by_aspect_ratio ( BMFace * efa,
const int cd_loop_uv_offset,
const float aspect_y )
static

◆ smart_project_exec()

wmOperatorStatus smart_project_exec ( bContext * C,
wmOperator * op )
static

◆ smart_project_invoke()

wmOperatorStatus smart_project_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Definition at line 3393 of file uvedit_unwrap_ops.cc.

References C, IFACE_, and WM_operator_props_popup_confirm_ex().

Referenced by UV_OT_smart_project().

◆ smart_uv_project_calculate_project_normals()

◆ smart_uv_project_thickface_area_cmp_fn()

int smart_uv_project_thickface_area_cmp_fn ( const void * tf_a_p,
const void * tf_b_p )
static

Definition at line 3095 of file uvedit_unwrap_ops.cc.

References ThickFace::area, and smart_uv_project_area_ignore.

Referenced by smart_project_exec().

◆ sphere_project_exec()

◆ subdivide_edit_mesh()

◆ texface_from_original_index()

void texface_from_original_index ( const Scene * scene,
const BMesh * bm,
const BMUVOffsets & offsets,
BMFace * efa,
int index,
float ** r_uv,
bool * r_pin,
bool * r_select )
static

◆ unwrap_draw()

◆ unwrap_exec()

◆ unwrap_options_get()

◆ unwrap_options_sync_toolsettings()

◆ uv_cylinder_project()

◆ uv_from_view_exec()

◆ uv_from_view_invoke()

◆ uv_from_view_poll()

bool uv_from_view_poll ( bContext * C)
static

Definition at line 3609 of file uvedit_unwrap_ops.cc.

References C, CTX_wm_region_view3d(), and ED_operator_uvmap().

Referenced by UV_OT_project_from_view().

◆ uv_map_clip_correct()

void uv_map_clip_correct ( const Scene * scene,
const Span< Object * > objects,
wmOperator * op,
bool per_face_aspect,
bool only_selected_uvs )
static
Parameters
per_face_aspectCalculate 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 2629 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, and uvedit_face_select_test().

Referenced by cube_project_exec(), cylinder_project_exec(), smart_project_exec(), sphere_project_exec(), and uv_from_view_exec().

◆ uv_map_clip_correct_properties()

void uv_map_clip_correct_properties ( wmOperatorType * ot)
static

◆ uv_map_clip_correct_properties_ex()

void uv_map_clip_correct_properties_ex ( wmOperatorType * ot,
bool clip_to_bounds )
static

◆ uv_map_mirror()

void uv_map_mirror ( BMFace * efa,
const bool * regular,
const bool fan,
const int cd_loop_uv_offset )
static

◆ uv_map_operator_property_correct_aspect()

void uv_map_operator_property_correct_aspect ( wmOperatorType * ot)
static

Definition at line 129 of file uvedit_unwrap_ops.cc.

References ot, and RNA_def_boolean().

Referenced by uv_map_clip_correct_properties_ex(), and UV_OT_unwrap().

◆ uv_map_rotation_matrix_ex()

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

◆ uv_map_transform()

◆ uv_map_transform_calc_bounds()

void uv_map_transform_calc_bounds ( BMEditMesh * em,
float r_min[3],
float r_max[3] )
static

◆ uv_map_transform_calc_center_median()

void uv_map_transform_calc_center_median ( BMEditMesh * em,
float r_center[3] )
static

◆ uv_map_transform_center()

◆ uv_nearest_grid_tile_distance()

float uv_nearest_grid_tile_distance ( const int udim_grid[2],
const float coords[2],
float nearest_tile_co[2] )
static

Calculates distance to nearest UDIM grid tile in UV space and its UDIM tile number.

Definition at line 1374 of file uvedit_unwrap_ops.cc.

References add_v2_fl(), floorf, and len_squared_v2v2().

Referenced by uvedit_pack_islands_multi().

◆ uv_nearest_image_tile_distance()

float uv_nearest_image_tile_distance ( const Image * image,
const float coords[2],
float nearest_tile_co[2] )
static

Calculates distance to nearest UDIM image tile in UV space and its UDIM tile number.

Definition at line 1358 of file uvedit_unwrap_ops.cc.

References add_v2_fl(), BKE_image_find_nearest_tile_with_offset(), and len_squared_v2v2().

Referenced by uvedit_pack_islands_multi().

◆ UV_OT_average_islands_scale()

void UV_OT_average_islands_scale ( wmOperatorType * ot)

◆ UV_OT_cube_project()

◆ UV_OT_cylinder_project()

◆ UV_OT_minimize_stretch()

◆ UV_OT_pack_islands()

◆ UV_OT_project_from_view()

◆ UV_OT_reset()

void UV_OT_reset ( wmOperatorType * ot)

Definition at line 3680 of file uvedit_unwrap_ops.cc.

References ED_operator_uvmap(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and reset_exec().

Referenced by ED_operatortypes_uvedit().

◆ UV_OT_smart_project()

◆ UV_OT_sphere_project()

◆ UV_OT_unwrap()

◆ uv_pack_islands_invoke()

wmOperatorStatus uv_pack_islands_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Definition at line 1966 of file uvedit_unwrap_ops.cc.

References C, IFACE_, and WM_operator_props_popup_confirm_ex().

Referenced by UV_OT_pack_islands().

◆ uv_pack_islands_ui()

◆ uv_sphere_project()

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

◆ uv_transform_properties()

void uv_transform_properties ( wmOperatorType * ot,
int radius )
static

◆ uvedit_ensure_uvs()

◆ uvedit_have_selection()

◆ uvedit_have_selection_multi()

bool uvedit_have_selection_multi ( const Scene * scene,
const Span< Object * > objects,
const UnwrapOptions * options )
static

◆ uvedit_is_face_affected()

bool uvedit_is_face_affected ( const Scene * scene,
const BMesh * bm,
BMFace * efa,
const UnwrapOptions * options,
const BMUVOffsets & offsets )
static

◆ uvedit_live_unwrap_timer_validate()

bool uvedit_live_unwrap_timer_validate ( const wmWindowManager * wm)
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 2142 of file uvedit_unwrap_ops.cc.

References BLI_findindex(), and g_live_unwrap.

Referenced by ED_uvedit_live_unwrap_begin(), and ED_uvedit_live_unwrap_end().

◆ uvedit_pack_islands_multi()

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,
const rctf * custom_region,
blender::geometry::UVPackIsland_Params * params )
static

Pack UV islands from multiple objects.

Parameters
sceneScene containing the objects to be packed.
objectsArray of Objects to pack.
objects_lenLength of objects array.
bmesh_overrideBMesh 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_closestUDIM source SpaceImage.
original_selectionPack to original selection.
notify_wmNotify the WM of any changes. (UI thread only.)
paramsParameters and options to pass to the packing engine.

Definition at line 1448 of file uvedit_unwrap_ops.cc.

References blender::geometry::PackIsland::add_polygon(), blender::geometry::PackIsland::angle, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ARRAY_SET_ITEMS, 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_rctf_is_empty(), BLI_rctf_size_x(), BLI_rctf_size_y(), 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(), 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(), 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::pack_islands(), params, blender::geometry::PackIsland::pinned, blender::geometry::PackIsland::pre_translate, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SpaceImage::tile_grid_shape, BMUVOffsets::uv, uv_coords_isect_udim(), uv_nearest_grid_tile_distance(), uv_nearest_image_tile_distance(), WM_main_add_notifier(), rctf::xmin, and rctf::ymin.

Referenced by ED_uvedit_add_simple_uvs(), ED_uvedit_live_unwrap(), pack_islands_startjob(), smart_project_exec(), and unwrap_exec().

◆ uvedit_prepare_pinned_indices()

void uvedit_prepare_pinned_indices ( ParamHandle * handle,
const Scene * scene,
const BMesh * bm,
BMFace * efa,
const UnwrapOptions * options,
const BMUVOffsets & offsets )
static

◆ uvedit_unwrap()

◆ uvedit_unwrap_cube_project()

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

◆ uvedit_unwrap_multi()

void uvedit_unwrap_multi ( const Scene * scene,
const Span< Object * > objects,
const UnwrapOptions * options,
int * r_count_changed = nullptr,
int * r_count_failed = nullptr )
static

Variable Documentation

◆ [struct]

◆ handles

◆ len

uint len

Definition at line 2126 of file uvedit_unwrap_ops.cc.

Referenced by _bli_array_permute(), _glewSearchExtension(), add_struct(), addedgetoscanlist(), Freestyle::BlenderFileLoader::addTriangle(), alter_co(), angle_poly_v3(), ANIM_add_driver_with_target(), Light::area(), area_light_max_extent(), area_light_rect_sample(), area_light_spread_clamp_light(), arrow_draw_geom(), blender::ed::asset::asset_bundle_install_exec(), ATTR_NONNULL(), ATTR_NONNULL(), mem_guarded::internal::ATTR_NONNULL(), attr_size(), bake_offset_towards_center(), blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor(), bezier_handle_calc_length_v3(), BKE_brush_curve_strength(), BKE_brush_curve_strength_clamped(), BKE_curve_bevelList_make(), BKE_curve_correct_bezpart(), BKE_fcurve_correct_bezpart(), BKE_fcurve_pathcache_find(), BKE_fcurve_pathcache_find_array(), BKE_image_save_options_init(), BKE_image_user_frame_get(), BKE_keyblock_convert_from_mesh(), BKE_mask_clipboard_copy_from_layer(), BKE_mask_point_set_handle(), BKE_mask_spline_resolution(), BKE_mball_is_basis(), BKE_nurb_duplicate(), BKE_nurb_makeCurve(), BKE_nurb_makeFaces(), BKE_object_dimensions_set_ex(), BKE_packedfile_compare_to_file(), BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), BKE_report(), BKE_tracking_tracks_join(), BKE_vfont_clipboard_set(), blendfile_library_relocate_id_remap_finalize(), BLI_box_pack_2d(), BLI_dir_create_recursive(), BLI_dir_free_space(), BLI_dynstr_nappend(), BLI_exists(), BLI_file_alias_target(), BLI_file_unzstd_to_mem_at_pos(), BLI_file_zstd_from_mem_at_pos(), BLI_filereader_new_memory(), BLI_hash_md5_buffer(), BLI_hash_md5_stream(), BLI_hash_md5_to_hexdigest(), BLI_hash_mm2(), BLI_hash_mm2a_add(), BLI_hash_mm3(), BLI_jitterate1(), BLI_linklist_count(), BLI_path_join_array(), BLI_path_make_safe_filename_ex(), BLI_path_slash_rstrip(), blender::draw::detail::DataBuffer< T, len, device_only >::BLI_STATIC_ASSERT(), BLI_str_escape(), BLI_str_format_byte_unit(), BLI_str_tolower_ascii(), BLI_str_toupper_ascii(), BLI_str_unescape(), BLI_str_unescape_ex(), BLI_str_utf32_as_utf8(), BLI_str_utf32_as_utf8_len(), BLI_str_utf32_as_utf8_len_ex(), BLI_str_utf8_as_unicode_or_error(), BLI_str_utf8_as_unicode_step_or_error(), BLI_str_utf8_as_utf32(), BLI_str_utf8_from_unicode(), BLI_str_utf8_from_unicode_len(), BLI_strcasestr(), BLI_strcmp_ignore_pad(), BLI_strdupn(), BLI_string_flip_side_name(), BLI_string_split_prefix(), BLI_string_split_suffix(), BLI_strlen_utf8_ex(), BLI_strncasecmp(), BLI_strncasecmp(), BLI_strncasestr(), BLI_strncasestr(), BLI_strncat(), BLI_strncpy_wchar_as_utf8(), BLI_strnlen(), BLI_strnlen_utf8_ex(), BLI_system_thread_count(), BLI_uniquename_cb(), BLI_uniquename_cb(), BLI_wstrlen_utf8(), BLO_read_string(), bm_bridge_best_rotation(), BM_disk_dissolve(), bm_edge_info_average_length(), BM_edge_is_any_face_len_test(), bm_edgeloop_offset_length(), BM_edges_from_verts(), BM_edges_from_verts_ensure(), bm_edges_sort_winding(), BM_face_create(), BM_face_create_ngon(), BM_face_create_ngon_verts(), BM_face_create_verts(), BM_face_exists(), BM_face_exists_multi(), BM_face_exists_multi_edge(), BM_face_exists_overlap(), BM_face_exists_overlap_subset(), BM_face_split_edgenet_connect_islands(), BM_face_splits_check_legal(), BM_face_splits_check_optimal(), BM_face_triangulate(), BM_iter_as_array(), BM_loop_at_index_find(), BM_loop_calc_face_normal(), BM_loop_is_adjacent(), bm_mesh_calc_uvs_sphere_face(), bm_uidwalk_init_from_edge(), BM_vert_calc_normal(), BM_vert_calc_normal_ex(), BM_vert_dissolve(), BM_vert_normal_update_all(), BM_verts_from_edges(), BM_verts_in_face(), BM_verts_in_face_count(), BM_verts_sort_radial_plane(), bmesh_disk_validate(), bmesh_elem_check(), bmesh_loop_validate(), bmesh_radial_faceloop_find_vert(), bmo_connect_verts_nonplanar_exec(), bmo_create_uvsphere_exec(), bmo_dissolve_edges_exec(), BMO_iter_as_array(), BMO_slot_as_arrayN(), BMO_slot_buffer_alloc(), bmw_EdgeringWalker_step(), boid_brain(), bone_autoside_name(), boxPack_FromPyObject(), boxPack_ToPyObject(), bpy_bmeditselseq_subscript(), bpy_bmelemseq_subscript(), bpy_bmlayercollection_subscript(), bpy_bmlayercollection_subscript_int(), bpy_bmlayercollection_subscript_slice(), BPY_context_member_get(), BPy_IDGroup_CorrectListLen(), BPy_Wrap_GetKeys(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), bsdf_microfacet_eval(), btAdjustInternalEdgeContacts(), btStrLen(), C_BVHTree_FromPolygons(), calc_bevfac_spline_mapping(), calc_strength(), calchandle_curvemap(), calchandleNurb_intern(), LightTreeMeasure::calculate(), blender::bke::curves::bezier::calculate_point_handles(), btTransformUtil::calculateDiffAxisAngle(), btTransformUtil::calculateDiffAxisAngleQuaternion(), camera_distance(), camera_z_depth(), channel_list_visible_key_len(), channel_visible_key_len(), check_field_alignment(), clampto_evaluate(), clg_ctx_filter_check(), clg_str_append_char(), clg_str_append_with_len(), clg_str_reserve(), cloth_bend_poly_dir(), cloth_bend_set_poly_vert_array(), cloth_calc_helper_forces(), blender::ed::sculpt_paint::mask::color_delta_get(), compute_3d_orientation(), Mesh::Triangle::compute_normal(), console_cursor_set_to_pos(), console_delete_editable_selection(), console_indent_exec(), console_insert_exec(), console_insert_invoke(), console_line_insert(), console_line_verify_length(), console_select_set_invoke(), console_unindent_exec(), copy_single_file(), blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), blender::draw::create_material_subranges(), Freestyle::createStroke(), curve_to_displist(), differential_make_compact(), differential_make_compact(), dir_create_recursive(), direction_to_central_cylindrical(), direction_to_equirectangular_range(), direction_to_fisheye_equidistant(), distance(), distance(), distance(), distant_light_uv(), DNA_struct_member_size(), blender::ed::sculpt_paint::color::do_smear_brush_task(), dquat_to_mat4(), draw_brackets(), draw_distortion(), draw_suggestion_list(), drw_shgroup_bone_envelope(), ED_armature_ebone_from_mat3(), ED_info_statusbar_string_ex(), ED_mask_feather_find_nearest(), ed_mesh_pick_vert__mapFunc(), ED_node_tree_path_get(), ED_scene_grid_scale(), edbm_bevel_calc_initial_length(), edbm_connect_vert_pair(), editstr_insert_at_cursor(), eff_calc_visibility(), ensure_digits(), evaluate_curve_type_object(), evaluate_surface_object(), export_hair_curves(), blender::io::usd::export_packed_texture(), exr_rgba_channelname(), blender::geometry::extend_curve_curved(), blender::draw::extract_tris_subdiv(), fcurve_path_rename(), file_draw_string_multiline(), file_seek(), find_internal_spring_target_vertex(), find_min_value(), flatten_string(), flatten_string_append(), flatten_string_strlen(), blender::gpu::MTLCircularBuffer::flush(), blender::ed::object::followpath_path_animate_exec(), blender::draw::View::frustum_culling_planes_calc(), blender::draw::View::frustum_culling_sphere_calc(), fsmenu_entry_generate_name(), fsmenu_read_bookmarks(), gearGL(), gearGL(), get_default_rna_value(), MovieIndex::get_frame_index(), get_stats_string(), get_suggest_prefix(), GHOST_SystemWin32::getClipboard(), GHOST_SystemX11::getClipboard_xcout(), GHOST_WindowX11::GHOST_WindowX11(), gizmo_preselect_elem_test_select(), gizmo_ruler_draw(), blender::gpu::GLVertBuf::GLStorageBuf, GPU_debug_get_groups_names(), GPU_indexbuf_update_sub(), GPU_shader_uniform_1f_array(), GPU_shader_uniform_2fv_array(), GPU_shader_uniform_4fv_array(), GPU_shader_uniform_float_ex(), GPU_shader_uniform_int_ex(), GPU_unpack_row_length_set(), GPU_vertbuf_update_sub(), GPU_vertformat_safe_attr_name(), HsiehHash(), hull_merge_triangles(), idp_from_PyMapping(), IDP_ResizeIDPArray(), idp_sequence_type(), idp_str_append_escape(), idprop_ui_data_update_bool_default(), idprop_ui_data_update_float_default(), idprop_ui_data_update_int_default(), imb_exr_split_channel_name(), init_track_for_stabilization(), blender::draw::init_vbo_for_attribute(), btDefaultSerializer::initDNA(), insert_text_exec(), is_track_clean(), light_distribution_sample(), light_tree_emitter_importance(), light_tree_node_importance(), LightTreeEmitter::LightTreeEmitter(), blender::ed::sculpt_paint::load_tex_cursor_task_cb(), blender::ed::sculpt_paint::load_tex_task_cb_ex(), M_Geometry_area_tri(), M_Geometry_box_fit_2d(), M_Geometry_box_pack_2d(), M_Geometry_convex_hull_2d(), M_Interpolate_poly_3d_calc(), make_memhead_header(), make_structDNA(), map_to_tube(), blender::ed::sculpt_paint::mask::mask_by_color_contiguous_mesh(), mathutils_array_hash(), mathutils_rna_vector_set(), md5_process_block(), mean_value_half_tan_v2_db(), mean_value_half_tan_v3(), MEM_calloc_arrayN(), MEM_calloc_arrayN(), MEM_callocN(), MEM_guarded_calloc_arrayN(), MEM_guarded_calloc_arrayN(), MEM_guarded_calloc_arrayN_aligned(), MEM_guarded_calloc_arrayN_aligned(), MEM_guarded_callocN(), MEM_guarded_malloc_arrayN(), MEM_guarded_malloc_arrayN(), MEM_guarded_malloc_arrayN_aligned(), MEM_guarded_malloc_arrayN_aligned(), mem_guarded_malloc_arrayN_aligned(), MEM_guarded_mallocN(), MEM_guarded_mallocN_aligned(), MEM_guarded_reallocN_id(), MEM_guarded_recallocN_id(), MEM_lockfree_calloc_arrayN(), MEM_lockfree_calloc_arrayN(), MEM_lockfree_calloc_arrayN_aligned(), MEM_lockfree_calloc_arrayN_aligned(), MEM_lockfree_callocN(), MEM_lockfree_freeN(), MEM_lockfree_malloc_arrayN(), MEM_lockfree_malloc_arrayN(), MEM_lockfree_malloc_arrayN_aligned(), MEM_lockfree_malloc_arrayN_aligned(), mem_lockfree_malloc_arrayN_aligned(), MEM_lockfree_mallocN(), MEM_lockfree_mallocN_aligned(), MEM_lockfree_reallocN_id(), MEM_lockfree_recallocN_id(), MEM_malloc_arrayN(), MEM_malloc_arrayN(), MEM_mallocN(), MEM_mallocN_aligned(), mesh_add_edges(), mesh_add_faces(), mesh_add_loops(), mesh_add_verts(), mesh_remove_edges(), mesh_remove_faces(), mesh_remove_loops(), mesh_remove_verts(), mesh_uv_reset_array(), meshdeform_ray_tree_intersect(), metadata_draw_imbuf(), mm2a_mix_tail(), mnee_compute_constraint_derivatives(), mnee_compute_transfer_matrix(), mnee_newton_solver(), mnee_setup_manifold_vertex(), MOD_solidify_nonmanifold_modifyMesh(), blender::locale::MOFile::MOFile(), blender::gpu::MSLGeneratorInterface::msl_patch_default_get(), blender::gpu::MTLIndexBuf::MTLStorageBuf, mywrite(), new_folder_path(), blender::draw::SwapChain< T, len >::next(), blender::draw::SwapChain< T, len >::next(), nlaedit_split_strip_actclip(), blender::noise_table(), blender::noise_table(), blender::math::normalize(), blender::math::normalize(), mikk::float3::normalize(), normalize(), normalize(), normalize(), normalize(), normalize_len(), normalize_len(), normalize_m4(), normalize_m4_m4(), blender::asset_system::utils::normalize_path(), normalize_qt(), object_volume_density(), ObtainCacheParticleData(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_float_vec(), opj_seek_from_buffer(), blender::ed::outliner::outliner_buttons(), output_iris(), blender::geometry::p_chart_boundaries(), blender::geometry::p_chart_correct_degenerate_triangles2(), blender::geometry::p_chart_minimum_area_angle(), blender::geometry::p_chart_symmetry_pins(), blender::ed::sculpt_paint::paint_stroke_line_constrain(), parse_int_range_relative_clamp_n(), blender::io::ply::parse_word(), partition(), passtype_from_name(), paste_selection(), paste_text_exec(), path_len_no_trailing_slash(), point_calculate_handle(), blender::point_counts_to_keep_concurrent(), poly_avg(), poly_norm(), pose_slide_apply_props(), precise_angle(), blender::draw::SwapChain< T, len >::previous(), blender::draw::SwapChain< T, len >::previous(), btSphereSphereCollisionAlgorithm::processCollision(), uiLayout::prop(), prop_subscript_ass_array_int(), btSoftBody::PSolve_Links(), psys_get_dupli_path_transform(), ptcache_filepath(), ptcache_filepath_ext_append(), ptcache_frame_from_filename(), GHOST_SystemWin32::putClipboard(), PyC_Tuple_PackArray_Bool(), PyC_Tuple_PackArray_F32(), PyC_Tuple_PackArray_F64(), PyC_Tuple_PackArray_I32(), PyC_Tuple_PackArray_I32FromBool(), PyC_Tuple_PackArray_Multi_Bool_impl(), PyC_Tuple_PackArray_Multi_F32_impl(), PyC_Tuple_PackArray_Multi_F64_impl(), PyC_Tuple_PackArray_Multi_I32_impl(), PyC_Tuple_PackArray_String(), pygpu_buffer_to_list(), pygpu_buffer_to_list_recursive(), pygpu_fill_format_sequence(), pygpu_matrix_scale(), pygpu_matrix_translate(), pygpu_texture__tp_new(), pygpu_vertbuf__tp_new(), pygpu_vertformat_attr_add(), pyrna_array_contains_py(), pyrna_deferred_register_class_recursive(), pyrna_math_object_from_array(), pyrna_param_to_py(), pyrna_prop_array_ass_subscript(), pyrna_prop_array_iter(), pyrna_prop_array_subscript(), pyrna_prop_array_subscript_int(), pyrna_prop_collection_ass_subscript(), pyrna_prop_collection_ass_subscript_int(), pyrna_prop_collection_subscript(), pyrna_prop_collection_subscript_int(), pyrna_prop_str(), pyrna_py_from_array_index(), quad_from_tris(), Quaternion_angle_set(), Quaternion_axis_vector_set(), blender::bke::cryptomatte::manifest::quoted_string_len_(), radial_control_get_path(), ray_optical_depth(), blender::render::hydra::RenderTaskDelegate::read_aov(), read_file_as_buffer(), blender::io::read_next_line(), readtab(), replace_bbone_len_scale_rnapath(), report_error_on_address(), report_error_on_address(), repr_str(), btSolve2LinearConstraint::resolveBilateralPairConstraint(), btSolve2LinearConstraint::resolveUnilateralPairConstraint(), blender::draw::ResourceIndexRange::ResourceIndexRange(), rna_array_as_string(), rna_array_as_string_alloc(), rna_array_as_string_elem(), RNA_def_boolean_array(), RNA_def_boolean_layer(), RNA_def_boolean_layer_member(), RNA_def_boolean_vector(), RNA_def_float_array(), RNA_def_float_color(), RNA_def_float_rotation(), RNA_def_float_translation(), RNA_def_float_vector(), RNA_def_float_vector_xyz(), RNA_def_int_array(), RNA_def_int_vector(), rna_generate_property(), RNA_parameter_dynamic_length_get(), rna_parameter_size(), rna_path_parse_array_index(), rna_path_token(), rna_path_token_in_brackets(), RNA_property_animated(), rna_property_array_length_all_dimensions(), RNA_property_as_string(), RNA_property_boolean_get_default_index(), RNA_property_boolean_get_index(), RNA_property_boolean_set_index(), RNA_property_collection_clear(), RNA_property_collection_move(), RNA_property_collection_raw_get(), RNA_property_collection_raw_set(), RNA_property_collection_remove(), RNA_property_float_get_default_index(), RNA_property_float_get_index(), RNA_property_float_set_index(), RNA_property_int_get_default_index(), RNA_property_int_get_index(), RNA_property_int_set_index(), RNA_property_multi_array_length(), RNA_property_pointer_get_default(), RNA_property_reset(), RNA_property_string_set_bytes(), rotation_contribution(), rule_avoid_collision(), rule_follow_leader(), rule_goal_avoid(), rule_separate(), safe_normalize(), safe_normalize(), safe_normalize(), safe_normalize_fallback(), safe_normalize_len(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_modal(), blender::ed::sculpt_paint::filter::sculpt_mesh_update_strength(), select_bidomain(), select_similar_length(), blender::ed::vse::sequencer_change_path_exec(), blender::ed::vse::sequencer_image_strip_reserve_frames(), serializeDynamicsWorldInfo(), btMultiBodyDynamicsWorld::serializeMultiBodies(), btDefaultSerializer::serializeName(), serializeRigidBodies(), serializeSingleBvh(), serializeSingleShape(), serializeSingleTriangleInfoMap(), btSoftMultiBodyDynamicsWorld::serializeSoftBodies(), btSoftRigidDynamicsWorld::serializeSoftBodies(), session_print(), set_case(), blender::ed::transform::setNearestAxis3d(), single_scattering(), blender::draw::SwapChain< T, len >::size(), skin_choose_quad_bridge_order(), slide_dist(), space_text_cursor_set_to_pos_wrapped(), sphere_do(), stencil_control_calculate(), blender::draw::StorageArrayBuffer< float2, 16 >::StorageArrayBuffer(), blender::draw::detail::StorageCommon< T, len, device_only >::StorageCommon(), blender::draw::StorageVectorBuffer< IrradianceBrickPacked, 16 >::StorageVectorBuffer(), str_tolower_titlecaps_ascii(), strbuf_append_path(), strbuf_trim(), string_dup(), string_endswith(), string_startswith(), blender::io::stl::StringBuffer::StringBuffer(), strip_foreach_path_callback(), svm_node_camera(), svm_node_tex_gabor(), svm_node_vector_rotate(), svm_vector_math(), svm_wave(), blender::draw::SwapChain< T, len >::swap(), system_physical_ram(), tan_angle(), blender::math::tests::TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), blender::draw::test_eevee_shadow_page_mask_ex(), blender::draw::test_eevee_shadow_tag_update(), text_autocomplete_build(), text_check_format_len(), text_convert_whitespace_exec(), blender::ed::vse::text_edit_copy(), text_format_fill(), text_format_fill_ascii(), text_from_buf(), text_insert_invoke(), texttool_suggest_add(), blender::gpu::GLStateManager::texture_unpack_row_length_set(), blender::gpu::MTLStateManager::texture_unpack_row_length_set(), blender::gpu::StateManager::texture_unpack_row_length_set(), blender::gpu::VKStateManager::texture_unpack_row_length_set(), textview_draw_string(), tracking_dopesheet_channels_segments_calc(), transform_decompose(), tri_to_quat(), triangle_area(), triangle_light_pdf(), blender::draw::StorageArrayBuffer< float2, 16 >::trim_to_next_power_of_2(), txt_from_buf_for_undo(), txt_select_prefix(), txtfmt_glsl_format_line(), txtfmt_osl_format_line(), txtfmt_pov_format_line(), txtfmt_pov_ini_format_line(), txtfmt_py_format_line(), TYPED_TEST(), ui_block_calc_pie_segment(), ui_but_text_password_hide(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), UI_draw_text_underline(), ui_handle_list_event(), ui_item_array(), ui_item_name_add_colon(), ui_item_name_add_colon(), ui_item_rna_size(), ui_layer_but_cb(), UI_list_filter_and_sort_items(), ui_number_from_string_factor(), ui_number_from_string_percentage(), ui_numedit_but_HSVCIRCLE(), ui_selectcontext_apply(), ui_text_clip_cursor(), ui_textedit_begin(), ui_textedit_delete(), ui_textedit_delete_selection(), ui_textedit_insert_buf(), ui_textedit_move(), uiDefAutoButsArrayR(), uiTemplateImageInfo(), uiTemplateMovieclipInformation(), blender::draw::UniformArrayBuffer< PlanarProbeData, PLANAR_PROBE_MAX >::UniformArrayBuffer(), blender::draw::detail::UniformCommon< T, len, device_only >::UniformCommon(), unique_name(), unit_as_string(), unit_scale_str(), unpack_generate_paths(), blender::ed::sculpt_paint::update_curve_mask(), blender::ed::sculpt_paint::update_sampled_curve(), blender::gpu::GLIndexBuf::update_sub(), blender::gpu::GLVertBuf::update_sub(), blender::gpu::IndexBuf::update_sub(), blender::gpu::MTLIndexBuf::update_sub(), blender::gpu::MTLVertBuf::update_sub(), blender::gpu::VertBuf::update_sub(), btSoftBody::updateNormals(), url_encode_wstring(), utf8_char_decode(), util_murmur_hash3(), uvedit_uv_straighten_elements(), Freestyle::V2Normalize(), Freestyle::V2Scale(), validate_array_length(), blender::locale::MOFile::value(), vec_to_quat(), vector_angle(), vicon_rgb_text_draw(), view3d_grid_steps_ex(), wireframe(), wm_autosave_location(), WM_gesture_lasso_path_to_array(), wm_gizmomap_select_array_ensure_len_alloc(), wm_read_exotic(), Camera::world_to_raster_size(), blender::math::QuaternionBase< T >::wrapped_around(), blender::io::ply::FileBuffer::write_fstring(), write_memory(), write_raw_data_in_debug_file(), write_type(), writedata(), writedata(), and writetab().

◆ len_alloc

uint len_alloc

◆ pack_margin_method_items

const EnumPropertyItem pack_margin_method_items[]
static
Initial value:
= {
"SCALED",
0,
"Scaled",
"Use scale of existing UVs to multiply margin"},
{ED_UVPACK_MARGIN_ADD, "ADD", 0, "Add", "Just add the margin, ignoring any UV scale"},
"FRACTION",
0,
"Fraction",
"Specify a precise fraction of final UV output"},
{0, nullptr, 0, nullptr, nullptr},
}
@ ED_UVPACK_MARGIN_FRACTION
@ ED_UVPACK_MARGIN_SCALED
@ ED_UVPACK_MARGIN_ADD

Definition at line 1868 of file uvedit_unwrap_ops.cc.

Referenced by UV_OT_pack_islands(), UV_OT_smart_project(), and UV_OT_unwrap().

◆ pack_rotate_method_items

const EnumPropertyItem pack_rotate_method_items[]
static
Initial value:
= {
{ED_UVPACK_ROTATION_ANY, "ANY", 0, "Any", "Any angle is allowed for rotation"},
"CARDINAL",
0,
"Cardinal",
"Only 90 degree rotations are allowed"},
#define PACK_ROTATE_METHOD_AXIS_ALIGNED_OFFSET
"AXIS_ALIGNED",
0,
"Axis-aligned",
"Rotated to a minimal rectangle, either vertical or horizontal"},
"AXIS_ALIGNED_X",
0,
"Axis-aligned (Horizontal)",
"Rotate islands to be aligned horizontally"},
"AXIS_ALIGNED_Y",
0,
"Axis-aligned (Vertical)",
"Rotate islands to be aligned vertically"},
{0, nullptr, 0, nullptr, nullptr},
}
@ ED_UVPACK_ROTATION_ANY
@ ED_UVPACK_ROTATION_AXIS_ALIGNED_X
@ ED_UVPACK_ROTATION_AXIS_ALIGNED
@ ED_UVPACK_ROTATION_CARDINAL
@ ED_UVPACK_ROTATION_AXIS_ALIGNED_Y
#define RNA_ENUM_ITEM_SEPR
Definition RNA_types.hh:676

Definition at line 1883 of file uvedit_unwrap_ops.cc.

Referenced by UV_OT_pack_islands(), and UV_OT_smart_project().

◆ pack_shape_method_items

const EnumPropertyItem pack_shape_method_items[]
static
Initial value:
= {
{ED_UVPACK_SHAPE_CONCAVE, "CONCAVE", 0, "Exact Shape (Concave)", "Uses exact geometry"},
{ED_UVPACK_SHAPE_CONVEX, "CONVEX", 0, "Boundary Shape (Convex)", "Uses convex hull"},
{ED_UVPACK_SHAPE_AABB, "AABB", 0, "Bounding Box", "Uses bounding boxes"},
{0, nullptr, 0, nullptr, nullptr},
}
@ ED_UVPACK_SHAPE_AABB
@ ED_UVPACK_SHAPE_CONCAVE
@ ED_UVPACK_SHAPE_CONVEX

Definition at line 1911 of file uvedit_unwrap_ops.cc.

Referenced by UV_OT_pack_islands().

◆ pinned_islands_method_items

const EnumPropertyItem pinned_islands_method_items[]
static
Initial value:
= {
{ED_UVPACK_PIN_LOCK_SCALE, "SCALE", 0, "Scale", "Pinned islands won't rescale"},
{ED_UVPACK_PIN_LOCK_ROTATION, "ROTATION", 0, "Rotation", "Pinned islands won't rotate"},
"ROTATION_SCALE",
0,
"Rotation and Scale",
"Pinned islands will translate only"},
{ED_UVPACK_PIN_LOCK_ALL, "LOCKED", 0, "All", "Pinned islands are locked in place"},
{0, nullptr, 0, nullptr, nullptr},
}
@ ED_UVPACK_PIN_LOCK_ROTATION_SCALE
@ ED_UVPACK_PIN_LOCK_SCALE
@ ED_UVPACK_PIN_LOCK_ROTATION
@ ED_UVPACK_PIN_LOCK_ALL
Note
ED_UVPACK_PIN_NONE is exposed as a boolean "pin".
ED_UVPACK_PIN_IGNORE is intentionally not exposed as it is confusing from the UI level (users can simply not select these islands). The option is kept internally because it's used for live unwrap.

Definition at line 1925 of file uvedit_unwrap_ops.cc.

Referenced by UV_OT_pack_islands().

◆ smart_uv_project_area_ignore

const float smart_uv_project_area_ignore = 1e-12f
static

◆ timer