Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/uvedit/uvedit_intern.h
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
| /* geometric utilities */ | /* geometric utilities */ | ||||
| void uv_poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy, int len); | void uv_poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy, int len); | ||||
| void uv_poly_center(struct BMFace *f, float r_cent[2], const int cd_loop_uv_offset); | void uv_poly_center(struct BMFace *f, float r_cent[2], const int cd_loop_uv_offset); | ||||
| /* find nearest */ | /* find nearest */ | ||||
| typedef struct UvNearestHit { | typedef struct UvNearestHit { | ||||
| /** Only for `*_multi(..)` versions of functions. */ | |||||
| struct Object *ob; | |||||
| /** Always set if we have a hit. */ | /** Always set if we have a hit. */ | ||||
| struct BMFace *efa; | struct BMFace *efa; | ||||
| struct BMLoop *l; | struct BMLoop *l; | ||||
| struct MLoopUV *luv, *luv_next; | struct MLoopUV *luv, *luv_next; | ||||
| /** Index of loop within face. */ | /** Index of loop within face. */ | ||||
| int lindex; | int lindex; | ||||
| /** Needs to be set before calling nearest functions. */ | /** Needs to be set before calling nearest functions. */ | ||||
| float dist_sq; | float dist_sq; | ||||
| } UvNearestHit; | } UvNearestHit; | ||||
| #define UV_NEAREST_HIT_INIT { .dist_sq = FLT_MAX, } | #define UV_NEAREST_HIT_INIT { .dist_sq = FLT_MAX, } | ||||
| bool uv_find_nearest_vert( | bool uv_find_nearest_vert( | ||||
| struct Scene *scene, struct Image *ima, struct Object *obedit, | struct Scene *scene, struct Image *ima, struct Object *obedit, | ||||
| const float co[2], const float penalty_dist, struct UvNearestHit *hit_final); | const float co[2], const float penalty_dist, struct UvNearestHit *hit_final); | ||||
| bool uv_find_nearest_vert_multi( | |||||
| struct Scene *scene, struct Image *ima, struct Object **objects, const uint objects_len, | |||||
| const float co[2], const float penalty_dist, struct UvNearestHit *hit_final); | |||||
| bool uv_find_nearest_edge( | bool uv_find_nearest_edge( | ||||
| struct Scene *scene, struct Image *ima, struct Object *obedit, | struct Scene *scene, struct Image *ima, struct Object *obedit, | ||||
| const float co[2], struct UvNearestHit *hit_final); | const float co[2], struct UvNearestHit *hit_final); | ||||
| bool uv_find_nearest_edge_multi( | |||||
| struct Scene *scene, struct Image *ima, struct Object **objects, const uint objects_len, | |||||
| const float co[2], struct UvNearestHit *hit_final); | |||||
| bool uv_find_nearest_face( | bool uv_find_nearest_face( | ||||
| struct Scene *scene, struct Image *ima, struct Object *obedit, | struct Scene *scene, struct Image *ima, struct Object *obedit, | ||||
| const float co[2], struct UvNearestHit *hit_final); | const float co[2], struct UvNearestHit *hit_final); | ||||
| bool uv_find_nearest_face_multi( | |||||
| struct Scene *scene, struct Image *ima, struct Object **objects, const uint objects_len, | |||||
| const float co[2], struct UvNearestHit *hit_final); | |||||
| /* utility tool functions */ | /* utility tool functions */ | ||||
| void uvedit_live_unwrap_update(struct SpaceImage *sima, struct Scene *scene, struct Object *obedit); | void uvedit_live_unwrap_update(struct SpaceImage *sima, struct Scene *scene, struct Object *obedit); | ||||
| /* operators */ | /* operators */ | ||||
| void UV_OT_average_islands_scale(struct wmOperatorType *ot); | void UV_OT_average_islands_scale(struct wmOperatorType *ot); | ||||
| Show All 11 Lines | |||||