Hi, @servapunk
“Upgrade to 2.8x required” message means that the add-on doesn’t support Blender 2.8.
Try to install this fix for PME 1.15.3. I’m going to release it this week.
Note that Blender 2.8 is still in development and the add-on can be broken again at any time. Please let me know if this happens.
Nice, now its working great, thank you!
Hi roaoao!
I suddenly found out that the functionality of the “external script” was broken, it worked earlier just fine, but now I have:
/pie_menu_editor/ui_utils.py", line 171, in execute_script
exec(marshal.load(f), exec_globals)
ValueError: bad marshal data (unknown type code)
2.79 and last PME version
Try to delete
addons/pie_menu_editor/scripts/__pycache__
folder and restart Blender.
same ~_~
Same for me I can’t get external script files to work even if I removed cache folder and restarted blender
@chombor, @fiendish55, thanks, will try to fix.
Meanwhile you can disable caching in PME Preferences > Settings tab > General tab > Cache External Scripts
I just bought this great Add-on, and was making my first Menu!
Although, I’m wondering, is it possible in PME, or via External .Py Script, to click 1 button, but depending on Ctrl/Alt/Shift Key Pressed State, Trigger different Functions/Methods?
Like, if Ctrl is Held while Pressing PME Button, Reset Object Location.
If Alt Held, Reset Rotation
If Shift Held, Reset Scale?
Hmmmmm… I was’t able to get it to work. I must be doing something wrong…?
PieMenu_StackKey.m4v (824.0 KB)
Edit: I missed part of the GIF you linked. I might have it now… testing…
Edit2: I got it! Or understand now. Thank you!
Another Question.
I got this working via an external Python Script, in another format, but can I write this as 1 line, and skip the external file?
if bpy.context.space_data.show_only_render == False bpy.context.space_data.show_only_render = True else bpy.context.space_data.show_only_render = False
Edit: Another question :).
Is it possible to copy this panel or settings somehow, so I can move object in Local Space/etc? Ideally I’d like to be able to Toggle Global/Local Space buttons, and it would let me use the same spinners , but according to the space.
Toggle Global / Local, and use these Spinners to adjust in proper Space?
Use this code in Command tab:
bpy.context.space_data.show_only_render = not bpy.context.space_data.show_only_render
Or:
setattr(bpy.context.space_data, "show_only_render", True) if bpy.context.space_data.show_only_render == False else setattr(bpy.context.space_data, "show_only_render", False)
Or just use the path in Property tab to add a toggle button:
bpy.context.space_data.show_only_render
It’s not easy but I think it’s possible. You can copy active operator settings using:
bpy.context.active_operator...
Ah, thank you! Yeah, the If/Then makes more sense now!
I was looking into the active_operator, but I’m not sure how to use that exactly… maybe I can figure it out.
Edit:
So this is super janky I feel like, but I almost got what I want, more or less. I used a Property, to setup my Z Slider for Example. Then call a Python script, passing in the Value/Bools I need. Then in the script, check if World/Local Space, and Translate Accordingly… lol. Again, seems very hacky, but works…
But the main issue now is, when I Translate in Local Space, the Spinner Value doesn’t get any Data passed back to it, so the Location/Z Value is not accurate anymore.
I can do all this in Maxscript / C# / WPF easily, but not sure in here yet.
Ok, so I was able to get this to show up, based on the Active Operator.
The Values Match/Change between my UI and the side Panel, but the Object doesn’t actually move in the viewport…?
Not sure. Try to add undo positional argument (True):
bpy.ops.transform.translate(True, value=(msg[0].......)
Ah… ok. I can maybe try that / look into that.
I did realize I can setup a Translate operation, and then use Redo Last, to get a Popup of the side panel settings. So really, if I could just Macro both of those, that might be ok too. I’ll try that as well.
That active operator panel is hard-coded in Blender and has some special behavior. Blender calls bpy.ops.ed.undo_redo(True)
to apply changes made in that panel.
You can try to add custom Vector property with On Update code:
bpy.ops.ed.undo_redo(True)
Pie Menu Editor 1.15.4
What’s New:
- Blender 2.8 Alpha Support
- Python 3.7 Support
How to Update
- Backup your pie menus using Export button.
- Open User Preferences (ctrl+alt+U).
- Go to the Add-Ons tab.
- Click Install Add-on from File button, navigate to the file you downloaded and install it.
- Restart Blender.
Yeah, that works! At least as a debug/test.
Doing something like,
setattr(C.active_operator,"value",Vector((0,0,10)))
bpy.ops.ed.undo_redo(True)
But, to move in Z, i have to also set the Axis Constraints, to see the Update of course.
I’m not sure how I can use this yet/still trying to wrap my head around it.
I tried doing the Property/OnUpdate, but I must not have been doing it right.
Edit:
Seems like I can’t edit that stuff though via Python/External Script. Or it doesn’t update the UI anyways. I can only seem to get the Value.