This old addon converts select faces to area lights, can someone save it for Blender 4.2?

https://pastecode.io/s/fmeq86pz

This code is so old, the creator stated it has released it to the wild in the hope someone can save it.

Developer statement:
This is in need of updating since blender ~3
You can find for free in gitstash
This is setup to go to the blender dev fund.
You can find this in github as well but in blender market I get some credit, money goes to the dev fund, and it’s easy for me to send updates.

The GPTGod cannot save this add-on for Blender 4.2, can someone do it?

Note: You can install it with no issue, but when you select the faces and click the button, you get error :frowning:

This addon makes making window light so easy, no need to scale and move and rotate area lights “trying” to match the window shape, with this add-on, you just select the face, click the button and you have an area light with the exact shape, size and position!

In the meantime…

Try ChatGPT to fix the code? :stuck_out_tongue:

Or use an older Blender version -just- for the windows and import back into your newer Blender?
Always think about workarounds :wink:

Oh I so wish the GPTGod can help, but…computer says no.

Thanks for trying to answer though :smiley:

1 Like

Hi,

Just DL’d the code from the first link, and run it through the Scripting tab.
I get a N-panel, and it works for me in 4.2.

So at least that way it works. Logic would dictate it will work as a addon… :man_shrugging:

It loads the script, but it has errors.

To start the panel’s name and bl_idname must change to the 3.* format (i.e. VIEW3D_PT_*)

Then the operator produces an error when called, mainly because bpy.ops.object.transform_apply needs to be called in ‘OBJECT’ mode.
And after that is corrected, the operator runs, the new lights are scaled accordingly, but it fails to copy the object’s rotation to the AreaLight.

You are right, logic did dictate it is an addon.
Now my lovely dear, try it :smiley:
Go to edit mode, select a face, any face, and click that button.
You will see an error.

BUT STILL, I applaud you for the effort :smiley:

You…you manage to correct some part of it?
You are AMAZING for trying !

I just didn’t worked the rotation part… it would require a bit more than a simple edit here and there…

Are you planning to use Eevee or Cycles?
Because in Cycles, you could just add an emission closure to indirect diffuse rays. Or use a Portal…

Portal is cool, it allows more light to enter in, LOVE IT, but I must confess I have started to use less of it…cause I just…forgot…because denoising is so good now, but yeah, I should start using portal again.

I plan to use Eevee and Cycles, I need to find out what you mean by “emission closure to indirect diffuse ray”, it went over my head! ha ha ha

In the mean time, I find the ability to convert selected faces to area light of exact matching size to be a bonus :smiley:
Thank you for attempting to try to fix the addon though, I appreciate it.

Try installing this as a extension (from disk)
It works for me. :slight_smile:
area_lights_from_faces.zip (2.3 KB)

I didn’t change any code, but the conversion to a extension.
Blender 4.2 LTS. YMMV :wink:

1 Like

Oh my god…what did you do?
What…what did you do?!!
It works!
You saved the day!

Thanks to you now it is possible to convert selected face to arealight once again in Blender 4.2 !

Magic!! :laughing:

Nice to see it works for you too! :+1:

Wish I can give you a hug!

1 Like

something like this:

Interesting, I was thinking…maybe this is some kind of light emitting window that also reflects.

But it seems the reflection, if any, is hard to see.
But still, interesting. Thank you for sharing!