Skip to content

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

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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