Merge branch 'blender-v2.90-release'

This commit is contained in:
Julian Eisel
2020-08-05 19:41:04 +02:00
6 changed files with 16 additions and 7 deletions

View File

@@ -90,5 +90,5 @@ void main()
packed_rough_metal = workbench_float_pair_encode(roughness, metallic);
#endif
object_id = int((uint(resource_id) + 1u) & 0xFFu);
object_id = int(uint(resource_handle) & 0xFFFFu) + 1;
}

View File

@@ -34,5 +34,5 @@ void main()
packed_rough_metal = workbench_float_pair_encode(roughness, metallic);
#endif
object_id = int((uint(resource_id) + 1u) & 0xFFu);
object_id = int(uint(resource_handle) & 0xFFFFu) + 1;
}

View File

@@ -36,5 +36,5 @@ void main()
packed_rough_metal = workbench_float_pair_encode(roughness, metallic);
#endif
object_id = int((uint(resource_id) + 1u) & 0xFFu);
object_id = int(uint(resource_handle) & 0xFFFFu) + 1;
}

View File

@@ -231,15 +231,15 @@ DRWShadingGroup *workbench_material_setup_ex(WORKBENCH_PrivateData *wpd,
workbench_material_ubo_data(wpd, ob, NULL, &wpd->material_ubo_data_curr[mat_id], color_type);
const bool transp = wpd->shading.xray_alpha < 1.0f || ob->color[3] < 1.0f;
DRWShadingGroup *grp = wpd->prepass[transp][infront][datatype].common_shgrp;
DRWShadingGroup **grp = &wpd->prepass[transp][infront][datatype].common_shgrp;
if (resource_changed) {
grp = DRW_shgroup_create_sub(grp);
DRW_shgroup_uniform_block(grp, "material_block", wpd->material_ubo_curr);
*grp = DRW_shgroup_create_sub(*grp);
DRW_shgroup_uniform_block(*grp, "material_block", wpd->material_ubo_curr);
}
if (r_transp && transp) {
*r_transp = true;
}
return grp;
return *grp;
}
}
}

View File

@@ -892,6 +892,12 @@ bool UI_but_active_only_ex(
}
}
if ((activate == true) || (found == false)) {
/* There might still be another active button. */
uiBut *old_active = ui_region_find_active_but(region);
if (old_active) {
ui_but_active_free(C, old_active);
}
ui_but_activate_event((bContext *)C, region, but);
}
else if ((found == true) && (isactive == false)) {

View File

@@ -8001,6 +8001,9 @@ static void button_activate_init(bContext *C,
{
uiHandleButtonData *data;
/* Only ever one active button! */
BLI_assert(ui_region_find_active_but(region) == NULL);
/* setup struct */
data = MEM_callocN(sizeof(uiHandleButtonData), "uiHandleButtonData");
data->wm = CTX_wm_manager(C);