StjerneIdioten / I3D-Blender-Addon

Rewriting the I3D blender addon from scratch and adding long-sought community features
GNU General Public License v3.0
66 stars 18 forks source link

[Bug Report] Light panel doesn't work (2.93) #137

Closed NMC-TBone closed 2 years ago

NMC-TBone commented 3 years ago

Describe the bug

I3D Light Attributes drop down menu doesn't work in Blender 2.93

Log file

Python: Traceback (most recent call last): File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\i3dio\ui\light.py", line 339, in draw i3d_property(layout, obj.i3d_attributes, 'type_of_light', obj) File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\i3dio\ui\helper_functions.py", line 66, in i3d_property lab.label(text=attributes.annotations[attribute][1]['name']) TypeError: '_PropertyDeferred' object is not subscriptable

location: :-1

Screenshots

image

jtsage commented 2 years ago

I'm not going to do a pull request, because I know you have much bigger work going on, and I did at best a cursory look - this gets the panel to function again, I have no idea what else, if anything it breaks.

File: https://github.com/StjerneIdioten/I3D-Blender-Addon/blob/master/addon/i3dio/ui/helper_functions.py

Line 66

#lab.label(text=attributes.__annotations__[attribute][1]['name'])
lab.label(text=attributes.i3d_map[attribute]['name'])

Line 75

#attrib_row.label(text=f"Follows '{attributes.__annotations__[attribute+'_tracking'][1]['name']}'")
attrib_row.label(text=f"Follows '{attributes.i3d_map[attribute]['tracking']['member_path']}")
StjerneIdioten commented 2 years ago

I'm not going to do a pull request, because I know you have much bigger work going on, and I did at best a cursory look - this gets the panel to function again, I have no idea what else, if anything it breaks.

It probably doesn't break anything. Light panels are the only UI element using that "test" code for a new way to get GE specific dependencies into the UI. Blender's usage of annotations is already "hacky" and my solution to abuse it even more was bound to break at some point 🤣

If I have the time I will look into adding it as a bugfix, I still do those even while I am "working on bigger things" 😉

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 4.0.0-dev.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 4.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: