Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

All of RealFlow's available node parameters are accessible through scripting – values can be read and set. The concept behind parameter manipulation is the same for all node types:

  • Specify, the node you want to change.
  • To read a value, get the parameter through its name.
  • To set a value, address the parameter through its name and specify the new value.

 

In pseudo-code, the common instructions are:

sceneNode = scene.getNodeType("node_name")
sceneNode.setParameter("parameter_name")
sceneNode.setParameter("parameter_name", value)

 

  • getNodeType() has to be substituted through a node-specific command, e.g. get_DY_Domain("DY_"), getObject("Sphere01"), getDaemon("Drag_Force01"), etc.
  • parameter_name is the name of the parameter as shown in the node's "Node Params" panel, for example "Strength", "Resolution", "Visibility", "Dynamics", "Velocity", and so on.
  • value depends on the node's parameter type. Values can vectors, integers, strings, floats, or Booleans (True or False). Strings have to be written in quotes, e.g. "Active rigid body"


Examples:

gravityDaemon  = scene.getDaemon("Gravity01")
capsuleObject  = scene.getObject("Capsule01")
hybridoEmitter = scene.get_HY_Emitter("HY_Emitter01")
sceneCamera    = scene.getCamera("SceneCamera01")

gravityDaemon.setParameter("Strength", 3.6) # Float
capsuleObject.setParameter("Dynamics", "Soft body") # String
hybridoEmitter.setParameter("Visibility", False) # Boolean
sceneCamera.setParameter("Width", 1280) # Integer
  • No labels