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 ,
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")
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 ,
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)
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 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 ,
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])
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: