Fix: Image as planes add-on sets wrong alpha for OpenEXR files

This simply removes the operator property to set the alpha mode, so that
this can be automatically determined. The None case was already handled
by Use Transparency, and Channel Packed doesn't make sense here.

Ref #144009

Pull Request: https://projects.blender.org/blender/blender/pulls/144074
This commit is contained in:
Brecht Van Lommel
2025-08-11 13:58:47 +02:00
committed by Brecht Van Lommel
parent 856a2a9f87
commit 7acd5b3397

View File

@@ -367,14 +367,6 @@ class TextureProperties_MixIn:
description="How the image is extrapolated past its original bounds",
)
_Image_alpha_mode = bpy.types.Image.bl_rna.properties["alpha_mode"]
alpha_mode: EnumProperty(
name=_Image_alpha_mode.name,
items=tuple((e.identifier, e.name, e.description) for e in _Image_alpha_mode.enum_items),
default=_Image_alpha_mode.default,
description=_Image_alpha_mode.description,
)
_ImageUser_use_auto_refresh = bpy.types.ImageUser.bl_rna.properties["use_auto_refresh"]
use_auto_refresh: BoolProperty(
name=_ImageUser_use_auto_refresh.name,
@@ -400,9 +392,6 @@ class TextureProperties_MixIn:
row = body.row(align=False, heading="Alpha")
row.prop(self, "use_transparency", text="")
sub = row.row(align=True)
sub.active = self.use_transparency
sub.prop(self, "alpha_mode", text="")
body.prop(self, "use_auto_refresh")
@@ -944,8 +933,6 @@ class IMAGE_OT_import_as_mesh_planes(
def apply_image_options(self, image):
if not self.use_transparency:
image.alpha_mode = 'NONE'
else:
image.alpha_mode = self.alpha_mode
if self.relative:
try: # Can't always find the relative path (between drive letters on windows).