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

Closed
opened 2024-05-31 02:08:42 +02:00 by Cedric Steiert · 8 comments

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
**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
Cedric Steiert added the
Severity
Normal
Type
Report
Status
Needs Triage
labels 2024-05-31 02:08:43 +02:00
Member

Can confirm. Although it's best to submit to the addon repository.

Looks like somehow the menu draw call was called in Magic UV. That menu is only registered under VIEW3D_MT_object which is the viewport Object menu. Not sure what's going on...

Can confirm. Although it's best to submit to the addon repository. Looks like somehow the menu draw call was called in Magic UV. That menu is only registered under `VIEW3D_MT_object` which is the viewport `Object` menu. Not sure what's going on...
Member

Or maybe at https://projects.blender.org/extensions/magic_uv after the new extension migration. 🤔


cc @nutti

Or maybe at https://projects.blender.org/extensions/magic_uv after the new extension migration. 🤔 - - - cc @nutti
Pratik Borhade added
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-05-31 07:01:03 +02:00
Author

Can confirm. Although it's best to submit to the addon repository.

Looks like somehow the menu draw call was called in Magic UV. That menu is only registered under VIEW3D_MT_object which is the viewport Object menu. Not sure what's going on...

Alright, moved the issue to the blender_addons repo: blender/blender-addons#105341

> Can confirm. Although it's best to submit to the addon repository. > > Looks like somehow the menu draw call was called in Magic UV. That menu is only registered under `VIEW3D_MT_object` which is the viewport `Object` menu. Not sure what's going on... Alright, moved the issue to the blender_addons repo: https://projects.blender.org/blender/blender-addons/issues/105341
Member

OK, since we now have blender/blender-addons#105341 , will close this one

OK, since we now have https://projects.blender.org/blender/blender-addons/issues/105341 , will close this one
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-05-31 16:02:50 +02:00
Member

@PratikPB2123

Thanks for pinging me.
Do I have the commit right to the https://projects.blender.org/extensions/magic_uv/commits/branch/main ?
If so, I can commit my some patches to this repository instead of the blender-addons.

@PratikPB2123 Thanks for pinging me. Do I have the commit right to the https://projects.blender.org/extensions/magic_uv/commits/branch/main ? If so, I can commit my some patches to this repository instead of the blender-addons.
Member

Do I have the commit right to the

Maybe not... (https://projects.blender.org/org/extensions/members)
@dfelinto might know whether add-on owners already have the commit rights :)

> Do I have the commit right to the Maybe not... (https://projects.blender.org/org/extensions/members) @dfelinto might know whether add-on owners already have the commit rights :)
Member

Thanks @PratikPB2123 .

@dfelinto
Will I have a commit right to the extensions organization repository in future?
If no, how should I submit patches to the extension repository?

Thanks @PratikPB2123 . @dfelinto Will I have a commit right to the extensions organization repository in future? If no, how should I submit patches to the extension repository?

I've just written to @nutti to transfer the repository and the extension to him.

I've just written to @nutti to transfer the repository and the extension to him.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 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#122522
No description provided.