Skip to content
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
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"description": "Creates active touch zones over View 2D and 3D areas for easier viewport navigation with touch screens and pen tablets.",
"author": "NENDO, Karan(b3dhub)",
"blender": (2, 93, 0),
"version": (4, 2, 0),
"version": (4, 2, 1),
"category": "3D View",
"location": "View3D > Tools > NENDO",
"warning": "",
Expand Down
24 changes: 12 additions & 12 deletions blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version = "1.0.0"

id = "touchview"
version = "4.2.0"
version = "4.2.1"
name = "Touch Viewport"
tagline = "Creates active touch zones over View 2D and 3D areas"
maintainer = "NENDO, Karan(b3dhub)"
Expand All @@ -23,15 +23,15 @@ files = "preserve settings when enabling/disabling the add-on"

[build]
paths_exclude_pattern = [
"__pycache__/",
"/.git/",
"docs/",
".gitignore",
"/*.zip",
"/bin",
"settings.json",
"bundle.sh",
"mypy.ini",
"requirements.txt",
"README.md"
"__pycache__/",
"/.git/",
"docs/",
".gitignore",
"/*.zip",
"/bin",
"settings.json",
"bundle.sh",
"mypy.ini",
"requirements.txt",
"README.md",
]
4 changes: 2 additions & 2 deletions preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ def draw(self, context):

if self.gizmo_tabs == "ACTIONS":
if not self.show_float_menu:
col.operator("view3d.toggle_floating_menu", text="Show Action Menu")
col.operator("touchview.toggle_floating_menu", text="Show Action Menu")
else:
col.operator("view3d.toggle_floating_menu", text="Hide Action Menu", depress=True)
col.operator("touchview.toggle_floating_menu", text="Hide Action Menu", depress=True)
box = col.box()
box.active = self.show_float_menu
col = box.column()
Expand Down
6 changes: 3 additions & 3 deletions source/ops/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TOUCHVIEW_OT_flip_tools(Operator):
"""Relocate Tools panel between left and right"""

bl_label = "Tools Region Swap"
bl_idname = "view3d.tools_region_flip"
bl_idname = "touchview.tools_region_flip"

@classmethod
def poll(cls, context):
Expand All @@ -33,7 +33,7 @@ class TOUCHVIEW_OT_next_pivot_mode(Operator):
"""Step through Pivot modes"""

bl_label = "Use next Pivot mode"
bl_idname = "view3d.step_pivot_mode"
bl_idname = "touchview.step_pivot_mode"

@classmethod
def poll(cls, context):
Expand Down Expand Up @@ -90,7 +90,7 @@ class TOUCHVIEW_OT_toggle_floating_menu(Operator):
"""Toggle Floating Menu"""

bl_label = "Toggle Floating Menu"
bl_idname = "view3d.toggle_floating_menu"
bl_idname = "touchview.toggle_floating_menu"

def execute(self, context):
prefs = preferences()
Expand Down
4 changes: 3 additions & 1 deletion source/ops/touch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Built-in modules
import math

import bpy
Expand All @@ -7,6 +8,7 @@
region_2d_to_vector_3d)
from mathutils import Vector

# Local modules
from ..utils.blender import preferences
from ..utils.constants import (FINISHED, LMOUSE, PASSTHROUGH, PEN, PRESS,
RMOUSE, brush_modes, input_mode_items)
Expand Down Expand Up @@ -112,7 +114,7 @@ def invoke(self, context, event):
prefs = preferences()
if not prefs.is_enabled:
return PASSTHROUGH
if settings.input_mode == "full" and (event.type == PEN or not isTouch(event)):
if prefs.input_mode == "FULL" and (event.type == PEN or not is_touch(event)):
return PASSTHROUGH

if event.value != PRESS:
Expand Down
12 changes: 9 additions & 3 deletions source/ui/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ def draw(self, context):
col.prop(prefs, "enable_floating_toggle")


class TOUCHVIEW_PT_ControlZones(TouchView, Panel):
class TOUCHVIEW_PT_control_zones(TouchView, Panel):
bl_label = "Control Zones"
bl_parent_id = "TOUCHVIEW_PT_view_3d_panel"
bl_options = {"DEFAULT_CLOSED"}

def draw_header(self, context):
prefs = preferences()
Expand Down Expand Up @@ -78,6 +79,7 @@ def draw(self, context):
class TOUCHVIEW_PT_gizmo_bar(TouchView, Panel):
bl_label = "Gizmo"
bl_parent_id = "TOUCHVIEW_PT_view_3d_panel"
bl_options = {"DEFAULT_CLOSED"}

def draw(self, context):
prefs = preferences()
Expand All @@ -101,6 +103,7 @@ def draw(self, context):
class TOUCHVIEW_PT_right_click(TouchView, Panel):
bl_label = "Right Click Actions"
bl_parent_id = "TOUCHVIEW_PT_view_3d_panel"
bl_options = {"DEFAULT_CLOSED"}

def draw(self, context):
prefs = preferences()
Expand All @@ -117,6 +120,7 @@ def draw(self, context):
class TOUCHVIEW_PT_double_click(TouchView, Panel):
bl_label = "Double Click Actions"
bl_parent_id = "TOUCHVIEW_PT_view_3d_panel"
bl_options = {"DEFAULT_CLOSED"}

def draw(self, context):
prefs = preferences()
Expand All @@ -133,6 +137,7 @@ def draw(self, context):
class TOUCHVIEW_PT_tool_settings(TouchView, Panel):
bl_label = "Tool Options"
bl_parent_id = "TOUCHVIEW_PT_view_3d_panel"
bl_options = {"DEFAULT_CLOSED"}

def draw(self, context):
prefs = preferences()
Expand All @@ -147,6 +152,7 @@ def draw(self, context):
class TOUCHVIEW_PT_viewport_options(TouchView, Panel):
bl_label = "Viewport Options"
bl_parent_id = "TOUCHVIEW_PT_view_3d_panel"
bl_options = {"DEFAULT_CLOSED"}

def draw(self, context):
prefs = preferences()
Expand All @@ -159,7 +165,7 @@ def draw(self, context):
space = context.area.spaces.active

col = layout.column()
col.operator("view3d.tools_region_flip", text="Flip Tools")
col.operator("touchview.tools_region_flip", text="Flip Tools")
if len(space.region_quadviews) > 0:
col.operator("screen.region_quadview", text="Disable Quadview")
else:
Expand Down Expand Up @@ -283,7 +289,7 @@ def __operator_exists(self, idname):

classes = (
TOUCHVIEW_PT_view_3d_panel,
TOUCHVIEW_PT_ControlZones,
TOUCHVIEW_PT_control_zones,
TOUCHVIEW_PT_gizmo_bar,
TOUCHVIEW_PT_right_click,
TOUCHVIEW_PT_double_click,
Expand Down
2 changes: 1 addition & 1 deletion source/utils/keymaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def assign_keymaps():
kmi = km.keymap_items.new("view2d.pan", LMOUSE, PRESS)
modified_keymaps.append((km, kmi))

# add LEFT MOUSE ACTION for view3d.view_ops
# add LEFT MOUSE ACTION for touchview.view_ops
for kmap in wm.keyconfigs["Blender"].keymaps:
km = wm.keyconfigs.addon.keymaps.new(name=kmap.name, space_type=kmap.space_type, region_type=kmap.region_type)
if kmap.name in top_level_names:
Expand Down
Loading