Cleanup: quiet const warnings
This commit is contained in:
parent
d27fb46715
commit
e9ac784237
|
@ -58,7 +58,7 @@ typedef enum {
|
|||
|
||||
struct DerivedMesh *subsurf_make_derived_from_derived(struct DerivedMesh *dm,
|
||||
struct SubsurfModifierData *smd,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
float (*vertCos)[3],
|
||||
SubsurfFlags flags);
|
||||
|
||||
|
|
|
@ -2519,7 +2519,7 @@ static bool subsurf_use_gpu_backend(SubsurfFlags flags)
|
|||
|
||||
struct DerivedMesh *subsurf_make_derived_from_derived(struct DerivedMesh *dm,
|
||||
struct SubsurfModifierData *smd,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
float (*vertCos)[3],
|
||||
SubsurfFlags flags)
|
||||
{
|
||||
|
|
|
@ -109,7 +109,7 @@ void EDBM_update_generic(struct BMEditMesh *em,
|
|||
const bool is_destructive);
|
||||
|
||||
struct UvElementMap *BM_uv_element_map_create(struct BMesh *bm,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
const bool face_selected,
|
||||
const bool uv_selected,
|
||||
const bool use_winding,
|
||||
|
|
|
@ -45,18 +45,22 @@ struct wmKeyConfig;
|
|||
void ED_operatortypes_uvedit(void);
|
||||
void ED_keymap_uvedit(struct wmKeyConfig *keyconf);
|
||||
|
||||
bool ED_uvedit_minmax(
|
||||
struct Scene *scene, struct Image *ima, struct Object *obedit, float min[2], float max[2]);
|
||||
bool ED_uvedit_center(Scene *scene, Image *ima, struct Object *obedit, float cent[2], char mode);
|
||||
bool ED_uvedit_minmax(const struct Scene *scene,
|
||||
struct Image *ima,
|
||||
struct Object *obedit,
|
||||
float min[2],
|
||||
float max[2]);
|
||||
bool ED_uvedit_center(
|
||||
const struct Scene *scene, Image *ima, struct Object *obedit, float cent[2], char mode);
|
||||
void ED_uvedit_select_all(struct BMesh *bm);
|
||||
|
||||
bool ED_uvedit_minmax_multi(struct Scene *scene,
|
||||
bool ED_uvedit_minmax_multi(const struct Scene *scene,
|
||||
struct Image *ima,
|
||||
struct Object **objects_edit,
|
||||
uint objects_len,
|
||||
float r_min[2],
|
||||
float r_max[2]);
|
||||
bool ED_uvedit_center_multi(Scene *scene,
|
||||
bool ED_uvedit_center_multi(const struct Scene *scene,
|
||||
Image *ima,
|
||||
struct Object **objects_edit,
|
||||
uint objects_len,
|
||||
|
@ -92,70 +96,76 @@ bool uvedit_uv_select_test_ex(const struct ToolSettings *ts,
|
|||
struct BMLoop *l,
|
||||
const int cd_loop_uv_offset);
|
||||
|
||||
bool uvedit_face_visible_nolocal(struct Scene *scene, struct BMFace *efa);
|
||||
bool uvedit_face_visible_test(struct Scene *scene,
|
||||
bool uvedit_face_visible_nolocal(const struct Scene *scene, struct BMFace *efa);
|
||||
bool uvedit_face_visible_test(const struct Scene *scene,
|
||||
struct Object *obedit,
|
||||
struct Image *ima,
|
||||
struct BMFace *efa);
|
||||
bool uvedit_face_select_test(struct Scene *scene, struct BMFace *efa, const int cd_loop_uv_offset);
|
||||
bool uvedit_edge_select_test(struct Scene *scene, struct BMLoop *l, const int cd_loop_uv_offset);
|
||||
bool uvedit_uv_select_test(struct Scene *scene, struct BMLoop *l, const int cd_loop_uv_offset);
|
||||
bool uvedit_face_select_test(const struct Scene *scene,
|
||||
struct BMFace *efa,
|
||||
const int cd_loop_uv_offset);
|
||||
bool uvedit_edge_select_test(const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const int cd_loop_uv_offset);
|
||||
bool uvedit_uv_select_test(const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const int cd_loop_uv_offset);
|
||||
/* uv face */
|
||||
bool uvedit_face_select_set(struct Scene *scene,
|
||||
bool uvedit_face_select_set(const struct Scene *scene,
|
||||
struct BMEditMesh *em,
|
||||
struct BMFace *efa,
|
||||
const bool select,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset);
|
||||
bool uvedit_face_select_enable(struct Scene *scene,
|
||||
bool uvedit_face_select_enable(const struct Scene *scene,
|
||||
struct BMEditMesh *em,
|
||||
struct BMFace *efa,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset);
|
||||
bool uvedit_face_select_disable(struct Scene *scene,
|
||||
bool uvedit_face_select_disable(const struct Scene *scene,
|
||||
struct BMEditMesh *em,
|
||||
struct BMFace *efa,
|
||||
const int cd_loop_uv_offset);
|
||||
/* uv edge */
|
||||
void uvedit_edge_select_set(struct BMEditMesh *em,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const bool select,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset);
|
||||
void uvedit_edge_select_enable(struct BMEditMesh *em,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset);
|
||||
void uvedit_edge_select_disable(struct BMEditMesh *em,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const int cd_loop_uv_offset);
|
||||
/* uv vert */
|
||||
void uvedit_uv_select_set(struct BMEditMesh *em,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const bool select,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset);
|
||||
void uvedit_uv_select_enable(struct BMEditMesh *em,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset);
|
||||
void uvedit_uv_select_disable(struct BMEditMesh *em,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
struct BMLoop *l,
|
||||
const int cd_loop_uv_offset);
|
||||
|
||||
bool ED_uvedit_nearest_uv(struct Scene *scene,
|
||||
bool ED_uvedit_nearest_uv(const struct Scene *scene,
|
||||
struct Object *obedit,
|
||||
struct Image *ima,
|
||||
const float co[2],
|
||||
float *dist_sq,
|
||||
float r_uv[2]);
|
||||
bool ED_uvedit_nearest_uv_multi(struct Scene *scene,
|
||||
bool ED_uvedit_nearest_uv_multi(const struct Scene *scene,
|
||||
struct Image *ima,
|
||||
struct Object **objects,
|
||||
const uint objects_len,
|
||||
|
@ -164,20 +174,20 @@ bool ED_uvedit_nearest_uv_multi(struct Scene *scene,
|
|||
float r_uv[2]);
|
||||
|
||||
void ED_uvedit_get_aspect(
|
||||
struct Scene *scene, struct Object *ob, struct BMesh *em, float *aspx, float *aspy);
|
||||
const struct Scene *scene, struct Object *ob, struct BMesh *em, float *aspx, float *aspy);
|
||||
|
||||
/* uvedit_unwrap_ops.c */
|
||||
void ED_uvedit_live_unwrap_begin(struct Scene *scene, struct Object *obedit);
|
||||
void ED_uvedit_live_unwrap_re_solve(void);
|
||||
void ED_uvedit_live_unwrap_end(short cancel);
|
||||
|
||||
void ED_uvedit_live_unwrap(struct Scene *scene, struct Object **objects, int objects_len);
|
||||
void ED_uvedit_add_simple_uvs(struct Main *bmain, struct Scene *scene, struct Object *ob);
|
||||
void ED_uvedit_live_unwrap(const struct Scene *scene, struct Object **objects, int objects_len);
|
||||
void ED_uvedit_add_simple_uvs(struct Main *bmain, const struct Scene *scene, struct Object *ob);
|
||||
|
||||
/* uvedit_draw.c */
|
||||
void ED_image_draw_cursor(struct ARegion *ar, const float cursor[2]);
|
||||
void ED_uvedit_draw_main(struct SpaceImage *sima,
|
||||
struct Scene *scene,
|
||||
const struct Scene *scene,
|
||||
struct ViewLayer *view_layer,
|
||||
struct Object *obedit,
|
||||
struct Object *obact,
|
||||
|
|
|
@ -217,7 +217,7 @@ static void uvedit_get_batches(Object *ob,
|
|||
}
|
||||
|
||||
static void draw_uvs_shadow(SpaceImage *UNUSED(sima),
|
||||
Scene *scene,
|
||||
const Scene *scene,
|
||||
Object *obedit,
|
||||
Depsgraph *depsgraph)
|
||||
{
|
||||
|
@ -237,11 +237,11 @@ static void draw_uvs_shadow(SpaceImage *UNUSED(sima),
|
|||
}
|
||||
}
|
||||
|
||||
static void draw_uvs_texpaint(Scene *scene, Object *ob, Depsgraph *depsgraph)
|
||||
static void draw_uvs_texpaint(const Scene *scene, Object *ob, Depsgraph *depsgraph)
|
||||
{
|
||||
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
|
||||
Mesh *me = ob_eval->data;
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
float col[4];
|
||||
UI_GetThemeColor4fv(TH_UV_SHADOW, col);
|
||||
|
||||
|
@ -296,7 +296,7 @@ static void draw_uvs_texpaint(Scene *scene, Object *ob, Depsgraph *depsgraph)
|
|||
|
||||
/* draws uv's in the image space */
|
||||
static void draw_uvs(SpaceImage *sima,
|
||||
Scene *scene,
|
||||
const Scene *scene,
|
||||
Depsgraph *depsgraph,
|
||||
UVEditGPUBatches *batch,
|
||||
float tot_area_ratio,
|
||||
|
@ -496,7 +496,7 @@ static void draw_uv_shadows_get(
|
|||
}
|
||||
|
||||
void ED_uvedit_draw_main(SpaceImage *sima,
|
||||
Scene *scene,
|
||||
const Scene *scene,
|
||||
ViewLayer *view_layer,
|
||||
Object *obedit,
|
||||
Object *obact,
|
||||
|
|
|
@ -274,7 +274,7 @@ bool uvedit_face_visible_nolocal_ex(const ToolSettings *ts, BMFace *efa)
|
|||
return (BM_elem_flag_test(efa, BM_ELEM_HIDDEN) == 0 && BM_elem_flag_test(efa, BM_ELEM_SELECT));
|
||||
}
|
||||
}
|
||||
bool uvedit_face_visible_nolocal(Scene *scene, BMFace *efa)
|
||||
bool uvedit_face_visible_nolocal(const Scene *scene, BMFace *efa)
|
||||
{
|
||||
return uvedit_face_visible_nolocal_ex(scene->toolsettings, efa);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ bool uvedit_face_visible_test_ex(const ToolSettings *ts, Object *obedit, Image *
|
|||
return uvedit_face_visible_nolocal_ex(ts, efa);
|
||||
}
|
||||
}
|
||||
bool uvedit_face_visible_test(Scene *scene, Object *obedit, Image *ima, BMFace *efa)
|
||||
bool uvedit_face_visible_test(const Scene *scene, Object *obedit, Image *ima, BMFace *efa)
|
||||
{
|
||||
return uvedit_face_visible_test_ex(scene->toolsettings, obedit, ima, efa);
|
||||
}
|
||||
|
@ -315,12 +315,12 @@ bool uvedit_face_select_test_ex(const ToolSettings *ts, BMFace *efa, const int c
|
|||
return true;
|
||||
}
|
||||
}
|
||||
bool uvedit_face_select_test(Scene *scene, BMFace *efa, const int cd_loop_uv_offset)
|
||||
bool uvedit_face_select_test(const Scene *scene, BMFace *efa, const int cd_loop_uv_offset)
|
||||
{
|
||||
return uvedit_face_select_test_ex(scene->toolsettings, efa, cd_loop_uv_offset);
|
||||
}
|
||||
|
||||
bool uvedit_face_select_set(struct Scene *scene,
|
||||
bool uvedit_face_select_set(const struct Scene *scene,
|
||||
struct BMEditMesh *em,
|
||||
struct BMFace *efa,
|
||||
const bool select,
|
||||
|
@ -335,10 +335,13 @@ bool uvedit_face_select_set(struct Scene *scene,
|
|||
}
|
||||
}
|
||||
|
||||
bool uvedit_face_select_enable(
|
||||
Scene *scene, BMEditMesh *em, BMFace *efa, const bool do_history, const int cd_loop_uv_offset)
|
||||
bool uvedit_face_select_enable(const Scene *scene,
|
||||
BMEditMesh *em,
|
||||
BMFace *efa,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset)
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||
BM_face_select_set(em->bm, efa, true);
|
||||
|
@ -362,12 +365,12 @@ bool uvedit_face_select_enable(
|
|||
return false;
|
||||
}
|
||||
|
||||
bool uvedit_face_select_disable(Scene *scene,
|
||||
bool uvedit_face_select_disable(const Scene *scene,
|
||||
BMEditMesh *em,
|
||||
BMFace *efa,
|
||||
const int cd_loop_uv_offset)
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||
BM_face_select_set(em->bm, efa, false);
|
||||
|
@ -411,13 +414,13 @@ bool uvedit_edge_select_test_ex(const ToolSettings *ts, BMLoop *l, const int cd_
|
|||
return (luv1->flag & MLOOPUV_VERTSEL) && (luv2->flag & MLOOPUV_VERTSEL);
|
||||
}
|
||||
}
|
||||
bool uvedit_edge_select_test(Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
|
||||
bool uvedit_edge_select_test(const Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
|
||||
{
|
||||
return uvedit_edge_select_test_ex(scene->toolsettings, l, cd_loop_uv_offset);
|
||||
}
|
||||
|
||||
void uvedit_edge_select_set(BMEditMesh *em,
|
||||
Scene *scene,
|
||||
const Scene *scene,
|
||||
BMLoop *l,
|
||||
const bool select,
|
||||
const bool do_history,
|
||||
|
@ -432,11 +435,14 @@ void uvedit_edge_select_set(BMEditMesh *em,
|
|||
}
|
||||
}
|
||||
|
||||
void uvedit_edge_select_enable(
|
||||
BMEditMesh *em, Scene *scene, BMLoop *l, const bool do_history, const int cd_loop_uv_offset)
|
||||
void uvedit_edge_select_enable(BMEditMesh *em,
|
||||
const Scene *scene,
|
||||
BMLoop *l,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset)
|
||||
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||
if (ts->selectmode & SCE_SELECT_FACE) {
|
||||
|
@ -466,12 +472,12 @@ void uvedit_edge_select_enable(
|
|||
}
|
||||
|
||||
void uvedit_edge_select_disable(BMEditMesh *em,
|
||||
Scene *scene,
|
||||
const Scene *scene,
|
||||
BMLoop *l,
|
||||
const int cd_loop_uv_offset)
|
||||
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||
if (ts->selectmode & SCE_SELECT_FACE) {
|
||||
|
@ -511,13 +517,13 @@ bool uvedit_uv_select_test_ex(const ToolSettings *ts, BMLoop *l, const int cd_lo
|
|||
return (luv->flag & MLOOPUV_VERTSEL) != 0;
|
||||
}
|
||||
}
|
||||
bool uvedit_uv_select_test(Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
|
||||
bool uvedit_uv_select_test(const Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
|
||||
{
|
||||
return uvedit_uv_select_test_ex(scene->toolsettings, l, cd_loop_uv_offset);
|
||||
}
|
||||
|
||||
void uvedit_uv_select_set(BMEditMesh *em,
|
||||
Scene *scene,
|
||||
const Scene *scene,
|
||||
BMLoop *l,
|
||||
const bool select,
|
||||
const bool do_history,
|
||||
|
@ -531,10 +537,13 @@ void uvedit_uv_select_set(BMEditMesh *em,
|
|||
}
|
||||
}
|
||||
|
||||
void uvedit_uv_select_enable(
|
||||
BMEditMesh *em, Scene *scene, BMLoop *l, const bool do_history, const int cd_loop_uv_offset)
|
||||
void uvedit_uv_select_enable(BMEditMesh *em,
|
||||
const Scene *scene,
|
||||
BMLoop *l,
|
||||
const bool do_history,
|
||||
const int cd_loop_uv_offset)
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||
if (ts->selectmode & SCE_SELECT_FACE) {
|
||||
|
@ -554,9 +563,12 @@ void uvedit_uv_select_enable(
|
|||
}
|
||||
}
|
||||
|
||||
void uvedit_uv_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l, const int cd_loop_uv_offset)
|
||||
void uvedit_uv_select_disable(BMEditMesh *em,
|
||||
const Scene *scene,
|
||||
BMLoop *l,
|
||||
const int cd_loop_uv_offset)
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||
if (ts->selectmode & SCE_SELECT_FACE) {
|
||||
|
@ -618,7 +630,7 @@ void uv_poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float as
|
|||
}
|
||||
}
|
||||
|
||||
bool ED_uvedit_minmax_multi(Scene *scene,
|
||||
bool ED_uvedit_minmax_multi(const Scene *scene,
|
||||
Image *ima,
|
||||
Object **objects_edit,
|
||||
uint objects_len,
|
||||
|
@ -656,7 +668,8 @@ bool ED_uvedit_minmax_multi(Scene *scene,
|
|||
return changed;
|
||||
}
|
||||
|
||||
bool ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float r_min[2], float r_max[2])
|
||||
bool ED_uvedit_minmax(
|
||||
const Scene *scene, Image *ima, Object *obedit, float r_min[2], float r_max[2])
|
||||
{
|
||||
return ED_uvedit_minmax_multi(scene, ima, &obedit, 1, r_min, r_max);
|
||||
}
|
||||
|
@ -680,7 +693,7 @@ void ED_uvedit_select_all(BMesh *bm)
|
|||
}
|
||||
|
||||
static bool ED_uvedit_median_multi(
|
||||
Scene *scene, Image *ima, Object **objects_edit, uint objects_len, float co[2])
|
||||
const Scene *scene, Image *ima, Object **objects_edit, uint objects_len, float co[2])
|
||||
{
|
||||
unsigned int sel = 0;
|
||||
zero_v2(co);
|
||||
|
@ -724,8 +737,12 @@ static bool UNUSED_FUNCTION(ED_uvedit_median)(Scene *scene,
|
|||
return ED_uvedit_median_multi(scene, ima, &obedit, 1, co);
|
||||
}
|
||||
|
||||
bool ED_uvedit_center_multi(
|
||||
Scene *scene, Image *ima, Object **objects_edit, uint objects_len, float cent[2], char mode)
|
||||
bool ED_uvedit_center_multi(const Scene *scene,
|
||||
Image *ima,
|
||||
Object **objects_edit,
|
||||
uint objects_len,
|
||||
float cent[2],
|
||||
char mode)
|
||||
{
|
||||
bool changed = false;
|
||||
|
||||
|
@ -745,7 +762,7 @@ bool ED_uvedit_center_multi(
|
|||
return changed;
|
||||
}
|
||||
|
||||
bool ED_uvedit_center(Scene *scene, Image *ima, Object *obedit, float cent[2], char mode)
|
||||
bool ED_uvedit_center(const Scene *scene, Image *ima, Object *obedit, float cent[2], char mode)
|
||||
{
|
||||
return ED_uvedit_center_multi(scene, ima, &obedit, 1, cent, mode);
|
||||
}
|
||||
|
@ -976,8 +993,12 @@ bool uv_find_nearest_vert_multi(Scene *scene,
|
|||
return found;
|
||||
}
|
||||
|
||||
bool ED_uvedit_nearest_uv(
|
||||
Scene *scene, Object *obedit, Image *ima, const float co[2], float *dist_sq, float r_uv[2])
|
||||
bool ED_uvedit_nearest_uv(const Scene *scene,
|
||||
Object *obedit,
|
||||
Image *ima,
|
||||
const float co[2],
|
||||
float *dist_sq,
|
||||
float r_uv[2])
|
||||
{
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMIter iter;
|
||||
|
@ -1011,7 +1032,7 @@ bool ED_uvedit_nearest_uv(
|
|||
}
|
||||
}
|
||||
|
||||
bool ED_uvedit_nearest_uv_multi(Scene *scene,
|
||||
bool ED_uvedit_nearest_uv_multi(const Scene *scene,
|
||||
Image *ima,
|
||||
Object **objects,
|
||||
const uint objects_len,
|
||||
|
@ -1472,7 +1493,7 @@ static int uv_select_more_less(bContext *C, const bool select)
|
|||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
BMIter iter, liter;
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
uint objects_len = 0;
|
||||
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(
|
||||
|
@ -1639,7 +1660,7 @@ static void uv_weld_align(bContext *C, eUVWeldAlign tool)
|
|||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
float cent[2], min[2], max[2];
|
||||
|
||||
|
@ -1952,7 +1973,7 @@ static int uv_remove_doubles_to_selected(bContext *C, wmOperator *op)
|
|||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
const float threshold = RNA_float_get(op->ptr, "threshold");
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
|
@ -2097,7 +2118,7 @@ static int uv_remove_doubles_to_unselected(bContext *C, wmOperator *op)
|
|||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
const float threshold = RNA_float_get(op->ptr, "threshold");
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
|
@ -2271,7 +2292,7 @@ static void UV_OT_weld(wmOperatorType *ot)
|
|||
|
||||
static bool uv_select_is_any_selected(Scene *scene, Image *ima, Object *obedit)
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -2316,7 +2337,7 @@ static bool uv_select_is_any_selected_multi(Scene *scene,
|
|||
|
||||
static void uv_select_all_perform(Scene *scene, Image *ima, Object *obedit, int action)
|
||||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -2389,7 +2410,7 @@ static int uv_select_all_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
|
||||
|
@ -2470,7 +2491,7 @@ static int uv_mouse_select_multi(bContext *C,
|
|||
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
|
||||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -2905,7 +2926,7 @@ static int uv_select_linked_internal(bContext *C, wmOperator *op, const wmEvent
|
|||
{
|
||||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
float limit[2];
|
||||
|
@ -3078,7 +3099,7 @@ static int uv_select_split_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
|
||||
BMFace *efa;
|
||||
|
@ -3163,7 +3184,7 @@ static void UV_OT_select_split(wmOperatorType *ot)
|
|||
ot->poll = ED_operator_uvedit; /* requires space image */
|
||||
}
|
||||
|
||||
static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short select)
|
||||
static void uv_select_sync_flush(const ToolSettings *ts, BMEditMesh *em, const short select)
|
||||
{
|
||||
/* bmesh API handles flushing but not on de-select */
|
||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||
|
@ -3278,7 +3299,7 @@ static void uv_select_flush_from_tag_face(SpaceImage *sima,
|
|||
* This only needs to be done when the Mesh is not used for
|
||||
* selection (so for sticky modes, vertex or location based). */
|
||||
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -3364,7 +3385,7 @@ static void uv_select_flush_from_tag_loop(SpaceImage *sima,
|
|||
* This only needs to be done when the Mesh is not used for
|
||||
* selection (so for sticky modes, vertex or location based). */
|
||||
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -3443,7 +3464,7 @@ static int uv_box_select_exec(bContext *C, wmOperator *op)
|
|||
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
|
||||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
|
@ -3603,7 +3624,7 @@ static int uv_circle_select_exec(bContext *C, wmOperator *op)
|
|||
Image *ima = CTX_data_edit_image(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -3743,7 +3764,7 @@ static bool do_lasso_select_mesh_uv(bContext *C,
|
|||
Image *ima = CTX_data_edit_image(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
const bool use_face_center = ((ts->uv_flag & UV_SYNC_SELECTION) ?
|
||||
(ts->selectmode == SCE_SELECT_FACE) :
|
||||
|
@ -4119,7 +4140,7 @@ static int uv_snap_selection_exec(bContext *C, wmOperator *op)
|
|||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
const int target = RNA_enum_get(op->ptr, "target");
|
||||
float offset[2] = {0};
|
||||
|
@ -4214,7 +4235,7 @@ static int uv_pin_exec(bContext *C, wmOperator *op)
|
|||
BMLoop *l;
|
||||
BMIter iter, liter;
|
||||
MLoopUV *luv;
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
const bool clear = RNA_boolean_get(op->ptr, "clear");
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
|
||||
|
@ -4291,7 +4312,7 @@ static int uv_select_pinned_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
{
|
||||
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
Image *ima = CTX_data_edit_image(C);
|
||||
BMFace *efa;
|
||||
|
@ -4622,7 +4643,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
|
|||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -4745,7 +4766,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op)
|
|||
SpaceImage *sima = CTX_wm_space_image(C);
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -5098,7 +5119,7 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
BMFace *efa;
|
||||
BMLoop *loop;
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
#include "uvedit_intern.h"
|
||||
#include "uvedit_parametrizer.h"
|
||||
|
||||
static void modifier_unwrap_state(Object *obedit, Scene *scene, bool *r_use_subsurf)
|
||||
static void modifier_unwrap_state(Object *obedit, const Scene *scene, bool *r_use_subsurf)
|
||||
{
|
||||
ModifierData *md;
|
||||
bool subsurf = (scene->toolsettings->uvcalc_flag & UVCALC_USESUBSURF) != 0;
|
||||
|
@ -95,7 +95,7 @@ static void modifier_unwrap_state(Object *obedit, Scene *scene, bool *r_use_subs
|
|||
*r_use_subsurf = subsurf;
|
||||
}
|
||||
|
||||
static bool ED_uvedit_ensure_uvs(bContext *C, Scene *UNUSED(scene), Object *obedit)
|
||||
static bool ED_uvedit_ensure_uvs(bContext *C, const Scene *UNUSED(scene), Object *obedit)
|
||||
{
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
BMFace *efa;
|
||||
|
@ -168,7 +168,7 @@ typedef struct UnwrapOptions {
|
|||
bool correct_aspect; /* Correct for mapped image texture aspect ratio. */
|
||||
} UnwrapOptions;
|
||||
|
||||
static bool uvedit_have_selection(Scene *scene, BMEditMesh *em, const UnwrapOptions *options)
|
||||
static bool uvedit_have_selection(const Scene *scene, BMEditMesh *em, const UnwrapOptions *options)
|
||||
{
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
@ -207,7 +207,7 @@ static bool uvedit_have_selection(Scene *scene, BMEditMesh *em, const UnwrapOpti
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool uvedit_have_selection_multi(Scene *scene,
|
||||
static bool uvedit_have_selection_multi(const Scene *scene,
|
||||
Object **objects,
|
||||
const uint objects_len,
|
||||
const UnwrapOptions *options)
|
||||
|
@ -224,7 +224,8 @@ static bool uvedit_have_selection_multi(Scene *scene,
|
|||
return have_select;
|
||||
}
|
||||
|
||||
void ED_uvedit_get_aspect(Scene *UNUSED(scene), Object *ob, BMesh *bm, float *aspx, float *aspy)
|
||||
void ED_uvedit_get_aspect(
|
||||
const Scene *UNUSED(scene), Object *ob, BMesh *bm, float *aspx, float *aspy)
|
||||
{
|
||||
bool sloppy = true;
|
||||
bool selected = false;
|
||||
|
@ -244,8 +245,11 @@ void ED_uvedit_get_aspect(Scene *UNUSED(scene), Object *ob, BMesh *bm, float *as
|
|||
}
|
||||
}
|
||||
|
||||
static void construct_param_handle_face_add(
|
||||
ParamHandle *handle, Scene *scene, BMFace *efa, int face_index, const int cd_loop_uv_offset)
|
||||
static void construct_param_handle_face_add(ParamHandle *handle,
|
||||
const Scene *scene,
|
||||
BMFace *efa,
|
||||
int face_index,
|
||||
const int cd_loop_uv_offset)
|
||||
{
|
||||
ParamKey key;
|
||||
ParamKey *vkeys = BLI_array_alloca(vkeys, efa->len);
|
||||
|
@ -276,7 +280,7 @@ static void construct_param_handle_face_add(
|
|||
}
|
||||
|
||||
/* See: construct_param_handle_multi to handle multiple objects at once. */
|
||||
static ParamHandle *construct_param_handle(Scene *scene,
|
||||
static ParamHandle *construct_param_handle(const Scene *scene,
|
||||
Object *ob,
|
||||
BMesh *bm,
|
||||
const UnwrapOptions *options)
|
||||
|
@ -348,7 +352,7 @@ static ParamHandle *construct_param_handle(Scene *scene,
|
|||
/**
|
||||
* Version of #construct_param_handle_single that handles multiple objects.
|
||||
*/
|
||||
static ParamHandle *construct_param_handle_multi(Scene *scene,
|
||||
static ParamHandle *construct_param_handle_multi(const Scene *scene,
|
||||
Object **objects,
|
||||
const uint objects_len,
|
||||
const UnwrapOptions *options)
|
||||
|
@ -437,7 +441,7 @@ static void texface_from_original_index(BMFace *efa,
|
|||
float **uv,
|
||||
ParamBool *pin,
|
||||
ParamBool *select,
|
||||
Scene *scene,
|
||||
const Scene *scene,
|
||||
const int cd_loop_uv_offset)
|
||||
{
|
||||
BMLoop *l;
|
||||
|
@ -468,7 +472,7 @@ static void texface_from_original_index(BMFace *efa,
|
|||
* The many modifications required to make the original function(see above)
|
||||
* work justified the existence of a new function.
|
||||
*/
|
||||
static ParamHandle *construct_param_handle_subsurfed(Scene *scene,
|
||||
static ParamHandle *construct_param_handle_subsurfed(const Scene *scene,
|
||||
Object *ob,
|
||||
BMEditMesh *em,
|
||||
const UnwrapOptions *options)
|
||||
|
@ -656,7 +660,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene,
|
|||
/* ******************** Minimize Stretch operator **************** */
|
||||
|
||||
typedef struct MinStretch {
|
||||
Scene *scene;
|
||||
const Scene *scene;
|
||||
Object **objects_edit;
|
||||
uint objects_len;
|
||||
ParamHandle *handle;
|
||||
|
@ -668,7 +672,7 @@ typedef struct MinStretch {
|
|||
|
||||
static bool minimize_stretch_init(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
|
||||
const UnwrapOptions options = {
|
||||
|
@ -711,7 +715,7 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, bool interac
|
|||
{
|
||||
MinStretch *ms = op->customdata;
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
|
||||
|
@ -752,7 +756,7 @@ static void minimize_stretch_exit(bContext *C, wmOperator *op, bool cancel)
|
|||
{
|
||||
MinStretch *ms = op->customdata;
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
|
||||
|
@ -928,7 +932,7 @@ void UV_OT_minimize_stretch(wmOperatorType *ot)
|
|||
|
||||
/* ******************** Pack Islands operator **************** */
|
||||
|
||||
static void uvedit_pack_islands(Scene *scene, Object *ob, BMesh *bm)
|
||||
static void uvedit_pack_islands(const Scene *scene, Object *ob, BMesh *bm)
|
||||
{
|
||||
const UnwrapOptions options = {
|
||||
.topology_from_uvs = true,
|
||||
|
@ -947,7 +951,7 @@ static void uvedit_pack_islands(Scene *scene, Object *ob, BMesh *bm)
|
|||
param_delete(handle);
|
||||
}
|
||||
|
||||
static void uvedit_pack_islands_multi(Scene *scene,
|
||||
static void uvedit_pack_islands_multi(const Scene *scene,
|
||||
Object **objects,
|
||||
const uint objects_len,
|
||||
const UnwrapOptions *options,
|
||||
|
@ -970,7 +974,7 @@ static void uvedit_pack_islands_multi(Scene *scene,
|
|||
static int pack_islands_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
|
||||
const UnwrapOptions options = {
|
||||
.topology_from_uvs = true,
|
||||
|
@ -1028,7 +1032,7 @@ void UV_OT_pack_islands(wmOperatorType *ot)
|
|||
|
||||
static int average_islands_scale_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const bool synced_selection = (ts->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
|
@ -1200,8 +1204,12 @@ static void uv_map_transform_calc_center_median(BMEditMesh *em, float r_center[3
|
|||
mul_v3_fl(r_center, 1.0f / (float)center_accum_num);
|
||||
}
|
||||
|
||||
static void uv_map_transform_center(
|
||||
Scene *scene, View3D *v3d, Object *ob, BMEditMesh *em, float r_center[3], float r_bounds[2][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])
|
||||
{
|
||||
/* only operates on the edit object - this is all that's needed now */
|
||||
const int around = (v3d) ? scene->toolsettings->transform_pivot_point : V3D_AROUND_CENTER_BOUNDS;
|
||||
|
@ -1395,7 +1403,7 @@ static void uv_transform_properties(wmOperatorType *ot, int radius)
|
|||
}
|
||||
}
|
||||
|
||||
static void correct_uv_aspect(Scene *scene, Object *ob, BMEditMesh *em)
|
||||
static void correct_uv_aspect(const Scene *scene, Object *ob, BMEditMesh *em)
|
||||
{
|
||||
BMLoop *l;
|
||||
BMIter iter, liter;
|
||||
|
@ -1462,7 +1470,7 @@ static void uv_map_clip_correct_properties(wmOperatorType *ot)
|
|||
"Scale UV coordinates to bounds after unwrapping");
|
||||
}
|
||||
|
||||
static void uv_map_clip_correct_multi(Scene *scene,
|
||||
static void uv_map_clip_correct_multi(const Scene *scene,
|
||||
Object **objects,
|
||||
uint objects_len,
|
||||
wmOperator *op)
|
||||
|
@ -1552,7 +1560,7 @@ static void uv_map_clip_correct_multi(Scene *scene,
|
|||
}
|
||||
}
|
||||
|
||||
static void uv_map_clip_correct(Scene *scene, Object *ob, wmOperator *op)
|
||||
static void uv_map_clip_correct(const Scene *scene, Object *ob, wmOperator *op)
|
||||
{
|
||||
uv_map_clip_correct_multi(scene, &ob, 1, op);
|
||||
}
|
||||
|
@ -1560,7 +1568,7 @@ static void uv_map_clip_correct(Scene *scene, Object *ob, wmOperator *op)
|
|||
/* ******************** Unwrap operator **************** */
|
||||
|
||||
/* Assumes UV Map exists, doesn't run update funcs. */
|
||||
static void uvedit_unwrap(Scene *scene, Object *obedit, const UnwrapOptions *options)
|
||||
static void uvedit_unwrap(const Scene *scene, Object *obedit, const UnwrapOptions *options)
|
||||
{
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
if (!CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) {
|
||||
|
@ -1589,7 +1597,7 @@ static void uvedit_unwrap(Scene *scene, Object *obedit, const UnwrapOptions *opt
|
|||
param_delete(handle);
|
||||
}
|
||||
|
||||
static void uvedit_unwrap_multi(Scene *scene,
|
||||
static void uvedit_unwrap_multi(const Scene *scene,
|
||||
Object **objects,
|
||||
const int objects_len,
|
||||
const UnwrapOptions *options)
|
||||
|
@ -1602,7 +1610,7 @@ static void uvedit_unwrap_multi(Scene *scene,
|
|||
}
|
||||
}
|
||||
|
||||
void ED_uvedit_live_unwrap(Scene *scene, Object **objects, int objects_len)
|
||||
void ED_uvedit_live_unwrap(const Scene *scene, Object **objects, int objects_len)
|
||||
{
|
||||
if (scene->toolsettings->edge_mode_live_unwrap) {
|
||||
const UnwrapOptions options = {
|
||||
|
@ -1628,7 +1636,7 @@ enum {
|
|||
static int unwrap_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
int method = RNA_enum_get(op->ptr, "method");
|
||||
const bool use_subsurf = RNA_boolean_get(op->ptr, "use_subsurf_data");
|
||||
int reported_errors = 0;
|
||||
|
@ -1823,7 +1831,7 @@ static int uv_from_view_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
|
|||
static int uv_from_view_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
RegionView3D *rv3d = CTX_wm_region_view3d(C);
|
||||
|
@ -1987,7 +1995,7 @@ void UV_OT_project_from_view(wmOperatorType *ot)
|
|||
|
||||
static int reset_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
|
||||
|
@ -2087,7 +2095,7 @@ static void uv_map_mirror(BMEditMesh *em, BMFace *efa)
|
|||
|
||||
static int sphere_project_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
|
@ -2181,7 +2189,7 @@ static void uv_cylinder_project(float target[2],
|
|||
|
||||
static int cylinder_project_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
|
@ -2298,7 +2306,7 @@ static void uvedit_unwrap_cube_project(BMesh *bm,
|
|||
|
||||
static int cube_project_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
|
||||
PropertyRNA *prop_cube_size = RNA_struct_find_property(op->ptr, "cube_size");
|
||||
|
@ -2384,7 +2392,7 @@ void UV_OT_cube_project(wmOperatorType *ot)
|
|||
|
||||
/************************* Simple UVs for texture painting *****************/
|
||||
|
||||
void ED_uvedit_add_simple_uvs(Main *bmain, Scene *scene, Object *ob)
|
||||
void ED_uvedit_add_simple_uvs(Main *bmain, const Scene *scene, Object *ob)
|
||||
{
|
||||
Mesh *me = ob->data;
|
||||
bool sync_selection = (scene->toolsettings->uv_flag & UV_SYNC_SELECTION) != 0;
|
||||
|
|
Loading…
Reference in New Issue