Post #2682: I tried this code and the button wasn’t disabled. It also crashed Blender when I
📋 Metadata
- Author: RaphaelBarros
- Date: 2019-08-28 13:01:21
- Type:
bug_report - Quality Score: 7/10
- Reply to: post_02678
- Replies (1): post_02684
🏷️ Tags
macro popup-dialog intermediate unsolved
⚙️ Related PME Features
- Macro Editor
- Popup Dialog Editor
- Python Scripting
💬 Content
I tried this code and the button wasn’t disabled. It also crashed Blender when I clicked on it. Here’s are my menus. The macro is the one “Duplicate and Rename”, it’s the last button inside the “Simplificar” popup, inside the panel “#2 Simplificar”.
my_pie_menus_15.json (120.9 KB)
While we’re at it, is there any way for me to reference a variable outside this button? For example, in case I want to make this button be disabled after it’s clicked, I’d make the macro create an variable (let’s say “var”) in the beginning, make it True, then make it false in the last step of the macro and make this:
sub = L.row(align=True); sub.enabled = var; operator(sub, "pme.exec", cmd="open_menu('Macro Operator Name')", text=slot, icon=icon, icon_value=icon_value)
Would that be possible? I tried referencing an outside variable on your previous example, but it keeps saying the variable didn’t exist:
sub = L.row(align=True); sub.enabled = False; operator(sub, "import_scene.obj", text=slot, icon=icon, icon_value=icon_value)