@roaoao
Thanks again for your addon and for the precious help you give to users.
Currently, I have a pie menu that allows me to toggle on/off the “auto depth” selection mode. It uses the “C.preferences.inputs.use_mouse_depth_navigate” property.
I would like every time I toggle on “auto depth” to also activate the “zoom to mouse” option and desactivate it when auto depth is off while keeping the visual feedback showing if “auto depth” is engaged.
Is there a solution?
You can use C.window.cursor_warp(x, y) to move the mouse and call a pie with some delay using pme.timeout operator.
Eg. call the pie in the center of 3DView:
a = find_by(C.screen.areas, "ui_type", 'VIEW_3D'); a and C.window.cursor_warp(a.x + a.width / 2, a.y + a.height / 2); a and bpy.ops.pme.timeout(cmd="open_menu('Pie Menu')")
No problem on the late reply, I’m just glad to make progress where i would have been stuck otherwise. With the Shadow Layer/Material, if I wanted to toggle the shadow layer and material to whatever the last layer and material was, how would I do that?
Thank you!
I restrict pie menu to the edit mode, so now i can use just
bpy.ops.mira.make_arc()
Is the way to create a toggle, for smooth/flat shading in one pie item
This way it working only for meshes, but not for curves
bpy.ops.object.shade_flat() if bpy.context.object.data.polygons[0].use_smooth else bpy.ops.object.shade_smooth()
And this for no one
bpy.ops.object.shade_flat() if bpy.context.object.data.polygons[0].use_smooth or bpy.context.object.data.splines[0].use_smooth else bpy.ops.object.shade_smooth()
@roaoao
is it possible to change the hotkey 1-8 to a custom hotkey inside the pie menu item?
e.g.: by default the hotkey for the pie on the right is 6. Could I change it to W?