Public Member Functions | |
| void | print (string str) |
| NodeGraph * | rootGraph (void) |
| float | randomFloat (float min, float max) |
| int | time (void) |
| int | year (void) |
The Instance class is used in the InstanceScript( Instance &instance, InstanceContext &context, NodeGraph &graph ) function. This function is used to create or modify Script based Templates. It provides basic support routines. In template based scripts, the global pointer g_ctx points to this class.
| void Instance::print | ( | string | str) |
Prints the given string to the console. Can be used for debug output or for showing progress to the user.
| str | The string to print. |
| float Instance::randomFloat | ( | float | min, |
| float | max | ||
| ) |
Returns a random float between min and max.
| min | The minimum value for the random float. |
| max | The maximum value for the random float. |
| NodeGraph* Instance::rootGraph | ( | void | ) |
Returns the root graph of the current project.
| int Instance::time | ( | void | ) |
Returns the time of the current TT3D context. Useful for adjusting objects based on time, for example to put on lights during the night time.
| int Instance::year | ( | void | ) |
Returns the year of the current Text-to-3D context. Default is the current year.
1.8.4