Hello,
trying to render in Blender as jpegs.
getting this error when publishing:
* `ValidateExpectedFiles` does a string-exact filename comparison
* Expected: `...Beauty1001.jpeg`
* Actual on disk: `...Beauty1001.jpg`
Am I right to believe that Blender just messed up by using “JPEG” in the file extension list but have “.jpg” as extension when rendering?
Is this a known thing or just me?
Thanks!
I wonder if this is a blender thing.
I can see in Supported Graphics Formats - Blender 5.1 Manual that both .jpg and .jpeg are acceptable/expected for JPEG format.
I’m not sure if I trust gemini but it says:
File Extensions: Leave the Extensions checkbox ticked. Blender will automatically append .jpg to the end of your rendered file names.
Blender writes jpeg but AYON expects jpg - should we change that somehow?
Isn’t that the issue of why it isn’t publishing?
AYON expects .jpg is true.
I kept snooping around and found this. That could be it? That would be why it expects jpeg instead of jpg?
…\addons\blender\1.1.6\private\client\ayon_blender\api\render_lib.py
def set_render_format(ext: str, multilayer: bool):
"""Set Blender scene to save render file with the right extension"""
bpy.context.scene.render.use_file_extension = True
image_settings = bpy.context.scene.render.image_settings
if lib.get_blender_version() >= (5, 0, 0):
if multilayer:
image_settings.media_type = "MULTI_LAYER_IMAGE"
else:
image_settings.media_type = "IMAGE"
if ext == "exr":
file_format = "OPEN_EXR_MULTILAYER" if multilayer else "OPEN_EXR"
image_settings.file_format = file_format
elif ext == "bmp":
image_settings.file_format = "BMP"
elif ext == "rgb":
image_settings.file_format = "IRIS"
elif ext == "png":
image_settings.file_format = "PNG"
elif ext == "jpeg":
image_settings.file_format = "JPEG"
elif ext == "jp2":
image_settings.file_format = "JPEG2000"
elif ext == "tga":
image_settings.file_format = "TARGA"
elif ext == "tif":
image_settings.file_format = "TIFF"
def get_file_format_extension(file_format: str) -> str:
"""Convert Blender file format to file extension."""
# TODO: Figure out if Blender has a native way to convert to extensions
if file_format == "OPEN_EXR_MULTILAYER":
return "exr"
elif file_format == "OPEN_EXR":
return "exr"
elif file_format == "BMP":
return "bmp"
elif file_format == "IRIS":
return "rgb"
elif file_format == "PNG":
return "png"
elif file_format == "JPEG":
return "jpeg"
elif file_format == "JPEG2000":
return "jp2"
elif file_format == "TARGA" or file_format == "TARGA_RAW":
return "tga"
elif file_format == "TIFF":
return "tif"
# Blender 5+
elif file_format == "CINEON":
return "cin"
elif file_format == "DPX":
return "dpx"
elif file_format == "WEBP":
return "webp"
elif file_format == "HDR":
return "hdr"
else:
raise ValueError(f"Unsupported file format: {file_format}")
I believe so - could you make a PR? We’d happily review it to confirm the changes.