Skip to content

[Feature Request] Add Python API / operator to programmatically create lenses #26

@yourwanghao

Description

@yourwanghao

Hi and thank you for this amazing plugin!

I'm using OptiCore for academic/professional optical simulation work inside Blender, and I find it very helpful for visualizing lens systems.

Currently, lenses can only be created manually through the "Add > OptiCore Optics > Lens" UI menu. However, for automation purposes (e.g., creating parameter sweeps, generating many different lens + sensor configurations programmatically), it would be very useful to expose lens creation as a Python-accessible operator.

For example, it would be ideal to have something like:

bpy.ops.opticore.lens_add(radius1=0.05, radius2=-0.05, thickness=0.005, diameter=0.025, ior=1.52)

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