Pie Menu Editor 1.17.3

Does the current version have a way to create the Preset menu or Images Thumbnails like in the image below?
If not, do you plan to support this feature for the next version?

VulBPhTvNU

Hi there, just bought the add on its great so far.

I was wondering if its possible to add the existing context sensitive ‘toolbar’ menu to the bottom of a pie menu? and if that was not possable, a way to bring that menu up. I tried copying the existing ‘wm.toolbar’ but that didn’t do anything at all.

Cheers,

Thank you for looking into it for me. Is there a way to make a dynamic stack key that toggles between a specified tool and the last selected tool you had before choosing that tool?

Yes, looks like it’s possible. Custom tab:

from bl_ui.space_toolsystem_common import ToolSelectPanelHelper; cls = ToolSelectPanelHelper._tool_class_from_space_type(C.space_data.type); col = L.column(); col.scale_x = 1.2; cls.draw_cls(col.column(), C, detect_layout=False)

bpy.ops.wm.toolbar() in Command tab should work.

4 Likes

Yes, here is the code for a stack key:

tool_id = "builtin.select_box"; tool = C.workspace.tools.from_space_view3d_mode(C.mode); tool_id = getattr(pme, "prev_tool", tool_id) if tool_id == tool.idname else tool_id; setattr(pme, "prev_tool", tool.idname); bpy.ops.wm.tool_set_by_id(name=tool_id)
2 Likes

Thank you again

Ok, I tried it and it doesn’t seem to be working. What I’m trying to do is toggle between the mask tool and which ever sculpt brush I had before using the mask tool. Maybe I should have specified so I apologize for that. I changed the "builtin selection tool " part of your code and replaced it with the mask tool name but it still didn’t work for me.

UPDATE: It works sometimes but not consistently

Oh, I forgot to ask something else I wanted to do! Grease pencil has an Line Tool, Arc tool, Arc, Curve, Etc. They All require the use of the E key to extrude the strokes in draw mode. I’m trying to remap the E key to left mouse (press) but I can’t seem to find these keymaps in blender preferences or the PME addon. How do I remap the E key to LMB press?

Thank you!

I just bought this Add-On and would like to say thanks for Roaoao for developing it.
I do my daily CAD work in Alias AutoStudio and your Add-On makes my switch to Blender in my privat time so much easier. Coming from the Autodesk world, I’m completely amazed how open minded and great the user and developer community here is. It’s fantastic! :smiley: Thanks for it!

1 Like

builtin_brush.Mask tool id works for me:

tool_id = "builtin_brush.Mask"; tool = C.workspace.tools.from_space_view3d_mode(C.mode); tool_id = getattr(pme, "prev_tool", tool_id) if tool_id == tool.idname else tool_id; setattr(pme, "prev_tool", tool.idname); bpy.ops.wm.tool_set_by_id(name=tool_id)

Can you record and post a video?

I can’t find the keymap either. :confused:

Hi roaoao!

For more than year i’m trying to move with my pipeline from Maya&Mudbox to Blender. From the beginning with help of Pie Menu Editor. Great tool. I’m really appreciated for your work.

Already i’m stuck at texturing (handpainting) pipeline. Want to sneak some functionality from Mudbox like:

  • LMB is for simple painting with default brush
  • Shift + LMB is for blur - but when its released it goes back to simple draw

I assume that for Shift + LMB i need to use sticky key.
On press:

bpy.context.scene.b_painter_brush = 'Brush Blur'; bpy.ops.paint.image_paint(mode='NORMAL')

On release i’m going back to previous brush:

bpy.context.scene.b_painter_brush = 'Brush Default'

Blender is changing tool but doesn’t using it - like pressing LMB is not doing any action ( besides changing the cursor )

Any idea how to resolve that problem?

Hi. Is it possible to set two statuses with an if condition on a button?
Exa: I have a Curve, I want to set up two types of Splines: Bezier / Poly assigned to a button. When i press the button, if the Splines are Bezier type will turn into Poly and vice versa.
Hope you help, Thank! :grinning:

Hello!
Id like to add condition before running main command
but it hides settings for the command and don’t expose it in edit mode in adjust last operation
image
image
Any suggestions?
And i need a little help with creating smooth/flat shading toggler


UPD
I manage it
bpy.ops.object.shade_flat() if bpy.context.object.data.polygons[0].use_smooth else bpy.ops.object.shade_smooth()
but was wrong with syntax at the first time

Thanks for looking into it for me. The mask toggle is working for me now. Will there be an update in the future to allow keymap for extruding strokes for the curve tools in Grease Pencil?

Try to use a Macro Operator with these 3 slots:

bpy.context.scene.b_painter_brush = 'Brush Blur'
bpy.ops.paint.image_paint(mode='NORMAL')
bpy.ops.pme.timeout(cmd="bpy.context.scene.b_painter_brush = 'Brush Default'")
2 Likes

Here is the code for Command tab:

sel_bezier_splines = [s for s in C.object.data.splines if [p for p in s.bezier_points if p.select_control_point]]; is_bezier = len(sel_bezier_splines) > 0; bpy.ops.curve.spline_type_set('INVOKE_DEFAULT', True, type='POLY' if is_bezier else 'BEZIER')

Or Custom tab with customizable icons and labels:

sel_bezier_splines = [s for s in C.object.data.splines if [p for p in s.bezier_points if p.select_control_point]]; is_bezier = len(sel_bezier_splines) > 0; L.operator("pme.exec", text="Bezier" if is_bezier else "Poly", icon='IPO_BEZIER' if is_bezier else 'IPO_CONSTANT').cmd = "bpy.ops.curve.spline_type_set('INVOKE_DEFAULT', True, type='%s')" % ('POLY' if is_bezier else 'BEZIER')
2 Likes

Not in PME. The add-on uses existing Blender keymaps.

Hi

Let’s imagine that I want to change size / opacity / hardness of a painting brush only by pressing RMB (for size, RMB + Shift for opacity etc. ) and swiping to the left or right, by releasing RMB confirming the action ( especially useful and fast while using graphic tablet ).

I’ve done it by modal operator but it lacks of visualization circle of mouse movement and seams updating the parameters too rare ( in Mudbox it’s updating every pixel of movement ). Is there a way to use movement of a mouse also in top/ bottom direction?




So tried to achieve it in another way by regular Blender Keymap menu:
Everything looks OK but program is not remembering my modification of a parameter - he just goes back to original size of a brush after releasing RMB.

Any ideas how to resolve the problem by any of these paths? :slight_smile:

ps. @roaoao : thanks for your previous advice - works like a charm :slight_smile:

Hi @roaoao, Is it possible to reuse (change the parameter values) a modifier without stacking another within in the modal operator? I’m confused on how the order of the items within the operator has to be.

Hi. roaoao.

I specified the following code in the command field of Stack Key and tried to call the toolbar menu, but it doesn’t call the menu for some reason.

bpy.ops.wm.toolbar()

By the way, I was able to call the menu normally as a result of calling directly from the shortcut menu without using Pie Menu Editor.