PC_rec (複数選択 point cache records)
----------------------------------------------------------------------------------------
-- Script Name: MonkeyTools------multi_cache_rec.ms
-- Started: 30 Nov 2014
-- Last Modified: 30 Nov 2014
-- Code by: Saori Yoshimoto
----------------------------------------------------------------------------------------
recStart = 1381
recEnd = 2221
recsampleRate = 1
out_filePath = "c:/3dsmax/scene/PC/"
for i in selection do
(
--//Initialize File Path
--recNum = execute( substring i.name 14 2 )
out_fileName = out_filePath + i.name as string + "/" + i.name as string + ".xml"
make_dir = "python.Execute \"os.makedirs('" + out_filePath + i.name as string + "')\""
python.Execute "import os"
execute make_dir
print make_dir
print out_fileName
print i
--//Set PointCacheWSM()
--deleteModifier i 1
addModifier i (pointCacheWSM())
i.modifiers[#Point_Cache_Binding].filename = out_fileName
i.modifiers[#Point_Cache_Binding].fileCount = 1
i.modifiers[#Point_Cache_Binding].recordStart = recStart
i.modifiers[#Point_Cache_Binding].recordEnd = recEnd
i.modifiers[#Point_Cache_Binding].sampleRate = recsampleRate
cacheOps.RecordCache i.modifiers[#Point_Cache_Binding]
gc()
deleteModifier i 1
)
/* MEMO mkdir by python scripts
--python.Execute "import os"
--python.Execute "os.makedirs('//MY_pc/RenderCache/s_yoshi/max/PC/test3')"
*/
-- Script Name: MonkeyTools------multi_cache_rec.ms
-- Started: 30 Nov 2014
-- Last Modified: 30 Nov 2014
-- Code by: Saori Yoshimoto
----------------------------------------------------------------------------------------
recStart = 1381
recEnd = 2221
recsampleRate = 1
out_filePath = "c:/3dsmax/scene/PC/"
for i in selection do
(
--//Initialize File Path
--recNum = execute( substring i.name 14 2 )
out_fileName = out_filePath + i.name as string + "/" + i.name as string + ".xml"
make_dir = "python.Execute \"os.makedirs('" + out_filePath + i.name as string + "')\""
python.Execute "import os"
execute make_dir
print make_dir
print out_fileName
print i
--//Set PointCacheWSM()
--deleteModifier i 1
addModifier i (pointCacheWSM())
i.modifiers[#Point_Cache_Binding].filename = out_fileName
i.modifiers[#Point_Cache_Binding].fileCount = 1
i.modifiers[#Point_Cache_Binding].recordStart = recStart
i.modifiers[#Point_Cache_Binding].recordEnd = recEnd
i.modifiers[#Point_Cache_Binding].sampleRate = recsampleRate
cacheOps.RecordCache i.modifiers[#Point_Cache_Binding]
gc()
deleteModifier i 1
)
/* MEMO mkdir by python scripts
--python.Execute "import os"
--python.Execute "os.makedirs('//MY_pc/RenderCache/s_yoshi/max/PC/test3')"
*/
0 コメント:
コメントを投稿