• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Maxscript, setPath and Grid dimensions...
#1
It seems that when using maxscript to set the path to an existing simulation you can get the following querybox:
---------------------------
Grid dimensions does not match
---------------------------
Do you want to match FumeFX grid to the one in the file?
Usually, Yes means that you want to use existing output files,
No means that you want to overwrite them with the new simulation,
and pressing Cancel will allow you to select another file.
---------------------------
Yes No Cancel
---------------------------

It would be great to be able to specify which option you would like to choose using the function... something like:
$.setpath "C:\Fume\Sim_.fxd" "default" matchGrid:true
Jordan Walsh
VFX Technical Director

Showreel 2012
Check out my scripts on ScriptSpot!
  Reply
#2
Actually after a bit more testing I would say having this functionality is quite vital.
I am trying to setup some tools for network simulation via Deadline and maxscript. I need to be able to set simulation cache and the simulation path via a maxscript job that runs on a server running deadline in slave mode.
Simulating is fine and setting paths via script works fine when the dir is empty but when it comes to doing a render pass of that simulation using setpath doesnt change the path properly as there is already fdx files in that dir and im guessing the querybox breaks something.
I have tried adding an entry to the deadline Popup Handler which should detect the popup and press "yes" but its not working.
Is there any way to fix this??
Thanks
Jordan Walsh
VFX Technical Director

Showreel 2012
Check out my scripts on ScriptSpot!
  Reply
#3
2.0 and greater have added a param to the SetPath function

So it should look like this:

$FumeFX02.setPath "E:\thePath\FumeFX01_.fxd" #match

Although I haven't tried the match parameter until now it doesn't appear to be functioning correctly. It simply returns the boolean false with a non-matching grid. AFAIK it is supposed to match the simulated grid dimensions.

You may also want to look into setSilentMode when calling functions that can throw confirm dialog boxes, this should suppress them.
  Reply
#4
ahh, thanks jrand, I totally overlooked that. I think that will do the trick, although all the extra settings dont get applied in slave mode (spacing, length, width, adaptive grid etc) So ill just have to do it by hand!
Jordan Walsh
VFX Technical Director

Showreel 2012
Check out my scripts on ScriptSpot!
  Reply
#5
Hello,

The syntax should be:
$FumeFX01.setPath "f:\\temp\\ffxSim_0000.fxd" #(#default ,#match)

..if you omit 0000, it won't be checked at all and it won't be matched as well.

Kresimir
  Reply
#6
Haha, thanks for the snippet! Now please put that in the manual Big Grin

Don't ask why didn't register to me :$ a single parameter seems to satisfy the function for some reason. I guess it is supposed to work that way, even though it is not encapsulated in an array?
  Reply
#7
I've put it intot he help file.
SetPath expects array of params, so you can send one or 10.
Note is added to the help file.

Thanks,

Kresimir
  Reply
#8
Thanks, I don't know how many times I have copy pasted that particular snippet into a script and threw an error. At least I hopefully figured it out by now. Smile
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)