首页 > 其他 > 详细

maya图片文件加载

时间:2021-09-10 01:00:35      阅读:25      评论:0      收藏:0      [点我收藏+]

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;
            }
        }
    }
}

 

 

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

maya图片文件加载

原文:https://www.cnblogs.com/herd/p/15246528.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!