シーン内のファイルパスを修正する

フルイドキャッシュファイルのパスが、linuxで開くとおかしくなっていたので修正。
プロジェクトディレクトリより上のパスを消してます。

mel版。
global proc fixFluidCache(){ string $nodes[]=`ls -type "cacheFile"`; for($i in $nodes){ string $cachePath = getAttr( $i + ".cp"); string $buffer[]; $numTokens = `tokenize $cachePath "//" $buffer`; if($numTokens==0)continue; string $newCachePath = $buffer[1]; setAttr ($i+".cp") -type "string" $newCachePath; } } fixFluidCache();
python版。
import maya.cmds as cmds for i in cmds.ls(type='cacheFile'): cachePath = cmds.getAttr( i + '.cp') a=cachePath.split('//') if len(a)==1:continue cachePath = a[1] cmds.setAttr( i+'.cp', cachePath, type="string")
最終更新:2009年01月20日 12:32
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。