zoukankan      html  css  js  c++  java
  • Max中UVW的修复脚本

    今天发现有时候Max的UVW坐标会出现浮点数越限的情况,就变成了非法的浮点数,显示为 1.#QNAN 。从下面这段脚本的判断也可以明白是什么状况,即坐标既不大于等零也不小于等于零.....。出现此状况后在点级别就完全无法操作,可以用下面这段脚本解决,也可以将模型导成某种格式再导回来,同样可以达到效果。

    RepairUVW
    Fn RepairUVW targetMesh =
    (
    sourceClass
    = ClassOf targetMesh.Baseobject
    ConvertToMesh targetMesh
    for fi = 1 to GetNumFaces targetMesh.mesh do
    (
    ft
    = GetTVFace targetMesh.mesh fi

    for ni = 1 to 3 do
    (
    tempUvw
    = getTVert targetMesh.mesh ft[ni]
    for ui = 1 to 3 do
    (
    if (not tempUvw[ui] >= 0) and (not tempUvw[ui] <= 0) do tempUvw[ui] = 1
    )
    SetTVert targetMesh.mesh ft[ni] tempUvw
    )
    )
    Update targetMesh
    if sourceClass == Editable_Poly do ConvertTo targetMesh Editable_Poly
    AddModifier targetMesh (Unwrap_UVW())
    )

    for tempObj in Selection as array do RepairUVW tempObj

  • 相关阅读:
    matlab绘制椭圆 ezplot
    matlab绘制函数 y=ln(1+x)
    matlab绘制函数 y=e^(x)
    matlab绘制函数
    matlab绘制函数
    matlab绘制函数
    常用求导公式复习
    积分变换
    复变函数
    概率论与数理统计目录
  • 原文地址:https://www.cnblogs.com/sitt/p/1979810.html
Copyright © 2011-2022 走看看