Skip to content

Commit

Permalink
Add UI to 3D View N panel
Browse files Browse the repository at this point in the history
  • Loading branch information
iplai committed Feb 19, 2024
1 parent a366990 commit cdfb36f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion marimo_blender/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "iplai",
"description": "Reactive notebook for Python integrated in blender",
"blender": (2, 80, 0),
"version": (0, 2, 4),
"version": (0, 2, 5),
"location": "View 3D > Header Menu > Notebook",
"doc_url": "https://github.com/iplai/marimo-blender",
"tracker_url": "https://github.com/iplai/marimo-blender/issues",
Expand All @@ -28,7 +28,23 @@ def marimo_header_btn(self: bpy.types.Menu, context):
self.layout.operator(StartMarimoServer.bl_idname, icon='CURRENT_FILE', text="")


class Marimo_PT_main_panel(bpy.types.Panel):
bl_label = "Notebook"
bl_idname = "Marimo_PT_main_panel"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = 'Marimo'

def draw(self, context):
layout = self.layout
pref = context.preferences.addons[__package__].preferences
# layout.prop(pref, "server_port")
layout.prop(pref, "filename", text="File Path")
layout.operator(StartMarimoServer.bl_idname, icon='URL', text="Start Notebook Server")


classes = (
Marimo_PT_main_panel,
MarimoAddonPreferences,
InstallPythonModules,
InstallPythonModule,
Expand Down

0 comments on commit cdfb36f

Please sign in to comment.