Skip to content

image.use_premultiply bug fix #7

@Hogarth-MMD

Description

@Hogarth-MMD

I got this error message in the Blender system console:

    img = bel.image.new(path+'/'+filename)
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\io_directx_bel\bel\image.py", line 44, in new
    img.use_premultiply = premul
AttributeError: 'Image' object has no attribute 'use_premultiply'

Apparently .use_premultiply is not a possible image attribute in Blender 2.78, but I found a quick and simple bug fix for this issue. I just commented out these 4 lines in image.py and then this .x importer worked fine for me:

Line 44:     # img.use_premultiply = premul
Line 163:    # if type(img) != type(None) :
Line 164:         # img.use_premultiply = True
Line 238:             # img.use_premultiply = True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions