Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Caption Script for Realflow by Mike Zugschwert
- #Set which types you want to be displayed
- emitters = True
- daemons = True
- objects = True
- #Round to this many digits after the decimal
- decimals = 4
- #Write some notes about the scene
- notes = """
- Notes about the scene
- """
- #Set which parameters you want to display
- #(if not found, will not be displayed)
- parameters = [
- "Speed",
- "Density",
- "Resolution",
- "Int Pressure",
- "Ext Pressure",
- "Viscocity",
- "Surface Tension",
- "Strength",
- "Particle friction",
- "Bounce",
- "Sticky",
- "Roughness",
- "Drag Strength",
- "H random",
- "V random"
- ]
- def onSimulationBegin():
- pass
- def onSimulationFrame():
- thingList = []
- if emitters:
- for emitter in scene.get_PB_Emitters():
- thingList.append(emitter)
- if daemons:
- for daemon in scene.getDaemons():
- thingList.append(daemon)
- if objects:
- for obj in scene.getObjects():
- thingList.append(obj)
- paramList = []
- captionString = ""
- for thing in thingList:
- if thing.getParameter("Simulation") != "Inactive":
- paramList.append( "______" + thing.name + "______\n")
- for param in parameters:
- if thing.getParameter(param) != None:
- paramList.append(param+": ")
- paramList.append(thing.getParameter(param))
- paramList.append("\n ")
- paramList.append("\n")
- for item in paramList:
- try:
- item = round(item, decimals)
- except:
- pass
- captionString = captionString + str(item)
- scene.setPreviewCaption(captionString + "______Notes______\n" + notes)
- def onSimulationStep():
- pass
- def onSimulationEnd():
- pass
- def onChangeToFrame():
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement