I find this strange too - also wondering why use the cache on file node to do caching - there is a command to do it -
Application.CacheObjectsIntoFile(cacheobjname, 5, start_frame, end_frame, 1, False, False, attr_to_cache, "AnimTake1", sspath + sssuffix, False) This is copied out of my script to cache fur point clouds into .icecaches - basically the pointclouds are always in two groups - one for non simulated fur and one for simulated - so I find these groups - select the members and pass them into the command - 'cacheobjname' - this is done in a 'for obj in selectedobjects:' loop - If you run the Cache Manager on the animation toolbar you will see how it works, and if you add something to cache and switch to the second tab there is two columns the right one is for attributes to cache and the left one shows attributes softimage thinks you do not need - you can add these to the right column - then if you run it - it pretty much gives you the command you should be aiming for with your script. In my command I am building the path to write to for a mix of windows and linux machines, so am setting the sspath and sssuffix dependant on OS before feeding it into the command. This works 100% and does not move on until the cache is finished! You do not need to step to any frames or do anything funny like that - juast pass the command start frame and end frame extracted out of the scene - this command is listed in the sdk docs if you hit F1 in the script editor. S. _____________________________ Sandy Sutherland Technical Supervisor [email protected] _____________________________ ________________________________________ From: [email protected] [[email protected]] on behalf of Alok [[email protected]] Sent: 22 August 2012 22:05 To: [email protected] Subject: Re: Checking if simulation is done for current frame | beginner scripting question That's a little strange, how can your script proceed to the next line while you cache procedure is still running and has not returned. Anyways, in your script do a separate function with the CacheObjectsIntoFile() command or whatever you are using to cache. In the main function call this cache function and then open the next scene. Alok On 22/08/2012 3:26 PM, Christian wrote: > Thanks for your reply! > > Let me try to be more specific. > > I want to open a number of scenes, go to the endframe and cache using > "cache on file" node. > > I have all this working, except I don't know how to check if the > simulation has finished, so I can open a new scene. As it is now, the > new scene is opened before the simulation is done. > > Thanks, > > Christian > > On 2012-08-22 20:59, Sandy Sutherland wrote: >> Not sure what you mean - go to end frame and cache all simulation. >> What sort of caching etc... - we do lots of caching at TF - including >> icecaches for fur and mdd caching for geoms - I can send you script >> snippets tomorrow (at home now) if you like? You do not need to go >> to end frame - you can just run a cache command which all have start >> frame and end frame inputs. >> >> S. >> _____________________________ >> Sandy Sutherland >> Technical Supervisor >> [email protected] >> _____________________________ >> >> >> >> >> >> ________________________________________ >> From: [email protected] >> [[email protected]] on behalf of Christian >> [[email protected]] >> Sent: 22 August 2012 20:24 >> To: list >> Subject: Checking if simulation is done for current frame | beginner >> scripting question >> >> Hi list, >> >> Sorry if this is a stupid question, but I am new to scripting... >> >> I am trying to write a script that will open a scene, go to the end >> frame, cache all the simulation, then open next scene. >> >> But how can I check if the simulation is finished? >> >> Thanks, >> >> Christian >> > > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2012.0.2197 / Virus Database: 2437/5217 - Release Date: 08/22/12

