[Closed] multiple pointcache with parameters apply
hello,
after few hours struggling with this, decided post my problem.
here is very simple script which I would like to apply to all selected objects,
now it works only with one selected…
u=$.name
z=”.xml”addModifier $ (Point_cache ()) ui:on
$.modifiers[#Point_Cache].filename = “Y:\3d\a-ppl\LWPG-walking-PC\pc\”+ u as string + z as string
$.modifiers[#Point_Cache].recordEnd = 40cacheOps.recordcache $.modifiers[#point_cache]
$.modifiers[#Point_Cache].loadType = 0
$.modifiers[#Point_Cache].playbackType = 3
set animate on
sliderTime = 40f
$.modifiers[#Point_Cache].playbackFrame = 40
$.modifiers[#Point_Cache].loadType = 0setBeforeORT $.modifiers[#Point_Cache].playbackFrame.controller #cycle
setAfterORT $.modifiers[#Point_Cache].playbackFrame.controller #cycle
another question is, I want to add one *.bip file to multiple objects, here is the
simple code:
for o in selection do
(
n = o.controller
biped.loadBipFile n “Y:\3d\a-ppl\lwpg\animations_3dsmax\animations_male\aaa.bip”
)
it goes through all objects and every time it loads *.bip, it asks for two options
QUANTIZE or MAP FRAMES, can I disable this in the script and set MAP FRAMES
as default and get rid of the pop up window?
for node in selection as array do
(
u = node.name
z = ".xml"
addModifier node (Point_cache ())
node.modifiers[#Point_Cache].filename = "Y:\\3d\\a-ppl\\LWPG-walking-PC\\pc\\" + u as string + z as string
node.modifiers[#Point_Cache].recordEnd = 40
cacheOps.recordcache node.modifiers[#point_cache]
node.modifiers[#Point_Cache].loadType = 0
node.modifiers[#Point_Cache].playbackType = 3
set animate on
sliderTime = 40f
node.modifiers[#Point_Cache].playbackFrame = 40
node.modifiers[#Point_Cache].loadType = 0
setBeforeORT node.modifiers[#Point_Cache].playbackFrame.controller #cycle
setAfterORT node.modifiers[#Point_Cache].playbackFrame.controller #cycle
)
I didn’t check your code for working but I fixed it to make its working with multi selection. Your mistake was wrong using of “$”.
“$” means a node if only one node is selected, and “$” means objectset for multiple selection. So, if you have multiple selection case the “$.name” doesn’t make any sense and system will throw an error.
it works now! tried that before,
but without array just as “for i in selection do”
and instead “$” I used “i”. I think there was my issue…
thanks mate;)
f
Personnaly I use this pointcache manager,
http://home.iprimus.com.au/wickergray/CgRay-PointCacheTools.rar
and this
http://home.iprimus.com.au/wickergray/CgRay-pointcacheGraphTools.rar
Arno
arno3d.blogspot.com