"""
This will iterate all modelPanels and remove the "CgAbBlastPanelOptChangeCallback"
As such, after running this the following error should be fixed:
// Error: line 1: Cannot find procedure "CgAbBlastPanelOptChangeCallback". //
"""
from maya import cmds
for model_panel in cmds.getPanel(typ="modelPanel"):
# Get callback of the model editor
callback = cmds.modelEditor(model_panel, query=True, editorChanged=True)
# If the callback is the erroneous `CgAbBlastPanelOptChangeCallback`
if callback == "CgAbBlastPanelOptChangeCallback":
# Remove the callbacks from the editor
cmds.modelEditor(model_panel, edit=True, editorChanged="")
Maya脚本:Maya动画滑步修复工具,适用于常规绑定的人和动物模型
Python代码
import maya.cmds as cmds
def updateInfo(*args):
selected_objects = cmds.ls(selection=True)
if selected_objects:
selected_object = selected_objects[0]
current_frame = cmds.currentTime(query=True)
translate_z = cmds.getAttr(selected_object + ".translateZ")
cmds.floatField(currentFrameField, edit=True, value=current_frame)
cmds.floatField(translateZField, edit=True, value=translate_z)
else:
cmds.confirmDialog(title="警告", message="请选择一个对象。", button="好")
def updateInfo1(*args):
selected_objects = cmds.ls(selection=True)
if selected_objects:
selected_object = selected_objects[0]
current_frame = cmds.currentTime(query=True)
translate_z = cmds.getAttr(selected_object + ".translateZ")
cmds.floatField(currentFrameField1, edit=True, value=current_frame)
cmds.floatField(translateZField1, edit=True, value=translate_z)
else:
cmds.confirmDialog(title="警告", message="请选择一个对象。", button="好")
def calculateDifference(*args):
translate_z1 = cmds.floatField(translateZField1, query=True, value=True)
translate_z = cmds.floatField(translateZField, query=True, value=True)
current_frame1 = cmds.floatField(currentFrameField1, query=True, value=True)
current_frame = cmds.floatField(currentFrameField, query=True, value=True)
result = (translate_z1 - translate_z) / (current_frame1 - current_frame)
cmds.floatField(resultField, edit=True, value=result)
def applyNewTranslateZ(*args):
selected_objects = cmds.ls(selection=True)
if selected_objects:
selected_object = selected_objects[0]
new_translate_z = cmds.getAttr(selected_object + ".translateZ") + cmds.floatField(resultField, query=True, value=True)
current_frame = cmds.currentTime(query=True)
original_translate_z = cmds.getAttr(selected_object + ".translateZ", time=current_frame)
cmds.currentTime(current_frame + 1, edit=True)
cmds.setAttr(selected_object + ".translateZ", new_translate_z)
cmds.setKeyframe(selected_object, attribute="translateZ", t=current_frame + 1, v=new_translate_z)
if cmds.window("myWindow", exists=True):
cmds.deleteUI("myWindow")
window = cmds.window("myWindow", title="滑步修复工具@喵喵动画屋", widthHeight=(250, 350))
main_layout = cmds.columnLayout()
cmds.text(label="选定一个对象并点击下面的按钮来获取信息。")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="当前关键帧:")
currentFrameField = cmds.floatField(value=0, precision=0, editable=False)
cmds.setParent("..")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="位移Z:")
translateZField = cmds.floatField(value=0, precision=4, editable=False)
cmds.setParent("..")
cmds.button(label="获取起始帧信息", command=updateInfo)
cmds.separator(height=20, style="none")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="当前关键帧:")
currentFrameField1 = cmds.floatField(value=0, precision=0, editable=False)
cmds.setParent("..")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="位移Z:")
translateZField1 = cmds.floatField(value=0, precision=4, editable=False)
cmds.setParent("..")
cmds.button(label="获取结束帧信息", command=updateInfo1)
cmds.separator(height=20, style="none")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.button(label="计算差值", command=calculateDifference)
resultField = cmds.floatField(value=0, precision=4, editable=False)
cmds.setParent("..")
cmds.separator(height=20, style="none")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.button(label="开始修复滑步", command=applyNewTranslateZ)
cmds.setParent("..")
cmds.text(label="从“脚踩地”的这一帧开始修复,直到“脚离地”前一帧!", align="left")
cmds.showWindow(window)
Python code (English interface)
import maya.cmds as cmds
def updateInfo(*args):
selected_objects = cmds.ls(selection=True)
if selected_objects:
selected_object = selected_objects[0]
current_frame = cmds.currentTime(query=True)
translate_z = cmds.getAttr(selected_object + ".translateZ")
cmds.floatField(currentFrameField, edit=True, value=current_frame)
cmds.floatField(translateZField, edit=True, value=translate_z)
else:
cmds.confirmDialog(title="Warning", message="Please select an object.", button="OK")
def updateInfo1(*args):
selected_objects = cmds.ls(selection=True)
if selected_objects:
selected_object = selected_objects[0]
current_frame = cmds.currentTime(query=True)
translate_z = cmds.getAttr(selected_object + ".translateZ")
cmds.floatField(currentFrameField1, edit=True, value=current_frame)
cmds.floatField(translateZField1, edit=True, value=translate_z)
else:
cmds.confirmDialog(title="Warning", message="Please select an object.", button="OK")
def calculateDifference(*args):
translate_z1 = cmds.floatField(translateZField1, query=True, value=True)
translate_z = cmds.floatField(translateZField, query=True, value=True)
current_frame1 = cmds.floatField(currentFrameField1, query=True, value=True)
current_frame = cmds.floatField(currentFrameField, query=True, value=True)
result = (translate_z1 - translate_z) / (current_frame1 - current_frame)
cmds.floatField(resultField, edit=True, value=result)
def applyNewTranslateZ(*args):
selected_objects = cmds.ls(selection=True)
if selected_objects:
selected_object = selected_objects[0]
new_translate_z = cmds.getAttr(selected_object + ".translateZ") + cmds.floatField(resultField, query=True, value=True)
current_frame = cmds.currentTime(query=True)
original_translate_z = cmds.getAttr(selected_object + ".translateZ", time=current_frame)
cmds.currentTime(current_frame + 1, edit=True)
cmds.setAttr(selected_object + ".translateZ", new_translate_z)
cmds.setKeyframe(selected_object, attribute="translateZ", t=current_frame + 1, v=new_translate_z)
if cmds.window("myWindow", exists=True):
cmds.deleteUI("myWindow")
window = cmds.window("myWindow", title="Slide Fix Tool @ Meow Animation Studio", widthHeight=(250, 350))
main_layout = cmds.columnLayout()
cmds.text(label="Select an object and click the buttons below to get information.")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="Current Frame:")
currentFrameField = cmds.floatField(value=0, precision=0, editable=False)
cmds.setParent("..")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="Translate Z:")
translateZField = cmds.floatField(value=0, precision=4, editable=False)
cmds.setParent("..")
cmds.button(label="Get Start Frame Info", command=updateInfo)
cmds.separator(height=20, style="none")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="Current Frame:")
currentFrameField1 = cmds.floatField(value=0, precision=0, editable=False)
cmds.setParent("..")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.text(label="Translate Z:")
translateZField1 = cmds.floatField(value=0, precision=4, editable=False)
cmds.setParent("..")
cmds.button(label="Get End Frame Info", command=updateInfo1)
cmds.separator(height=20, style="none")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.button(label="Calculate Difference", command=calculateDifference)
resultField = cmds.floatField(value=0, precision=4, editable=False)
cmds.setParent("..")
cmds.separator(height=20, style="none")
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 70))
cmds.button(label="Start Slide Fix", command=applyNewTranslateZ)
cmds.setParent("..")
cmds.text(label="Start fixing from the frame where the foot touches the ground, until the frame just before the foot leaves the ground!", align="left")
cmds.showWindow(window)
Maya动画入门:一步步教你制作狗狗跑步动画!
3D动画:狗狗跑步参考图

视频中所用的狗狗绑定模型来源:3D Pincher Dog – TurboSquid 1714212
免费版权狗狗绑定模型推荐:dog rig in maya free 3D model rigged | CGTrader
从第1帧开始,制作第1个关键pose,狗的前后脚单脚踩地,调整重心和头部角度。

在第3帧,制作第2个关键pose,前双脚踩地,后双脚离地,调整重心和头部角度。

在第5帧,制作第3个关键pose,一只前脚踩地,后脚离地,调整重心和头部角度。

在第7帧,制作第4个关键pose,一只后脚踩地,前脚离地,调整重心和头部角度。

在第9帧,制作第5个关键pose,后双脚踩地,前双脚离地,调整重心和头部角度。

第11帧回到第1帧的pose,复制第1帧的pose到第11帧,形成循环。

Maya 教学:Maya启动加载速度提升一倍
maya启动慢,进入软件界面卡顿解决办法:
在主菜单栏中,选择“窗口 → 设置/首选项 →插件管理器”(Windows → Settings/Preferences → Plug-in Manager),取消勾选bif四项,mash,xgen,mota,然后重启maya即可。
bif,
bifmeshio.mll
允许以逐帧 .bif 文件格式缓存多边形网格。请参见使用 BIF 格式缓存网格。
bifrostGraph.mll
激活适用于 Maya 的 Bifrost Extension,这是一个用于实现程序效果的基于节点的框架。
bifrostshellnode.mll、bifrostvisplugin.mll
激活 Bifröst 流体模拟框架。
mash,
MASH.mll 做mash动画的插件
xgen,
xgenToolkit.mll XGen 几何体实例化器 做毛发的插件
mtoa,
Mtoa.mll 阿诺德渲染器插件
Maya Advanced Skeleton 5 人物头发绑定
本次视频介绍人物头发的绑定。
1.打开骨骼透视,显示关节
2.创建并对齐骨骼
3.创建控制器,吸附到骨骼中心
4.把骨骼和控制器分别P给头部骨骼和控制
5.用控制器父对象约束对应的骨骼
6.选择所有骨骼加选头发,添加影响
7.绘制权重,解锁骨骼权重锁定
8.通过旋转角度来辅助绘制权重
9.测试最终绑定效果
10.通过高级骨骼绑定插件发布最终文件
1.身体绑定教程:https://youtu.be/EZPkVhTf2jw
2.乳房绑定教程:https://youtu.be/OR6ojxL1Sio
3.面部绑定教程:https://youtu.be/I-RuOuUBs9o
4.毛发绑定教材:https://youtu.be/LdYbtMcX9xw
Maya Advanced Skeleton 5 人物面部绑定
advanced-skeleton link:https://www.animationstudios.com.au/advanced-skeleton
1.身体绑定教程:https://youtu.be/EZPkVhTf2jw
2.乳房绑定教程:https://youtu.be/OR6ojxL1Sio
3.面部绑定教程:https://youtu.be/I-RuOuUBs9o
Maya Advanced Skeleton 5 人物乳房绑定
advanced-skeleton link:https://www.animationstudios.com.au/advanced-skeleton
1.身体绑定教程:https://youtu.be/EZPkVhTf2jw
2.乳房绑定教程:https://youtu.be/OR6ojxL1Sio
3.面部绑定教程:https://youtu.be/I-RuOuUBs9o
Maya脚本:中文改英文脚本
Maya Advanced Skeleton 5 女性身体绑定
1.身体绑定教程:https://youtu.be/EZPkVhTf2jw
2.乳房绑定教程:https://youtu.be/OR6ojxL1Sio
3.面部绑定教程:https://youtu.be/I-RuOuUBs9o
Advanced Skeleton 5 插件介绍:这个插件完美支持maya,完全免费,可以创建具有无限身体配置、3 个头、5 条腿、100 个手指的装备,什么都可以。不仅是生物,你还可以装备道具,载具,以及任何东西。您可以随时从高级骨架返回适合骨架,进行更改并重建。
本期女性角色的绑定教程,主要分为三部分。包括人体,胸部(乳房),面部的绑定。这些呢,我都会逐一做一个演示,那么关于权重,一直是大家头疼的问题。所以在这个教程当中,我会结合自己的实践经验,尽可能用最简单的方法,让大家得到一个能够正常做动画的绑定模型。
Maya绘制法线贴图的三种方法推荐
Photoshop:效果好,制作效果因人而异,拓展性比较强
NormalMap-Online:效果一般,操作简单,限制图片大小
Normalmap Generator:效果好,使用简单,任意大小的图片都可以
NormalMap-Online(在线生成法线贴图):NormalMap-Online (cpetry.github.io)
Normalmap Generator(法线贴图生成器):Releases · Theverat/NormalmapGenerator · GitHub
