This commit is contained in:
2025-12-06 18:23:17 +08:00
parent 1f10abfb32
commit 9f30e905d7
259 changed files with 33763 additions and 348 deletions

View File

@@ -1,41 +0,0 @@
+ MAYAVERSION:2020 PLATFORM:win64 QuadRemesher 1.0.1 H:/Workspace/Raw/Tools/Maya/plug-ins/QuadRemesher
PATH +:= QuadRemesher
MAYA_PLUG_IN_PATH +:= plug-ins
MAYA_SCRIPT_PATH +:= scripts
MAYA_SHELF_PATH +:= shelves
XBMLANGPATH +:= icons
+ MAYAVERSION:2021 PLATFORM:win64 QuadRemesher 1.0.1 H:/Workspace/Raw/Tools/Maya/plug-ins/QuadRemesher
PATH +:= QuadRemesher
MAYA_PLUG_IN_PATH +:= plug-ins
MAYA_SCRIPT_PATH +:= scripts
MAYA_SHELF_PATH +:= shelves
XBMLANGPATH +:= icons
+ MAYAVERSION:2022 PLATFORM:win64 QuadRemesher 1.0.1 H:/Workspace/Raw/Tools/Maya/plug-ins/QuadRemesher
PATH +:= QuadRemesher
MAYA_PLUG_IN_PATH +:= plug-ins
MAYA_SCRIPT_PATH +:= scripts
MAYA_SHELF_PATH +:= shelves
XBMLANGPATH +:= icons
+ MAYAVERSION:2023 PLATFORM:win64 QuadRemesher 1.0.1 H:/Workspace/Raw/Tools/Maya/plug-ins/QuadRemesher
PATH +:= QuadRemesher
MAYA_PLUG_IN_PATH +:= plug-ins
MAYA_SCRIPT_PATH +:= scripts
MAYA_SHELF_PATH +:= shelves
XBMLANGPATH +:= icons
+ MAYAVERSION:2024 PLATFORM:win64 QuadRemesher 1.0.1 H:/Workspace/Raw/Tools/Maya/plug-ins/QuadRemesher
PATH +:= QuadRemesher
MAYA_PLUG_IN_PATH +:= plug-ins
MAYA_SCRIPT_PATH +:= scripts
MAYA_SHELF_PATH +:= shelves
XBMLANGPATH +:= icons
+ MAYAVERSION:2025 PLATFORM:win64 QuadRemesher 1.0.1 H:/Workspace/Raw/Tools/Maya/plug-ins/QuadRemesher
PATH +:= QuadRemesher
MAYA_PLUG_IN_PATH +:= plug-ins
MAYA_SCRIPT_PATH +:= scripts
MAYA_SHELF_PATH +:= shelves
XBMLANGPATH +:= icons

View File

@@ -36,7 +36,21 @@ def initializePlugin(plugin):
a=1
# install the ShelfButton the first time and if not already installed
mel.eval('QuadRemesher_shelf')
try:
import os
# Get plugin directory
plugin_path = om.MFnPlugin(plugin).loadPath()
quadremesher_dir = os.path.dirname(plugin_path)
shelf_mel = os.path.join(quadremesher_dir, 'shelves', 'QuadRemesher_shelf.mel')
shelf_mel = os.path.normpath(shelf_mel).replace('\\', '/')
if os.path.exists(shelf_mel):
mel.eval(f'source "{shelf_mel}"')
mel.eval('QuadRemesher_shelf')
else:
print(f"Warning: QuadRemesher shelf file not found at: {shelf_mel}")
except Exception as e:
print(f"Warning: Could not install QuadRemesher shelf: {e}")
# Uninitialize the plug-in

View File

@@ -6,7 +6,7 @@ global proc QuadRemesher_shelf () {
if ($verbose) print "QuadRemesher_shelf execution...\n";
$theButtonCommand = "import QuadRemesher\nqr = QuadRemesher.QuadRemesher()\n";
$theButtonCommand = "import sys, os, maya.cmds as mc\nplug_info = mc.pluginInfo('QuadRemesherPlugIn', q=True, path=True)\nqr_scripts = os.path.join(os.path.dirname(plug_info), '..', 'scripts')\nqr_scripts = os.path.normpath(qr_scripts)\nif qr_scripts not in sys.path: sys.path.insert(0, qr_scripts)\nimport QuadRemesher\nqr = QuadRemesher.QuadRemesher()";
// search if the shelfButton exists:
// NB: shelfButton -query -exists "QuadRemesher" doesn't work because, the name of the shelfButtons are not saved by Maya in shelf.mel

View File

@@ -1,12 +0,0 @@
安装方法:
1. 修改 QuadRemesher.mod 文件中的脚本路径为当前路径,如:
H:/Workspace/Raw/Tools/Maya/plug-ins/QuadRemesher
注意要使用“/”而不是 “\”
2. 复制 QuadRemesher.mod 文件到 Documents\maya\modules 文件夹中
2. 运行Maya
3. 在插件管理器中启用QuadRemesher插件