[Bf-blender-cvs] [405b08e00da] master: Fix: Workbench Next: Ensure matcaps textures are loaded

Miguel Pozo noreply at git.blender.org
Wed Jan 25 17:12:42 CET 2023


Commit: 405b08e00da6841e27739573e85240ba30c3633f
Author: Miguel Pozo
Date:   Wed Jan 25 17:12:14 2023 +0100
Branches: master
https://developer.blender.org/rB405b08e00da6841e27739573e85240ba30c3633f

Fix: Workbench Next: Ensure matcaps textures are loaded

===================================================================

M	source/blender/draw/engines/workbench/workbench_resources.cc

===================================================================

diff --git a/source/blender/draw/engines/workbench/workbench_resources.cc b/source/blender/draw/engines/workbench/workbench_resources.cc
index d33b57b943e..25a2b284c40 100644
--- a/source/blender/draw/engines/workbench/workbench_resources.cc
+++ b/source/blender/draw/engines/workbench/workbench_resources.cc
@@ -8,8 +8,11 @@
 
 namespace blender::workbench {
 
-static bool get_matcap_tx(Texture &matcap_tx, const StudioLight &studio_light)
+static bool get_matcap_tx(Texture &matcap_tx, StudioLight &studio_light)
 {
+  BKE_studiolight_ensure_flag(&studio_light,
+                              STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE |
+                                  STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE);
   ImBuf *matcap_diffuse = studio_light.matcap_diffuse.ibuf;
   ImBuf *matcap_specular = studio_light.matcap_specular.ibuf;
   if (matcap_diffuse && matcap_diffuse->rect_float) {



More information about the Bf-blender-cvs mailing list