Hi, when I invoke the popup dialog and click on the button, the function assigned to the button is triggered but the dialog box does not close. Has anyone encountered this problem?
Use list comprehensions. Here is the code for
[obj.select_set(True) for obj in bpy.context.scene.objects if obj.name.startswith("Cube")]
Hi, PME has
close_popups() function. Try to use it at the end of the code:
I’ll try to implement this in the next version.
Meanwhile you can add a new
Stack Key with 1 slot, left mouse button (drag) hotkey and assign function you want to it.
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?
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.
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.
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)
Command tab should work.
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)
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?
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! Thanks for it!
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.
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.
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!
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
And i need a little help with creating smooth/flat shading toggler
I manage it
bpy.ops.object.shade_flat() if bpy.context.object.data.polygons.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'")
Here is the code for
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')
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')