Magic_uv: 'NoneType' object has no attribute 'uv_layers' when applying transforms to a non-mesh object if addon magic_uv is enabled #105341

Open
opened 2024-05-31 12:31:32 +02:00 by Cedric Steiert · 1 comment

System Information
Operating system: Windows 10
Graphics card: RTX 3080TI

Blender Version
Broken: 4.1
Worked: (newest version of Blender that worked as expected)

Short description of error
When applying tranforms via the search panel (f3 > apply all transforms) or via Object > Apply > All Transforms to an empty object (e.g. plain axis) the addon magic_uv will throw following python error:
Python: Traceback (most recent call last): File "A:\Programme\Windows\BlenderFoundation\4.1\4.1\scripts\addons\magic_uv\op\copy_paste_uv_object.py", line 149, in draw uv_maps = compat.get_object_uv_layers(obj).keys() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Programme\Windows\BlenderFoundation\4.1\4.1\scripts\addons\magic_uv\utils\compatibility.py", line 120, in get_object_uv_layers return obj.data.uv_layers ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'uv_layers'

When the addon magic_uv is disabled this error does not occur.
When applying transforms to an actual mesh this error does not occur.
When pressing ctrl + a > All transforms this error does not occur.
It doesn't matter what transform gets applied.
The error happens for all non-mesh object types, like empties or path based object with no actual mesh and thus no uv layers.
It has no effect on the applying transforms, it's just to some extent annoying to see some error message unrelated to the operation the user is performing.

Exact steps for others to reproduce the error
Based on the default startup .blend file.

  1. Make sure the addon magic_uv is enabled and operational
  2. Open the info editor to not miss the logged error in case it won't get displayed in the bottom bar.
  3. Create an empty object (e.g. plain Axis)
  4. With the empty selected: In the header of the 3d Viewport press Object > Apply > All Transforms
  5. the Attribute error should now be logged in the info editor

Created from confirmed issue on blender repo: blender/blender#122522

**System Information** Operating system: Windows 10 Graphics card: RTX 3080TI **Blender Version** Broken: 4.1 Worked: (newest version of Blender that worked as expected) **Short description of error** When applying tranforms via the search panel (`f3 > apply all transforms`) or via `Object > Apply > All Transforms` to an empty object (e.g. plain axis) the addon `magic_uv` will throw following python error: `Python: Traceback (most recent call last): File "A:\Programme\Windows\BlenderFoundation\4.1\4.1\scripts\addons\magic_uv\op\copy_paste_uv_object.py", line 149, in draw uv_maps = compat.get_object_uv_layers(obj).keys() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Programme\Windows\BlenderFoundation\4.1\4.1\scripts\addons\magic_uv\utils\compatibility.py", line 120, in get_object_uv_layers return obj.data.uv_layers ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'uv_layers'` When the addon `magic_uv` is disabled this error does not occur. When applying transforms to an actual mesh this error does not occur. When pressing `ctrl` + `a` > `All transforms` this error does not occur. It doesn't matter what transform gets applied. The error happens for all non-mesh object types, like empties or path based object with no actual mesh and thus no uv layers. It has no effect on the applying transforms, it's just to some extent annoying to see some error message unrelated to the operation the user is performing. **Exact steps for others to reproduce the error** Based on the default startup .blend file. 1. Make sure the addon magic_uv is enabled and operational 2. Open the info editor to not miss the logged error in case it won't get displayed in the bottom bar. 3. Create an empty object (e.g. plain Axis) 4. With the empty selected: In the header of the 3d Viewport press `Object > Apply > All Transforms` 5. the Attribute error should now be logged in the info editor --- Created from confirmed issue on blender repo: https://projects.blender.org/blender/blender/issues/122522
Cedric Steiert added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-05-31 12:31:32 +02:00
Member
https://projects.blender.org/blender/blender/issues/122522#issuecomment-1200768 So confirmed.
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-05-31 16:03:20 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#105341
No description provided.