Merge branch 'blender-v2.90-release'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user