Skip to content

Commit

Permalink
Merge pull request #479 from Weisl/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Weisl authored Feb 2, 2024
2 parents 097a902 + eaf4c1d commit 20ee35c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions preferences/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,29 @@ def update_panel_category(self, context):


def get_default_executable_path():
'''Set the default exectuable path for the vhacd exe to the addon folder. '''
'''Set the default exectuable path for the vhacd executable to the addon folder. '''
path = Path(str(__file__))
parent = path.parent.parent.absolute()

vhacd_app_folder = "v-hacd_app"

if platform.system() != 'Windows':
if platform.system() not in ['Windows', 'Linux']:
return ''

OS_folder = 'Win'
OS_folder = ''
app_name = ''

if platform.system() == 'Windows':
OS_folder = 'Win'
app_name = 'VHACD-4_1.exe'
elif platform.system() == 'Linux':
OS_folder = 'Linux'
app_name = 'VHACD'

collider_addon_directory = os.path.join(
parent, vhacd_app_folder, OS_folder)

if os.path.isdir(collider_addon_directory):
app_name = 'VHACD-4_1.exe'

executable_path = os.path.join(collider_addon_directory, app_name)
if os.path.isfile(executable_path):
return executable_path
Expand Down Expand Up @@ -861,9 +868,9 @@ def draw(self, context):
row.prop(self, propName)

elif self.prefs_tabs == 'VHACD':
text = "Auto convex is only supported for Windows at this moment."
text = "Auto convex is only supported for Windows and Linux at this moment."
texts = [text]
if platform.system() != 'Windows':
if platform.system() not in ['Windows', 'Linux']:
for text in texts:
label_multiline(
context=context,
Expand Down
4 changes: 2 additions & 2 deletions ui/properties_panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def draw_auto_convex(layout, context):

# row.label(text='Auto Convex')

if platform.system() != 'Windows':
if platform.system() not in ['Windows', 'Linux']:
op = layout.operator("preferences.addon_search", text="", icon='PREFERENCES')
op.addon_name = addon_name
op.prefs_tabs = 'VHACD'

text = "Auto convex is only supported for Windows at this moment."
text = "Auto convex is only supported for Windows and Linux at this moment."
label_multiline(
context=context,
text=text,
Expand Down
Binary file added v-hacd_app/Linux/VHACD
Binary file not shown.

0 comments on commit 20ee35c

Please sign in to comment.