Pie Menu Editor 1.18.7

roaoao , i still thinks that , add user groups to the menu will helps a lot, right now all items are well catagorised but still if possible something like

user define name for whole bunch of menu sets , like , Draguu menu1 > in that you will see one pie menu and all the releted menus , no more mess

so in the end what left in the side panel will be only clean interface with user defined menu names ,

right now it has function of showing all the related menu under one menu right , so is there any option for showing only the main menus???

right now it shows related menus under one group but it also appear outside of the group ,

Just a suggestion , let me know what do you think about it,

Yes, this behavior is better and Iā€™ve spent a lot of time trying to implement it.
Iā€™m going to look at it again for the next version of the add-on.

hey man . is it possible to not to show button in popup . with if condition ,

like if object has materials then only show buttons , or if transparancy is on if ob.active_material.use transparent == True: then only show this button ,

Is it possible ?

look you will get an idea of what i mean

http://pasteall.org/pic/show.php?id=110443

and here is one with single material

http://pasteall.org/pic/show.php?id=110444

Yes, you can do it in Custom tab.
Iā€™ll post an example if you show me the code you use for that Materials panel.

here is a json link
https://drive.google.com/file/d/0B5_6TmbNuys1cjVQQVkwYTNURE0/view?usp=sharing

You can split that panel into 2 panels (main and sub-panel). And draw sub-panel in the main panel only when the object has materials (Custom tab):


your_condition_here and draw_menu("sub-panel")

for example "object has materials" condition:
ao = C.active_object; ao and len(ao.material_slots) and ao.material_slots[ao.active_material_index].material and draw_menu("sub-panel")

Here is a json: mat2.zip (929 Bytes)

wow that was awesome , man , but i dont understand how it works ā€¦ i mean

like in this case

ao = active object ,
but i see you have not added if statement anywhere ? only ā€œandā€ and then draw_menu? what is that ā€¦ i mean how to do that if this then that thing ???

suppose i want to turn on Xray of an object if wireframe is turned on then ,

if ao.wire == True:
ao.xray = True

how

Sometimes itā€™s easier to read/use ā€œand/orā€ instead of ā€œif/elseā€, especially in single line code. But you can use both:
DO_THIS if THIS else DO_THAT
THIS and DO_THIS or DO_THAT


setattr(ao, "xray", True) if ao.wire == True else None
or 
ao.wire == True and setattr(ao, "xray", True)

1 Like

i tried addin particle emission panel , but its not workin
panel(T.PARTICLE_PT_emission, frame=True, header=True)

Thanks, here is the fix.
I canā€™t send you the file because I it has some untested changes. But I think you know how to add this code to pie_menu_editor/init.py file (line 580):


            elif attr == "particle_system":
                value = self.get_modifier_by_type(
                    ao, 'PARTICLE_SYSTEM').particle_system

It will look like this:


...
            elif attr in BlContext.data:
                value = ao.data if ao else None
            elif attr == "particle_system":
                value = self.get_modifier_by_type(
                    ao, 'PARTICLE_SYSTEM').particle_system
            elif attr in BlContext.mods:
                value = self.get_modifier_by_type(ao, BlContext.mods[attr])
...

ok no prob man . thank ā€¦ i will add it :slight_smile:

ok here is the thing , after a few trial and error , somehow it works ,

but now it only shows 1st particle system index values in the emission panel , and if we remove all the particle system then it doesnt even show particle context window ,

Sorry, this one should work:


            elif attr in BlContext.data:
                value = ao.data if ao else None
            elif attr == "particle_system":
                if len(ao.particle_systems):
                    value = ao.particle_systems[
                        ao.particle_systems.active_index]
                else:
                    value = None
            elif attr in BlContext.mods:
                value = self.get_modifier_by_type(ao, BlContext.mods[attr])

haha it worked :slight_smile: tanks a lot man

Does the context menu in examples work with Pose mode? I donā€™t see an entry for it.

Nope, Iā€™ll post a better example here tomorrow.

hello,
i have a problem with reistallation of pie menu,

i have download the zip file


and this is the error report,
how i can install pie menu?


Hi, have you restarted Blender?

Here is an example.


def main():
    obj = C.selected_objects and C.active_object
    if not obj:
        open_menu("None Object")

    elif obj.type == "MESH":
        if obj.mode == 'EDIT':
            msm = C.tool_settings.mesh_select_mode
            msm[0] and open_menu("Vertex") or \
                msm[1] and open_menu("Edge") or \
                msm[2] and open_menu("Face") or \
                open_menu("Edit") or \
                open_menu("Mesh") or \
                open_menu("Any Object")

        else:
            open_menu(obj.mode.replace("_", " ").title()) or \
                open_menu("Mesh") or \
                open_menu("Any Object")

    else:
        open_menu(obj.mode.replace("_", " ").title()) or \
            open_menu(obj.type.replace("_", " ").title()) or \
            open_menu("Any Object")

main()

Save it as command_context_sensitive.py in pie_menu_editor/scripts folder. And use it in Command tab:


execute_script("scripts/command_context_sensitive_menu.py")

This script tries to find a menu by name and open it in this order:

None Object (if nothing is selected),
Vertex, Edge, Face,
(mesh edit mode),
Object, Edit, Pose, Sculpt, Vertex Paint, Weight Paint, Texture Paint, Particle Edit, Gpencil Edit,

Mesh, Curve, Surface, Meta, Font, Armature, Lattice, Empty, Camera, Lamp, Speaker,
Any Object

Hmmm thatā€™s interesting, I may have to try this. Pie menus are awesome ! Itā€™s like impossible to do without them now :stuck_out_tongue:

Next step for me will be to search for a way to save changes in new themes without having to type again the accurate theme name every single time x)