Skip to content

Instantly share code, notes, and snippets.

@TSCG
Created September 23, 2015 16:18
Show Gist options
  • Save TSCG/4c6eb8e0d2a860357bec to your computer and use it in GitHub Desktop.
Save TSCG/4c6eb8e0d2a860357bec to your computer and use it in GitHub Desktop.
Texture Resolution Edit / Maya
//Viewのテクスチャ表示を一時的に変更
//マテリアルを選択して実行
//引数:解像度サイズ
global proc TsSetTexRes(int $TexRes){
int $moto = `displayPref -q -maxTextureResolution`;
displayPref -maxTextureResolution $TexRes;
string $infoName[] = `listConnections -type materialInfo`;
for( $tmp in $infoName){
string $TexName[] = `listConnections -type file $tmp`;
disconnectAttr ($TexName[0] + ".message") ($tmp + ".texture[0]");
connectAttr -force ($TexName[0] + ".message") ($tmp + ".texture[0]");
};
refresh ;
displayPref -maxTextureResolution $moto;
}
//usage
//TsSetTexRes(4096);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment