But we are talking about the Stoke Particle Simulator. The Stoke Field Simulator has the same resume feature, so we needed to make sure we are talking about the same object…
Can you clarify what “its not letting me resume” means?
Is that that you press the Resume button and nothing happens?
Or is the Resume button grayed out? Or not there at all?
The more you type, the easier our debugging task becomes
I suspect that the RESUME button becomes grayed out for some reason. The most probable reason is that the hash checksum of the relevant values in the object has somehow changed between the two runs. The checksum is built by getting all properties of the simulator, collecting the relevant ones (skipping any properties that do not affect the ability to resume), and collecting a string of all these values, then getting the hash of that string. The Resume button gets grayed out if the hash calculated when the sim started and the current hash are different (which would imply a property value changed somewhere). It also checks if a valid simulator instance was created, if its time is valid, and if the time is less than the end time of the simulation.
So at this point I would concentrate on the hash. You can open the MAXScript Editor, load the file StokeUI.ms from the Stoke installation’s \Scripts folder, and modifying the Hash function like this:
fn getHashSum =
(
local thePropString = "" as stringStream
for p in getPropNames this where findItem #(#memoryCacheStep,#memoryLimit, #threadLimit, #subSteps, #updateViews, #updateViewsEvery,#rate,#endtime,#viewPercentage,#viewLimitEnabled,#viewLimit,#ViewVectorNormalize,#viewVectorScale,#iconSize,#velocityScales,#VelocityScale) p == 0 do
(
format "%\n" (getProperty this p) to:thePropString
)
format "%\n" (thePropString as string)
(dotNetObject "System.String" thePropString).GetHashCode()
)
Press CTRL+E to reevaluate without saving the file, and try running the sim, pausing, and resuming. Each time the UI evaluates the hash checksum, a multi-line string will be printed to the Listener showing the values of all relevant properties.
Note that the list of properties strings will contain all objects used as emitter and velocity source. They are listed as MAXScript values, so their name and base position are included in the string. Thus, if you move an emitter by a fraction of a unit on frame 0, the MAXScript value describing that object will change in the string, and the Resume button will become disabled because the hash will be different. Same applies to changing any channels requested to be saved, the names of the objects used to emit and drive the simulation, etc.
It would be interesting to see the hash printed when you start simulating, and the one printed when the Resume is disabled (assuming that’s what happens in your case).