Merge branch 'blender-v4.3-release'

This commit is contained in:
Julien Duroure
2024-10-31 15:13:20 +01:00
4 changed files with 19 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (4, 4, 11),
"version": (4, 4, 12),
'blender': (4, 3, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@@ -185,6 +185,16 @@ class ExportImage:
for fill in self.fills.values():
return fill.image
if self.__on_happy_path_udim():
# Store that this image is fully exported (used to export or not not used images)
for fill in self.fills.values():
export_settings['exported_images'][fill.image.name] = 1 # Fully used
break
for fill in self.fills.values():
return fill.image
return None
def __on_happy_path(self) -> bool:
@@ -421,6 +431,8 @@ class ExportImage:
return data
# We don't manage UDIM packed image, so this could not happen to be here
# Lets display an error
export_settings['log'].error("UDIM packed images are not supported for export. Please unpack them before exporting.")
def _encode_temp_image(tmp_image: bpy.types.Image, file_format: str, export_settings) -> bytes:

View File

@@ -412,7 +412,7 @@ def __get_image_data_grayscale_anisotropy(sockets, results, export_settings) ->
def __is_blender_image_a_jpeg(image: bpy.types.Image) -> bool:
if image.source != 'FILE':
if image.source not in ['FILE', 'TILED']:
return False
if image.filepath_raw == '' and image.packed_file:
return image.packed_file.data[:3] == b'\xff\xd8\xff'
@@ -422,7 +422,7 @@ def __is_blender_image_a_jpeg(image: bpy.types.Image) -> bool:
def __is_blender_image_a_webp(image: bpy.types.Image) -> bool:
if image.source != 'FILE':
if image.source not in ['FILE', 'TILED']:
return False
if image.filepath_raw == '' and image.packed_file:
return image.packed_file.data[8:12] == b'WEBP'

View File

@@ -695,6 +695,10 @@ class PrimitiveCreator:
indices = np.where((self.dots[uvmap_name + '0'] >= u) & (self.dots[uvmap_name + '0'] <= (u + 1)) & (
self.dots[uvmap_name + '1'] <= (1 - v)) & (self.dots[uvmap_name + '1'] >= 1 - (v + 1)))[0]
# If no vertex in this tile, continue
if indices.shape[0] == 0:
continue
# Reset UVMap to 0-1 : reset to Blener UVMAP => slide to 0-1 => go to glTF UVMap
self.dots[uvmap_name + '1'][indices] -= 1
self.dots[uvmap_name + '1'][indices] *= -1