Multiple dependent solvers/caches

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2013   #1
Question Multiple dependent solvers/caches

Hey guys!

I have a setup where I work in multiple solver-steps.
Something like this.
  1. cache solver 1
  2. feed cache 1 into solver 2
  3. cache solver 2
  4. feed cache 2 into solver 3
  5. etc.

It seems that maya ends up creating a new cache folder every time, since it cannot overwrite a cache that is bound in that same scene. So I'm forced to close my scene, copy the caches into their right position, reopen the scene and continue. (disabling/deleting the caches didn't help)

How do you deal with such a setup?
__________________
Working with 3dsmax 2012 & maya 2014 on Win 7 64bit
 
Old 04 April 2013   #2
I thought I'd post my solution here, in case somebody runs into this when searching a solution for the same problem.

So it turns out that maya's mel scripts assume that a user wouldn't want to overwrite a cache that is referenced elsewhere in the scence. There's actually a comment in the script explicitly stating this.
(C:\Program Files\Autodesk\Maya2013\scripts\others\getCacheDir ectory.mel, line 126)
if ($dfExists) {
	if (clashesWithInSceneCacheFile($descriptionFileNames  ,
			$existingCaches)) {
		// assume user will not want to overwrite files if it would
		// mean clobbering data used elsewhere in this very file
		//
		$subDir = getNameForCacheSubDir(1,$baseDirectory, $subDir);
		$cacheDirectory = ($baseDirectory + $subDir);
		$dfExists = 0;
	}
}


Since I have quite a few solvers that depend on caches from previous solvers, I cache them with a script.
The script caches all objects within an object-set.
Now in addition to that, the script finds all objects that read the cache that is about to get updated, changes the "cacheName" attr to a temporary garbage string, updates the cache and resets the "cacheName" to its original value.

I thought this might cause problems because maya keeps the cache-file locked on disk, but nope, it works like a charm.
__________________
Working with 3dsmax 2012 & maya 2014 on Win 7 64bit
 
Old 04 April 2013   #3
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:43 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.