Setting cacheMode at Startup
To set the global cacheMode parameter at startup, put a .h file in your nreal/include/startup/ui folder containing:
script.cacheMode = 3;
Where:
0 = None
1 = Read Only
2 = Normal
3 = Aggressive
Launching An External Process With “popen()”
In an earlier tip I showed how to use system() to run an external process. But sometimes just running the process isn’t enough. If you need to read the output of the process or write to it as a user would by typing into the shell you can use popen() to create a pipe to [...]
Launching An External Process With “system()”
People are always coming up with things that they’d like to launch directly from a menu item in Shake, a common case being some kind of render queue manager. This can be done by putting a few lines like the following in a .h file in your $HOME/nreal/include/startup/ui folder.
extern “C” { int system(char [...]
Exactly What Frame Is This FileIn Reading?
You can get the complete filename of the current image that a FileIn/SFileIn node is reading by referencing SFileIn1._curImageName (replacing SFileIn1 with your input node’s name, of course).
You can get the frame number (as a text string) from _curFrameStr. To use this in an expression you’ll need to convert it to a floating point number. [...]
Determining the DOD of a Node
You can reference the extents of the DOD with:
dod[0] –> left
dod[1] –> bottom
dod[2] –> right
dod[3] –> top
Debugging Complicated Shake Command Lines
If you’re having trouble getting a Shake command line process to give you the result you’re after, you can use the -gui parameter to launch the GUI after Shake builds the three to see how it’s turning out. Then quit the GUI, make some adjustments to your command line and try again.
For example, enter something [...]
