Skip to content

Commit

Permalink
Version 0.31.1 (#152)
Browse files Browse the repository at this point in the history
- Feature: The updater function checks the minimum Blender version required by the remote MustardUI version and show additional messages to prompt the user to update Blender if necessary
- Bug: Children armature collections were not showing.
- Bug Auto Smooth Normal not working in Blender 4.1 #151 : Compatibility with Blender 4.1 (normals auto smooth switched to modifier)
- Bug "ID user decrement error" #141: Mask support for Armature bones has been reintroduced (due to the Blender 4.1 fix of the ID decrement error)
- Bug: Removed a cause of failure for the addon to be disabled/removed/re-installed/updated.

Note: this version is still also compatible with Blender 4.0, but I bumped the minimum version just in case. That is, it should be safe to use MustardUI 0.31.1 also with Blender 4.0.
  • Loading branch information
Mustard2 authored Mar 19, 2024
1 parent d827e47 commit 338d1d1
Show file tree
Hide file tree
Showing 37 changed files with 181 additions and 154 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

MustardUI is a Blender script that provides an intuitive and easy-to-use user interface for human models.

**Note: do not download the file from the Code button, use the .zip file on the [latest release](https://github.com/Mustard2/MustardUI/releases/latest) instead.**

## Features

The main features are:
Expand Down
30 changes: 15 additions & 15 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"name": "MustardUI",
"description": "Easy-to-use UI for human characters.",
"author": "Mustard",
"version": (0, 31, 0, 5),
"blender": (4, 0, 0),
"version": (0, 31, 1, 5),
"blender": (4, 1, 0),
"warning": "",
"doc_url": "https://github.com/Mustard2/MustardUI/wiki",
"category": "User Interface",
Expand Down Expand Up @@ -47,17 +47,17 @@ def register():


def unregister():
settings.unregister()
misc.unregister()
model_selection.unregister()
warnings.unregister()
armature.unregister()
tools.unregister()
tools_creators.unregister()
custom_properties.unregister()
sections.unregister()
outfits.unregister()
diffeomorphic.unregister()
configuration.unregister()
links.unregister()
menu.unregister()
links.unregister()
configuration.unregister()
diffeomorphic.unregister()
outfits.unregister()
sections.unregister()
custom_properties.unregister()
tools_creators.unregister()
tools.unregister()
armature.unregister()
warnings.unregister()
model_selection.unregister()
misc.unregister()
settings.unregister()
2 changes: 1 addition & 1 deletion armature/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ def register():


def unregister():
definitions.unregister()
ui_list.unregister()
definitions.unregister()
4 changes: 2 additions & 2 deletions armature/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def mustardui_armature_visibility_outfits_update(self, context):
poll, arm = mustardui_active_object(context, config=0)
armature_settings = arm.MustardUI_ArmatureSettings
rig_settings = arm.MustardUI_RigSettings
for bcoll in arm.collections:
for bcoll in arm.collections_all:
bcoll_settings = bcoll.MustardUI_ArmatureBoneCollection
if bcoll_settings.outfit_switcher_enable:
check_coll = (
Expand Down Expand Up @@ -142,5 +142,5 @@ def register():


def unregister():
bpy.utils.unregister_class(MustardUI_ArmatureBoneCollection)
bpy.utils.unregister_class(MustardUI_ArmatureSettings)
bpy.utils.unregister_class(MustardUI_ArmatureBoneCollection)
2 changes: 1 addition & 1 deletion armature/ui_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def draw_item(self, _context, layout, armature, bcoll, _icon, _active_data, _act
row = layout.row(align=True)

# Check if the icon should be drawn
for b in armature.collections:
for b in armature.collections_all:
if b.MustardUI_ArmatureBoneCollection.icon != "NONE":
row.label(text="", icon=bcoll_settings.icon if bcoll_settings.icon != "NONE" else "BLANK1")
break
Expand Down
8 changes: 4 additions & 4 deletions configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def register():


def unregister():
ops_configuration.unregister()
ops_smartcheck.unregister()
ops_cleanmodel.unregister()
ops_debug.unregister()
ops_removeui.unregister()
ops_debug.unregister()
ops_cleanmodel.unregister()
ops_smartcheck.unregister()
ops_configuration.unregister()
14 changes: 7 additions & 7 deletions custom_properties/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def register():


def unregister():
definitions.unregister()
ops_props.unregister()
ops_link.unregister()
menus.unregister()
ui_list.unregister()
ops_menu_settings.unregister()
ops_rebuild.unregister()
ops_smartcheck.unregister()
ops_rebuild.unregister()
ops_menu_settings.unregister()
ui_list.unregister()
menus.unregister()
ops_link.unregister()
ops_props.unregister()
definitions.unregister()
2 changes: 1 addition & 1 deletion custom_properties/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@ def register():


def unregister():
bpy.utils.unregister_class(MustardUI_LinkedProperty)
bpy.utils.unregister_class(MustardUI_CustomProperty)
bpy.utils.unregister_class(MustardUI_LinkedProperty)
6 changes: 3 additions & 3 deletions custom_properties/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ def register():


def unregister():
for m in menus:
for m in reversed(menus):
bpy.utils.unregister_class(m)

from .menus_functions import mustardui_property_menuadd
bpy.types.UI_MT_button_context_menu.remove(mustardui_property_menuadd)
from .menus_functions import mustardui_property_link
bpy.types.UI_MT_button_context_menu.remove(mustardui_property_link)
from .menus_functions import mustardui_property_menuadd
bpy.types.UI_MT_button_context_menu.remove(mustardui_property_menuadd)
2 changes: 1 addition & 1 deletion custom_properties/ops_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,5 @@ def register():


def unregister():
bpy.utils.unregister_class(MustardUI_Property_MenuLink)
bpy.utils.unregister_class(MustardUI_Property_RemoveLinked)
bpy.utils.unregister_class(MustardUI_Property_MenuLink)
4 changes: 2 additions & 2 deletions custom_properties/ops_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,6 @@ def register():


def unregister():
bpy.utils.unregister_class(MustardUI_Property_MenuAdd)
bpy.utils.unregister_class(MustardUI_Property_Remove)
bpy.utils.unregister_class(MustardUI_Property_Switch)
bpy.utils.unregister_class(MustardUI_Property_Remove)
bpy.utils.unregister_class(MustardUI_Property_MenuAdd)
2 changes: 1 addition & 1 deletion custom_properties/ui_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,5 @@ def register():


def unregister():
for m in menus:
for m in reversed(menus):
bpy.utils.unregister_class(m)
6 changes: 3 additions & 3 deletions diffeomorphic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def register():


def unregister():
ops_checkmorphs.unregister()
ops_clearpose.unregister()
ops_defvalue.unregister()
ops_drivers.unregister()
ops_defvalue.unregister()
ops_clearpose.unregister()
ops_checkmorphs.unregister()
2 changes: 1 addition & 1 deletion diffeomorphic/ops_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,5 @@ def register():


def unregister():
bpy.utils.unregister_class(MustardUI_DazMorphs_DisableDrivers)
bpy.utils.unregister_class(MustardUI_DazMorphs_EnableDrivers)
bpy.utils.unregister_class(MustardUI_DazMorphs_DisableDrivers)
6 changes: 3 additions & 3 deletions links/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def register():


def unregister():
definitions.unregister()
ops_link.unregister()
ops_preset.unregister()
ui_list.unregister()
ops_preset.unregister()
ops_link.unregister()
definitions.unregister()
2 changes: 1 addition & 1 deletion links/ops_preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@ def register():


def unregister():
bpy.utils.unregister_class(MustardUI_Links_Export)
bpy.utils.unregister_class(MustardUI_Links_Import)
bpy.utils.unregister_class(MustardUI_Links_Export)
6 changes: 3 additions & 3 deletions links/ui_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def register():


def unregister():
bpy.utils.unregister_class(MustardUI_Links_UIList_Switch)
bpy.utils.unregister_class(MustardUI_Link_Add)
bpy.utils.unregister_class(MustardUI_Link_Remove)
bpy.utils.unregister_class(MUSTARDUI_UL_Links_UIList)
bpy.utils.unregister_class(MustardUI_Link_Remove)
bpy.utils.unregister_class(MustardUI_Link_Add)
bpy.utils.unregister_class(MustardUI_Links_UIList_Switch)
28 changes: 14 additions & 14 deletions menu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ def register():


def unregister():
menu_select_model.unregister()
menu_warnings.unregister()
menu_configure.unregister()
menu_tools_creators.unregister()
menu_body.unregister()
menu_morphs.unregister()
menu_outfits.unregister()
menu_hair.unregister()
menu_armature.unregister()
menu_simplify.unregister()
menu_tools_physics.unregister()
menu_tools_lattice.unregister()
menu_tools.unregister()
menu_settings.unregister()
menu_links.unregister()
menu_settings.unregister()
menu_tools.unregister()
menu_tools_lattice.unregister()
menu_tools_physics.unregister()
menu_simplify.unregister()
menu_armature.unregister()
menu_hair.unregister()
menu_outfits.unregister()
menu_morphs.unregister()
menu_body.unregister()
menu_tools_creators.unregister()
menu_configure.unregister()
menu_warnings.unregister()
menu_select_model.unregister()
25 changes: 12 additions & 13 deletions menu/menu_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def draw(self, context):

if (rig_settings.body_enable_smoothcorr
or rig_settings.body_enable_solidify
or rig_settings.body_enable_norm_autosmooth
or rig_settings.body_enable_material_normal_nodes
or rig_settings.body_enable_preserve_volume
or rig_settings.body_enable_geometry_nodes):
Expand All @@ -132,13 +131,17 @@ def draw(self, context):
if (rig_settings.body_enable_preserve_volume
or rig_settings.body_enable_geometry_nodes
or rig_settings.body_enable_solidify
or rig_settings.body_enable_smoothcorr):
or rig_settings.body_enable_smoothcorr
or rig_settings.body_enable_norm_autosmooth):

col = box.column(align=True)

if rig_settings.body_enable_preserve_volume:
col.prop(rig_settings, "body_preserve_volume")

if rig_settings.body_enable_norm_autosmooth:
col.prop(rig_settings, "body_norm_autosmooth")

if rig_settings.body_enable_smoothcorr:
col.prop(rig_settings, "body_smooth_corr")

Expand All @@ -148,19 +151,15 @@ def draw(self, context):
if rig_settings.body_enable_solidify:
col.prop(rig_settings, "body_solidify")

if rig_settings.body_enable_norm_autosmooth or rig_settings.body_enable_material_normal_nodes:
if rig_settings.body_enable_material_normal_nodes:
col = box.column(align=True)

if rig_settings.body_enable_norm_autosmooth:
col.prop(rig_settings, "body_norm_autosmooth")

if rig_settings.body_enable_material_normal_nodes:
row = col.row(align=True)
row.scale_x = 0.94
if context.scene.render.engine == "CYCLES" and settings.material_normal_nodes:
row.alert = True
row.prop(settings, "material_normal_nodes", text="")
row.label(text="Eevee Optimized Normals")
row = col.row(align=True)
row.scale_x = 0.94
if context.scene.render.engine == "CYCLES" and settings.material_normal_nodes:
row.alert = True
row.prop(settings, "material_normal_nodes", text="")
row.label(text="Eevee Optimized Normals")

if rig_settings.body_enable_subdiv:
box = layout.box()
Expand Down
26 changes: 10 additions & 16 deletions menu/menu_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def draw(self, context):
col = box.column(align=True)
col.prop(rig_settings, "body_enable_subdiv")
col.prop(rig_settings, "body_enable_smoothcorr")
col.prop(rig_settings, "body_enable_norm_autosmooth")
col.prop(rig_settings, "body_enable_geometry_nodes")
col.prop(rig_settings, "body_enable_solidify")
col.separator()
col.prop(rig_settings, "body_enable_preserve_volume")
col.prop(rig_settings, "body_enable_norm_autosmooth")
col.prop(rig_settings, "body_enable_material_normal_nodes")

# Custom properties
Expand Down Expand Up @@ -350,9 +350,9 @@ def draw(self, context):

row.template_list(
"MUSTARDUI_UL_Armature_UIList",
"collections",
"collections_all",
arm,
"collections",
"collections_all",
arm.collections,
"active_index",
rows=rows,
Expand Down Expand Up @@ -381,7 +381,7 @@ def draw(self, context):

if arm.collections.active_index > -1:

bcoll = arm.collections[arm.collections.active_index]
bcoll = arm.collections_all[arm.collections.active_index]
bcoll_settings = bcoll.MustardUI_ArmatureBoneCollection

col = box.column(align=True)
Expand All @@ -392,18 +392,12 @@ def draw(self, context):
row.enabled = not bcoll_settings.outfit_switcher_enable
row.prop(bcoll_settings, 'advanced')

# Warning for Blender bug https://projects.blender.org/blender/blender/issues/116061
if addon_prefs.experimental:
col = box.column(align=True)
row = col.row(align=True)
row.label(text="The feature below might cause", icon="ERROR")
row.operator("mustardui.openlink", icon="URL", text="").url = "https://projects.blender.org/blender/blender/issues/116061"
col.label(text="crashes due to a Blender bug!", icon="BLANK1")
col.prop(bcoll_settings, 'outfit_switcher_enable')
if bcoll_settings.outfit_switcher_enable:
col.prop(bcoll_settings, 'outfit_switcher_collection', text="Collection")
if bcoll_settings.outfit_switcher_collection is not None:
col.prop(bcoll_settings, 'outfit_switcher_object', text="Object")
col = box.column(align=True)
col.prop(bcoll_settings, 'outfit_switcher_enable')
if bcoll_settings.outfit_switcher_enable:
col.prop(bcoll_settings, 'outfit_switcher_collection', text="Collection")
if bcoll_settings.outfit_switcher_collection is not None:
col.prop(bcoll_settings, 'outfit_switcher_object', text="Object")

# Physics Settings
row = layout.row(align=False)
Expand Down
8 changes: 4 additions & 4 deletions menu/menu_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ def register():


def unregister():
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools_ChildOf)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools_LipsShrinkwrap)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools_AutoEyelid)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools_AutoBreath)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools_AutoEyelid)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools_LipsShrinkwrap)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools_ChildOf)
bpy.utils.unregister_class(PANEL_PT_MustardUI_Tools)
3 changes: 1 addition & 2 deletions menu/menu_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def draw(self, context):
box = layout.box()
col = box.column(align=True)
col.label(text="MustardUI update available!", icon="ERROR")
col.label(text="Remember to restart after updating.", icon="BLANK1")
box.operator("mustardui.openlink", icon="URL").url = "github.com/Mustard2/MustardUI/releases/latest"
box.operator("mustardui.updater", icon="WORLD")

# Eevee normals enabled in Cycles
if check_eevee_normals(context.scene, settings):
Expand Down
2 changes: 1 addition & 1 deletion misc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ def register():


def unregister():
updater.unregister()
ops_fix_missing_UI.unregister()
updater.unregister()
Loading

0 comments on commit 338d1d1

Please sign in to comment.