Cleanup: style
This commit is contained in:
parent
851829c1fb
commit
3c9e2e82fa
Notes:
blender-bot
2023-02-14 06:47:29 +01:00
Referenced by issue #55547, Fit camera to selected does not work Referenced by issue #55341, ndof: SpaceNavigator 3D Mouse will crash Blender 2.80
|
@ -2875,8 +2875,7 @@ Mesh *BKE_object_get_pre_modified_mesh(Object *object)
|
|||
if (object->runtime.mesh_orig != NULL) {
|
||||
BLI_assert(object->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
||||
BLI_assert(object->id.orig_id != NULL);
|
||||
BLI_assert(object->runtime.mesh_orig->id.orig_id ==
|
||||
((Object*)object->id.orig_id)->data);
|
||||
BLI_assert(object->runtime.mesh_orig->id.orig_id == ((Object *)object->id.orig_id)->data);
|
||||
Mesh *result = object->runtime.mesh_orig;
|
||||
BLI_assert((result->id.tag & LIB_TAG_COPIED_ON_WRITE) != 0);
|
||||
BLI_assert((result->id.tag & LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT) == 0);
|
||||
|
@ -2900,7 +2899,7 @@ Mesh *BKE_object_get_original_mesh(Object *object)
|
|||
}
|
||||
else {
|
||||
BLI_assert((object->id.tag & LIB_TAG_COPIED_ON_WRITE) != 0);
|
||||
result = ((Object*)object->id.orig_id)->data;
|
||||
result = ((Object *)object->id.orig_id)->data;
|
||||
}
|
||||
BLI_assert(result != NULL);
|
||||
BLI_assert((result->id.tag & (LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT)) == 0);
|
||||
|
|
|
@ -586,15 +586,13 @@ static uint *studiolight_matcap_preview(StudioLight *sl, int icon_size)
|
|||
|
||||
uint *rect = MEM_mallocN(icon_size * icon_size * sizeof(uint), __func__);
|
||||
int offset = 0;
|
||||
ImBuf* ibuf = sl->equirectangular_radiance_buffer;
|
||||
for (int y= 0; y < icon_size; y ++)
|
||||
{
|
||||
for (int x = 0; x < icon_size; x ++)
|
||||
{
|
||||
ImBuf *ibuf = sl->equirectangular_radiance_buffer;
|
||||
for (int y = 0; y < icon_size; y++) {
|
||||
for (int x = 0; x < icon_size; x++) {
|
||||
uint pixelresult = 0x0;
|
||||
float fx = x * ibuf->x / icon_size;
|
||||
float fy = y * ibuf->y / icon_size;
|
||||
nearest_interpolation_color(ibuf, (unsigned char*)&pixelresult, NULL, fx, fy);
|
||||
nearest_interpolation_color(ibuf, (uchar *)&pixelresult, NULL, fx, fy);
|
||||
rect[offset++] = pixelresult;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,9 +16,12 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
|
|||
wpd->shading = v3d->shading;
|
||||
wpd->drawtype = v3d->drawtype;
|
||||
if (wpd->shading.light == V3D_LIGHTING_MATCAP) {
|
||||
wpd->studio_light = BKE_studiolight_find(wpd->shading.matcap, STUDIOLIGHT_ORIENTATION_VIEWNORMAL);
|
||||
} else {
|
||||
wpd->studio_light = BKE_studiolight_find(wpd->shading.studio_light, STUDIOLIGHT_ORIENTATION_CAMERA | STUDIOLIGHT_ORIENTATION_WORLD);
|
||||
wpd->studio_light = BKE_studiolight_find(
|
||||
wpd->shading.matcap, STUDIOLIGHT_ORIENTATION_VIEWNORMAL);
|
||||
}
|
||||
else {
|
||||
wpd->studio_light = BKE_studiolight_find(
|
||||
wpd->shading.studio_light, STUDIOLIGHT_ORIENTATION_CAMERA | STUDIOLIGHT_ORIENTATION_WORLD);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -3438,8 +3438,8 @@ static Gwn_VertBuf *mesh_batch_cache_create_edges_overlay_adj_texture_buf(MeshRe
|
|||
GWN_vertbuf_attr_set(vbo, index_id, vidx++, &value);
|
||||
|
||||
if (do_adjacency) {
|
||||
int v1 = mloop[mlt->tri[(e+1) % 3]].v;
|
||||
int v2 = mloop[mlt->tri[(e+2) % 3]].v;
|
||||
int v1 = mloop[mlt->tri[(e + 1) % 3]].v;
|
||||
int v2 = mloop[mlt->tri[(e + 2) % 3]].v;
|
||||
EdgeAdjacentVerts *eav = BLI_edgehash_lookup(eh, v0, v1);
|
||||
int adj_v;
|
||||
if (eav->vert_index[0] != v2) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 48736838d421447d5e4d67ccd59bf1d22dcc85d9
|
||||
Subproject commit fca325137b6ee2dfd0930ca87684ccf30703554f
|
Loading…
Reference in New Issue