Page MenuHome

Amaranth add-on errors when adding a Mesh Light
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.86

Blender Version
Broken: version: 2.81 (sub 5), branch: master, commit date: 2019-09-04 00:01, hash: rBda25aca2677e
Worked: 2.79b official release (hash: f4dc9f9d68b)

Short description of error
At first the add-on activates but it returns this error in the Blender console as soon as you move the cursor over the menu list for adding meshes:

Traceback (most recent call last):

File "D:\Blender\blender-2.8_dev\2.81\scripts\modules\bpy_types.py", line 760, in draw_ls
  func(self, context)
File "D:\Blender\blender-2.8_dev\2.81\scripts\addons_contrib\amaranth\render\meshlight_add.py", line 182, in ui_menu_lamps_add
  icon="LAMP_AREA", text="Meshlight")

TypeError: UILayout.operator(): error with keyword argument "icon" - enum "LAMP_AREA" not found in ('NONE', 'QUESTION', ... this list continues ...)

Therefore I tried to fix it changing the "icon" setting to "LIGHT_AREA". Trying to add now a Mesh Light (Add | Mesh | Mesh Light) the following error is raised:

Traceback (most recent call last):

File "D:\Blender\blender-2.8_dev\2.81\scripts\addons_contrib\amaranth\render\meshlight_add.py", line 73, in execute
  rotation=self.rotation, radius=self.size)
File "D:\Blender\blender-2.8_dev\2.81\scripts\modules\bpy\ops.py", line 201, in __call__
  ret = op_call(self.idname_py(), None, kw)

TypeError: Converting py args to operator properties: : keyword "radius" unrecognized

So, I changed "radius" to "size" and line reads now like this:

rotation=self.rotation, size=self.size)

Possibly not right but the error is gone. Now, a meshlight is added in the scene but there is just one last error:

Traceback (most recent call last):

File "D:\Blender\blender-2.8_dev\2.81\scripts\addons_contrib\amaranth\render\meshlight_add.py", line 89, in execute
  material.diffuse_color = (1, 0.5, 0)

ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3

Again, possibly not the right solution, I presumed that the fourth element is opacity, transparency as in RGBA, so I added a 1 to the triplet) to read

material.diffuse_color = (1, 0.5, 0, 1)

I fixed this file both in my 2.80 stable release and 2.81 dev (latest buildbot release) "installations" and it seems to work fine.

Hope it might help the developers of this fantastic add-on.

Details

Type
Bug

Event Timeline

I can confirm the errors.
Tried the fixes and it seems to work very well, so i will try to make a patch ASAP.

Thank you very much.