zoukankan      html  css  js  c++  java
  • maya图片文件加载

    maya图片文件加载过程学习

    // ===========================================================================
    // Copyright 2017 Autodesk, Inc. All rights reserved.
    //
    // Use of this software is subject to the terms of the Autodesk license
    // agreement provided at the time of installation or download, or which
    // otherwise accompanies this software in either electronic or hard copy form.
    // ===========================================================================
    global proc art3dPaintUpdateTextures(
        string $fileName
    ) 
    //
    //    Description:
    //        Find all the shaders which has that texture assigned to 
    //        the paint attr and force the update on those shaders
    //        to update the swatches and ensure that all the textures
    //        are validect.    
    //
    {
        string $textures[] = `ls -tex`;
        for ( $tex in $textures ) {
            string $nType = `nodeType $tex`;
            if ( $nType == "file" ) {
                string $namePlug = $tex + ".fileTextureName";
                string $fName = `getAttr $namePlug`;
    
                if ( $fName == $fileName ) {
                     setAttr -type "string" $namePlug $fileName;
                }
            }
        }
    }

    ##########################

    QQ 3087438119
  • 相关阅读:
    二分图匹配【模板】
    高斯消元【模板】
    G. 小花梨的函数
    数字计数
    选课
    二叉苹果树
    重建道路
    【UVA10187】Headmaster's Headache(校长的烦恼)
    【51NOD1447】好记的字符串
    【51NOD1779】逆序对统计
  • 原文地址:https://www.cnblogs.com/herd/p/15246528.html
Copyright © 2011-2022 走看看