Skip to content

Instructions Look: 'RenderSettings' object has no attribute 'alpha_mode' #76

@brianlow

Description

@brianlow

I think the loader is failing silently near the end of setInstructionsLook():

def setupInstructionsLook():
    # ...

    # This line is failing with:
    #     AttributeError: 'RenderSettings' object has no attribute 'alpha_mode'
    #
    # This attribute doesn't appear in the latest 3.5 docs:
    #     https://docs.blender.org/api/current/bpy.types.RenderSettings.html
    render.alpha_mode = 'TRANSPARENT'

    # ...

I noticed this when running Blender from the terminal:

# launch and run the import via Blender File -> Import
/Applications/Blender.app/Contents/MacOS/Blender

# launch script to automatically render a brick
/Applications/Blender.app/Contents/MacOS/Blender --background --python my-script-to-render-lego.py

Move evidence: the add-on continues to work if I change the offending line to an early return and use the importer normally via Blender File -> Import

Is the rest of setupInstructionsLook() needed? If not would you be open to a PR? I am building a script to render parts and it fails here. Update: I noticed it is missing white lines on black parts

Details:

  • Blender Version 3.5.0 (3.5.0 2023-03-29)
  • MacOS 13.3.1 (22E261)

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