Skip to content

Commit

Permalink
Fix T64853: FBX fail to export after recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brechtvl committed May 20, 2019
1 parent 58e5857 commit d1fe2d0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion io_import_gimp_image_to_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def Make3DLayer (Name, NameShort, Z, Coords, RenderLayer, LayerMode, LayerOpacit

Img = bpy.data.images.new(NameShort+'_A', 128, 128)
Img.source = 'FILE'
Img.alpha_mode = 'IGNORE'
Img.alpha_mode = 'NONE'
Img.filepath = '%s%s_A%s' % (PathSaveRaw, Name, ExtSave)

Tex.image = Img
Expand Down
2 changes: 1 addition & 1 deletion io_import_images_as_planes.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ def single_image_spec_to_plane(self, context, img_spec):

def apply_image_options(self, image):
if self.use_transparency == False:
image.alpha_mode = 'IGNORE'
image.alpha_mode = 'NONE'
else:
image.alpha_mode = self.alpha_mode

Expand Down
2 changes: 1 addition & 1 deletion io_scene_fbx/export_fbx_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ def fbx_data_texture_file_elements(root, blender_tex_key, scene_data):
elem_data_single_string_unicode(fbx_tex, b"RelativeFilename", fname_rel)

alpha_source = 0 # None
if img.alpha_mode != 'IGNORE':
if img.alpha_mode != 'NONE':
# ~ if tex.texture.use_calculate_alpha:
# ~ alpha_source = 1 # RGBIntensity as alpha.
# ~ else:
Expand Down
8 changes: 4 additions & 4 deletions io_scene_x3d/import_x3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2775,7 +2775,7 @@ def appearance_LoadImageTexture(imageTexture, ancestry, node):
# as transparent. Need alpha channel.

if bpyima.depth not in {32, 128}:
bpyima.alpha_mode = 'IGNORE'
bpyima.alpha_mode = 'NONE'
return bpyima


Expand Down Expand Up @@ -2823,7 +2823,7 @@ def appearance_LoadTexture(tex_node, ancestry, node):
def appearance_ExpandCachedMaterial(bpymat):
if 0 and bpymat.texture_slots[0] is not None:
bpyima = bpymat.texture_slots[0].texture.image
tex_has_alpha = bpyima.alpha_mode not in {'IGNORE', 'CHANNEL_PACKED'}
tex_has_alpha = bpyima.alpha_mode not in {'NONE', 'CHANNEL_PACKED'}
return (bpymat, bpyima, tex_has_alpha)

return (bpymat, None, False)
Expand Down Expand Up @@ -2862,7 +2862,7 @@ def appearance_Create(vrmlname, material, tex_node, ancestry, node, is_vcol):
bpymat.use_vertex_color_paint = True

if 0 and bpyima:
tex_has_alpha = bpyima.alpha_mode not in {'IGNORE', 'CHANNEL_PACKED'}
tex_has_alpha = bpyima.alpha_mode not in {'NONE', 'CHANNEL_PACKED'}

texture = bpy.data.textures.new(bpyima.name, 'IMAGE')
texture.image = bpyima
Expand Down Expand Up @@ -2973,7 +2973,7 @@ def appearance_LoadPixelTexture(pixelTexture, ancestry):

bpyima = bpy.data.images.new("PixelTexture", w, h, has_alpha, True)
if not has_alpha:
bpyima.alpha_mode = 'IGNORE'
bpyima.alpha_mode = 'NONE'

# Conditional above the loop, for performance
if plane_count == 3: # RGB
Expand Down

0 comments on commit d1fe2d0

Please sign in to comment.