Material Library VX: Exception when attempting to apply a material without one existing #84444

Open
opened 2021-01-06 10:36:33 +01:00 by Robert Guetzkow · 4 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.89

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2021-01-06 08:04, hash: blender/blender@4b56c18290
Worked: Likely never

Addon Information
Name: Material Library (0, 6, 0)
Author: Mackraken

Short description of error
The Material Library VX is missing a check if active_material is None before attempting to use it.

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):

File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\materials_library_vx_init_.py", line 952, in invoke
return self.execute(context)
File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\materials_library_vx_init_.py", line 1015, in execute
success = matlib.apply(context)
File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\materials_library_vx_init_.py", line 500, in apply
name = self.active_material.name

AttributeError: 'NoneType' object has no attribute 'name'

Exact steps for others to reproduce the error

  • Enable Material Library VX in Edit > Preferences > Add-ons
  • In the Material Properties > Material Library VX create a New Library

Click Apply To Selected

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.89 **Blender Version** Broken: version: 2.92.0 Alpha, branch: master, commit date: 2021-01-06 08:04, hash: `blender/blender@4b56c18290` Worked: Likely never **Addon Information** Name: Material Library (0, 6, 0) Author: Mackraken **Short description of error** The Material Library VX is missing a check if `active_material` is `None` before attempting to use it. ```lines location: <unknown location>:-1 Error: Python: Traceback (most recent call last): ``` File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\materials_library_vx\__init__.py", line 952, in invoke return self.execute(context) File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\materials_library_vx\__init__.py", line 1015, in execute success = matlib.apply(context) File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\materials_library_vx\__init__.py", line 500, in apply name = self.active_material.name ``` AttributeError: 'NoneType' object has no attribute 'name' ``` **Exact steps for others to reproduce the error** - Enable *Material Library VX* in *Edit > Preferences > Add-ons* - In the *Material Properties > Material Library VX* create a *New Library* # Click *Apply To Selected*
Author
Member

Added subscriber: @rjg

Added subscriber: @rjg

#91115 was marked as duplicate of this issue

#91115 was marked as duplicate of this issue
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscribers: @tiles, @PratikPB2123

Added subscribers: @tiles, @PratikPB2123
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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#84444
No description provided.