Skip to content

bpy.ops.import_scene.obj removed at bpy==4 #1

@KhanPython

Description

@KhanPython

With newer versions of blender (>4) the following adjustments can be made to blenderScript.py:

parser.add_argument("--input") # Syntax change
parser.add_argument("--output") 

def render(x: Path):
    # Updated import function to the new API call. Not sure what an equivalent would be, but this works. 
    bpy.ops.wm.obj_import(filepath=str(x))
   
    bpy.context.scene.render.filepath = params["output"]

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