Modifier List for Blender 4.2 Addon Fork

Thanks a lot, this is a cool addon
I would like to add some menus above the search box, but i don’t know how to do it
From the chat gpt I got that in general the menus are added to the modifiers tab.
I would appreciate your help.

Blockquote
import bpy
from bpy.types import Panel

Panel for modifiers, materials, UV maps, and vertex groups

class NPModifiersAndMaterialsPanel(bpy.types.Panel):
bl_label = “Modifiers, Materials & Vertex Groups” # General title for the entire panel
bl_idname = “NP_PT_Modifiers_And_Materials”
bl_space_type = ‘PROPERTIES’
bl_region_type = ‘WINDOW’
bl_context = “modifier” # Panel context (for modifiers)

def draw(self, context):
    layout = self.layout
    obj = context.object

    if obj:
        # === Modifiers ===
        #for modifier in obj.modifiers:
        #    row = layout.row()
        #    row.prop(modifier, "name", text="")
        #    row.prop(modifier, "show_viewport")

        # === Materials ===
        row = layout.row()
        row.template_list("MATERIAL_UL_matslots", "", obj, "material_slots", obj, "active_material_index", rows=2)

        col = row.column(align=True)
        col.operator("object.material_slot_add", icon='ADD', text="")
        col.operator("object.material_slot_remove", icon='REMOVE', text="")

        col.separator()

        col.menu("MATERIAL_MT_context_menu", icon='DOWNARROW_HLT', text="")

        if len(obj.material_slots) > 1:
            col.separator()
            col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
            col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'

        row = layout.row()
        row.template_ID(obj, "active_material", new="material.new")

        # === UV Maps ===
        if obj.type == 'MESH':
            me = obj.data
            row = layout.row()
            col = row.column()

            col.template_list("MESH_UL_uvmaps", "uvmaps", me, "uv_layers", me.uv_layers, "active_index", rows=2)

            col = row.column(align=True)
            col.operator("mesh.uv_texture_add", icon='ADD', text="")
            col.operator("mesh.uv_texture_remove", icon='REMOVE', text="")
        else:
            layout.label(text="This is not a mesh object", icon='ERROR')

        # === Vertex Groups ===
        if obj.type == 'MESH':
            group = obj.vertex_groups.active

            rows = 3
            if group:
                rows = 5

            row = layout.row()
            row.template_list("MESH_UL_vgroups", "", obj, "vertex_groups", obj.vertex_groups, "active_index", rows=rows)

            col = row.column(align=True)
            col.operator("object.vertex_group_add", icon='ADD', text="")
            props = col.operator("object.vertex_group_remove", icon='REMOVE', text="")
            props.all_unlocked = props.all = False

            col.separator()
            col.menu("MESH_MT_vertex_group_context_menu", icon='DOWNARROW_HLT', text="")

            if group:
                col.separator()
                col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
                col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'

            if (
                obj.vertex_groups and
                (obj.mode == 'EDIT' or
                (obj.mode == 'WEIGHT_PAINT' and obj.type == 'MESH' and obj.data.use_paint_mask_vertex))
            ):
                row = layout.row()
                sub = row.row(align=True)
                sub.operator("object.vertex_group_assign", text="Assign")
                sub.operator("object.vertex_group_remove_from", text="Remove")

                sub = row.row(align=True)
                sub.operator("object.vertex_group_select", text="Select")
                sub.operator("object.vertex_group_deselect", text="Deselect")

                layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")

    else:
        layout.label(text="No active object", icon='ERROR')

Register the panel

def register():
bpy.utils.register_class(NPModifiersAndMaterialsPanel)

def unregister():
bpy.utils.unregister_class(NPModifiersAndMaterialsPanel)

if name == “main”:
register()

Hi, I do not think its possible to directly set the panel order in Blender. Perhaps with some hack it could still be done.

1 Like

Got it. Thanks for the answer.

I attached the file if you are interested in seeing it


properties_editor.py (7.0 KB)

1 Like

Very cool! Great job!

1 Like

Soon :eyes:
image

8 Likes

Is this a similar modifier as edit poly in 3d’s max?
0_о

3 Likes

Wow, nice! 3ds Max memories indeed, as @HirasawaYui wrote.

Is this a custom modifier you’re developing in Python, or will it be part of the official modifiers in a new Blender version?

1 Like

Its Python, its just in the meanwhile while we wait for them to add it officially :slight_smile:

2 Likes

Modifier list 0.1.9.5

  • Added back support for Blender 4.2
  • New Edit Mesh Modifier! Works similar to Edit Poly in 3ds Max.
    image
    You can now do stuff like this in Blender:

    And this:
    image

(Only works in list mode)

6 Likes

Great, thanks! I also love how easy it is to update since Modifier List has become an extension. :+1:

4 Likes

Thank you! And as a developer, now whenever you screw up a new update and upload a broken version (make sure you get 1.9.6 in 4.2) its so fast now to do a few quick ninja fixes :grin: Really like the new system!

5 Likes

I’ve installed the latest 1.9.6 on B4.3 but I don’t see the Edit Mesh modifier.
Is it expected?
Also I can’t see the timings.

image

Installation (installed from disk due to a IT policy) seems fine with no errors.

Thanks a lot for the addon, I’ve been looking for something like this for a long time. I’m trying to figure out how the gizmo quick add works with lattice. Found this in the readme on git: “It’s automatically scaled to fit to the active object or to the selected elements if the object is in edit mode and at least two vertices are selected.”. I want the lattice to stretch to the size of several objects, but it doesn’t work. Like these:

Hi @marcatore, you find modifier execution time here:
image

And Edit Mesh here (Shift A Menu)
image
Both only works in List Mode.

2 Likes

Hi @ginger_beaver, seems a bit broken for me as well in edit mode, I look at it when I get time.

1 Like

Does anyone have any idea if geometry nodes allows you to influence instances meshes via booleans and other modifiers, non-destructively and without affecting the original object used as the “source” of instances? iirr 3ds Max can do that, it enable some interesting workflows.

But why?.gif

Can you give a short explanation of how it works and how similar or better is compared to the 3dsmax?

The modifier UI is now in C++ in Blender, since we got the drag and drop for modifiers. So the only way to draw new stuff in Python is to override the Class and build a completely new UI. At least to my knowledge? Do you know if its possible somehow to add stuff into the C++ UI? I would be very interested!

You can basically save a snapshot of your mesh at the time you add it, with all the modifiers up to that point applied in edit mode. The cool thing is that you can go back at any point to the none destructive version if you change your mind.

This is a very basic implementation, the 3ds Max one can do way more advanced stuff.

3 Likes

Ahh :disappointed_relieved::sweat_smile: i am not surprised it wouldn’t be too useful for the time being…