Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add help menu #48

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bioxelnodes/assets/Nodes/BioxelNodes_latest.blend
Git LFS file not shown
2 changes: 1 addition & 1 deletion bioxelnodes/blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version = "1.0.0"

id = "bioxelnodes"
version = "1.0.3"
version = "1.0.4"
name = "Bioxel Nodes"
tagline = "For scientific volumetric data visualization in Blender"
maintainer = "Ma Nan <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion bioxelnodes/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path

VERSIONS = [{"label": "Latest", "node_version": (1, 0, 3)},
VERSIONS = [{"label": "Latest", "node_version": (1, 0, 4)},
{"label": "v0.3.x", "node_version": (0, 3, 3)},
{"label": "v0.2.x", "node_version": (0, 2, 9)}]

Expand Down
10 changes: 9 additions & 1 deletion bioxelnodes/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
ExtractNodeMesh, ExtractNodeBboxWire, ExtractNodeShapeWire)

from .operators.io import (ImportAsLabel, ImportAsScalar, ImportAsColor)
from .operators.misc import (CleanTemp,
from .operators.misc import (CleanTemp, Help,
ReLinkNodeLib, RemoveAllMissingLayers,
RenderSettingPreset, SaveAllLayersCache,
SaveNodeLib, SliceViewer)
Expand Down Expand Up @@ -57,6 +57,10 @@ def draw(self, context):
layout.separator()
layout.menu(RenderSettingMenu.bl_idname)

layout.separator()
layout.operator(Help.bl_idname,
icon=Help.bl_icon)


class FetchLayerMenu(bpy.types.Menu):
bl_idname = "BIOXELNODES_MT_ADD_LAYER"
Expand Down Expand Up @@ -210,6 +214,10 @@ def draw(self, context):
layout.separator()
layout.menu(RenderSettingMenu.bl_idname)

layout.separator()
layout.operator(Help.bl_idname,
icon=Help.bl_icon)


def TOPBAR(self, context):
layout = self.layout
Expand Down
14 changes: 14 additions & 0 deletions bioxelnodes/operators/misc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import webbrowser
import bpy
from pathlib import Path
import shutil
Expand Down Expand Up @@ -260,3 +261,16 @@ def invoke(self, context, event):
event,
message=f"Are you sure to remove all **Missing** layers?")
return {'RUNNING_MODAL'}


class Help(bpy.types.Operator):
bl_idname = "bioxelnodes.help"
bl_label = "Need Help?"
bl_description = "Online Manual for Beginner"
bl_icon = "HELP"

def execute(self, context):
webbrowser.open(
'https://omoolab.github.io/BioxelNodes/latest/', new=2)

return {'FINISHED'}
2 changes: 1 addition & 1 deletion docs/qa.md → docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Q & A
# FAQ

## Nothing in the scene when rendering?

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ nav:
- Advanced Usage: advanced_usage.md
- Support Format: support_format.md
- Improve Performance: improve_performance.md
- Q & A: qa.md
- FAQ: faq.md
- Tutorials:
- SARS-Cov-2: SARS-Cov-2.md

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bioxelnodes"
version = "1.0.3"
version = "1.0.4"
description = ""
authors = ["Ma Nan <[email protected]>"]
license = "MIT"
Expand Down
Loading