This commit is contained in:
Jeffreytsai1004 2025-01-15 23:17:52 +08:00
parent 86cf4ed685
commit 2eafdd7fad
8 changed files with 44 additions and 26 deletions

View File

@ -1,5 +1,5 @@
#All Rights Belongs to Uzay CALISKAN #!/usr/bin/env python
#Artstation Marketplace Standart License # -*- coding: utf-8 -*-
import maya.cmds as qqdgffvdrevd2121 import maya.cmds as qqdgffvdrevd2121
import sys import sys

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import maya.cmds as cmds import maya.cmds as cmds
import os import os
import os.path as ospathe import os.path as ospathe

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import importlib import importlib
import sys import sys
import maya.cmds as cmds import maya.cmds as cmds
@ -23,7 +26,7 @@ else:
"OS not supported, please compile dependencies and add value to LIB_DIR" "OS not supported, please compile dependencies and add value to LIB_DIR"
) )
# Adds directories to path # 将目录添加到路径中
syspath.insert(0, ROOT_DIR) syspath.insert(0, ROOT_DIR)
sys.path.append(f"{ROOT_DIR}/examples") sys.path.append(f"{ROOT_DIR}/examples")
syspath.insert(0, LIB_DIR) syspath.insert(0, LIB_DIR)

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#All Rights Belongs to Uzay CALISKAN #All Rights Belongs to Uzay CALISKAN
#Artstation Marketplace Standart License #Artstation Marketplace Standart License

View File

@ -1,4 +1,7 @@
#GNU General Public License #!/usr/bin/env python
# -*- coding: utf-8 -*-
#GPL通用公共许可证
import pymel.core as pm import pymel.core as pm
import maya.cmds as cmds import maya.cmds as cmds
import sys import sys

View File

@ -3,6 +3,7 @@
import maya.cmds as cmds import maya.cmds as cmds
import sys import sys
import os
import importlib import importlib
def run(): def run():
@ -22,18 +23,20 @@ def run():
# 检查第一个对象是否绑定了蒙皮 # 检查第一个对象是否绑定了蒙皮
shapes = cmds.listRelatives(selected[0], shapes=True) shapes = cmds.listRelatives(selected[0], shapes=True)
# 获取蒙皮
skin = cmds.listConnections(shapes[0], type="skinCluster") skin = cmds.listConnections(shapes[0], type="skinCluster")
if not skin: if not skin:
raise RuntimeError(f"第一个选中的对象没有绑定蒙皮簇!") raise RuntimeError(f"第一个选中的对象没有绑定蒙皮簇!")
# 执行 extractDeltas 命令 # 执行 extractDeltas 命令 从变形网格中提取建模的修正形状
cmds.extractDeltas(s=selected[0], c=selected[1]) cmds.extractDeltas(s=selected[0], c=selected[1])
# 选择第二个对象 # 选择第二个对象
cmds.select(selected[1], replace=True) cmds.select(selected[1], replace=True)
# 导入并运行 bsIndex # 导入并运行 bsIndex 计算修正形状的索引, 指定 bsIndex 的路径为当前路径
sys.path.append('C:/Arts and Spells/Metapipe Studio 1.3.0') BSINDEX_PATH = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BSINDEX_PATH)
import bsIndex import bsIndex
importlib.reload(bsIndex) importlib.reload(bsIndex)
bsIndex.calc() bsIndex.calc()

View File

@ -1,45 +1,45 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# #
# extractDeltas.py # extractDeltas.py
# v1.4 # v1.4
# #
# extract a modeled corrective shape from a deformed skinned mesh # 从变形的蒙皮网格中提取建模的修正形状
# #
# original c++ extract deltas plugin by James Jacobs # 原始 c++ extract deltas 插件作者:James Jacobs
# #
# python conversion, improvements and maintenance by Ingo Clemens # Python 转换、改进和维护:Ingo Clemens
# www.braverabbit.com # www.braverabbit.com
# #
# brave rabbit, Ingo Clemens 2014 # brave rabbit, Ingo Clemens 2014
# #
# versions: # 版本历史:
# #
# 1.4 - included mel scripts # 1.4 - 包含了 mel 脚本
# 1.3 - improved shape comparison without the need of blendshapes # 1.3 - 改进了形状比较,无需使用混合变形
# 1.2 - added the vertex list flag to work only on a given component list # 1.2 - 添加了顶点列表标志,仅在给定的组件列表上工作
# 1.1 - optimized performance because it now works on sculpted points only # 1.1 - 优化了性能,因为现在只对雕刻的点进行处理
# (0.06 - c++ version, 1.88 - version 1.0, 0.14 - version 1.1) # (0.06 - c++ 版本, 1.88 - 1.0版本, 0.14 - 1.1版本)
# 1.0 - initial python conversion # 1.0 - 初始 Python 转换
# #
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# #
# This program is free software; you can redistribute it and/or # 本程序是自由软件;您可以根据自由软件基金会发布的 GNU 通用公共许可证
# modify it under the terms of the GNU General Public License # 第2版或您可以选择任何更新版本的条款重新发布和/或修改它。
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # 本程序的发布是希望它能有用,但不提供任何保证;甚至没有
# but WITHOUT ANY WARRANTY; without even the implied warranty of # 适销性或特定用途适用性的暗示保证。详情请参阅
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU 通用公共许可证。
# GNU General Public License for more details.
# #
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# #
# USE AND MODIFY AT YOUR OWN RISK!! # 使用和修改需自行承担风险!!
# #
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import tkinter as tk import tkinter as tk
from tkinter import ttk from tkinter import ttk
from tkinter.filedialog import askdirectory, askopenfilename from tkinter.filedialog import askdirectory, askopenfilename