File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1616from PIL import Image
1717from pyrr import Matrix44
1818
19+ from hexdoc .utils .logging import TRACE
1920from hexdoc .utils .types import Vec3 , Vec4
2021
2122from .camera import direction_camera
@@ -157,14 +158,16 @@ def render_block(
157158 assert len (extrema ) >= 4 , f"Expected 4 bands but got { len (extrema )} "
158159 min_alpha , _ = extrema [3 ]
159160 if min_alpha < 255 :
160- logger .debug ( f"Transparent texture: { name } ({ min_alpha = } )" )
161+ logger .log ( TRACE , f"Transparent texture: { name } ({ min_alpha = } )" )
161162 transparent_textures .add (name )
162163
163164 data = bytes ()
164165 for frame in texture .frames :
165166 data += frame .tobytes ()
166167
167- logger .debug (f"Texture array: { image .width = } , { frame_height = } , { layers = } " )
168+ logger .log (
169+ TRACE , f"Texture array: { image .width = } , { frame_height = } , { layers = } "
170+ )
168171 texture_array = self .ctx .texture_array (
169172 size = (image .width , frame_height , layers ),
170173 components = 4 ,
Original file line number Diff line number Diff line change 1515)
1616from hexdoc .core .resource import BaseResourceLocation
1717from hexdoc .utils import ValidationContext
18+ from hexdoc .utils .logging import TRACE
1819
1920from .model import BlockModel
2021from .renderer import ImageType , ModelRenderer
@@ -123,7 +124,7 @@ def render_texture(self, texture_id: ResourceLocation) -> URL:
123124
124125 def _load_model (self , model_id : ResourceLocation ) -> LoadedModel | BlockModel :
125126 if result := self ._model_cache .get (model_id ):
126- logger .debug ( f"Cache hit: { model_id } = { result } " )
127+ logger .log ( TRACE , f"Cache hit: { model_id } = { result } " )
127128 return result
128129
129130 try :
Original file line number Diff line number Diff line change 1414from hexdoc .core import ModResourceLoader , ResourceLocation
1515from hexdoc .core .properties import AnimatedTexturesProps
1616from hexdoc .utils import listify
17+ from hexdoc .utils .logging import TRACE
1718
1819from .model import Animation , AnimationFrame , AnimationMeta
1920
@@ -36,7 +37,7 @@ class ModelTexture:
3637 @classmethod
3738 def load (cls , loader : ModResourceLoader , texture_id : ResourceLocation | Path ):
3839 if cached := _TEXTURE_CACHE .get (texture_id ):
39- logger .debug ( f"Cache hit: { texture_id } " )
40+ logger .log ( TRACE , f"Cache hit: { texture_id } " )
4041 return cached
4142
4243 match texture_id :
You can’t perform that action at this time.
0 commit comments