Last active
January 12, 2023 04:32
-
-
Save lampysprites/ef7511e47eb1855c6869c03bca0a8e6d to your computer and use it in GitHub Desktop.
Add Armory run button to blender top panel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## armory/blender/arm/props_ui.py | |
def draw_space_topbar(self, context): | |
box = self.layout.row(align=True) | |
if state.proc_play is None and state.proc_build is None: | |
box.operator("arm.play", icon="PLAY", text="") | |
else: | |
box.operator("arm.stop", icon="MESH_PLANE", text="") | |
box.operator("arm.open_editor", icon="DESKTOP", text="") | |
box.operator("arm.open_project_folder", icon="FILE_FOLDER", text="") | |
box.popover(panel="ARM_PT_ArmoryPlayerPanel", text="") | |
## in register() | |
bpy.types.TOPBAR_HT_upper_bar.append(draw_space_topbar) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
*needs admin permissions on windows