LuxCoreRender / LuxCoreRender/BlendLuxCore
Show IES shape in OpenGL 3D view
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 877
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
The goal would be something like this:

It can be implemented as a draw handler.
Example code:
import bpy
from bgl import *
def draw_callback():
# As an example, draw a red line from world coordinates (0, 0, 0) to (1, 1, 1)
glColor3f(1.0, 0.0, 0.0)
glLineWidth(2.0)
glBegin(GL_LINES)
glVertex3f(0.0, 0.0, 0.0)
glVertex3f(1.0, 1.0, 1.0)
glEnd()
def register():
# The arguments for the draw_callback function, in our case no arguments
args = ()
bpy.types.SpaceView3D.draw_handler_add(draw_callback, args, 'WINDOW', 'POST_VIEW')
def unregister():
bpy.types.SpaceView3D.draw_handler_remove(draw_callback, 'WINDOW')
if __name__ == "__main__":
register()
See also this stackoverflow question.
Here is a proof-of-concept of these types of custom widgets: https://github.com/LuxCoreRender/BlendLuxCore/commit/f8c784462b58e1db3216e1e8ecd0ff5f8312e6de#diff-6408ff2ba505ecbce1cec82283fb7070R60
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the repository for IES handling and any existing Blender viewport drawing entry points. Review bpy.types.SpaceView3D.draw_handler_add and the linked proof of concept, then verify the implementation displays the IES shape in the OpenGL 3D view for the relevant light. Done means the shape appears as in the provided preview without disrupting the view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100