After Effects
More info here
Collection of notes for use and development on trueSpace
username="generic", password="openup"
This rsx plugin is used by several scripts from this site. It is used in the unreal scripts to read the binary formats and in the indigo script making it possible to read scene level materials. Several scripts now use the Save-As dialog from this package.
The source code for the plugin can be downloaded from here.
The source assumes to be added into d:\sdk_tS761B8\Examples\
Be warned that much of the source code is very rough. I never fully figured out how to use the beta sdk, so it's a messy collection of code that works. Also the source is a little bloated from extra libraries and experimentation.
A version of this rsx plugin comes pre-installed in the Unofficial trueSpace Updates - https://www.united3dartists.com/forum/viewforum.php?f=55
Note: may require VC++ runtime 2008 sp1 from Microsoft. (2010) Get it if the plugin does not install.
This rsx plugin is used by the web based ui scripts and the node list view script.
The source code for the plugin can be downloaded from here.
Note: may require VC++ runtime 2008 sp1 from Microsoft. (2010) Get it if the plugin does not install.
Contains the tif loader, exr loader, png saver command and exr saver commands
Unzip and copy all 3 files together
Native trueSpace will not save png files with an alpha channel
trueSpace will not save exr format images - ?and hdr has issues?
save bitmap to a exr file with or without an alpha channel
RGB no Alpha command
save a bitmap to a png file that supports alpha values
Source code: Clintons3dExtSource.zip
The RsSelectionHelper.h file included in the DK has a bug that prevents selections unless something is already selected.
// crashes if no preexisting selection Nov 2011
//if(spNodeSelection->IsEmpty())
// return E_FAIL;
// Aug 2021 probably because can't replace an empty selection
if(spNodeSelection->IsEmpty())
bReplace = false;
Command generates xml files that can't be read properly by modern web browsers. Internet Explorer on win7 was used to convert the xml files to html files.
maybe do list here
maybe do list here
maybe do list here
maybe do list here
maybe do list here
Export all scripts contained in the selected node to js or xml files. This is useful for searching all scripts and editing. Visual Studio Code "find in files" works well to see and search all the scripts in one easy location.
All the scripts inside the selected node will export as xml or js files to an ExportedScripts folder in the tS directory.
The simple scripts are found in "/Widgets" and "/Physics/Widgets".
The folder structure will reflect the tS hierarchy.
Repeat names will be given a random postfix to differentiate the scripts.
ExportedScripts - xml export of all scripts found in the Unofficial Updates released on Dec 28 2021
Provides a list of a node's connectors including the name, type and flags. The first line returned is a header line. The list includes hidden connectors.
The plugin package is required to use this script. Download the plugin package here.
The header line includes the nodes persistentID which is valid while the scene is open
first line heading(connectors[0]) is "script conn name\tconn name\ttype\tflags\t" + persistentID found here
Sample Code:
var CONFLG_HIDDEN = 32;
var CONFLG_OUT = 2;
var CONFLG_IN = 4;
var utilitydata = System.CreateDO("Clintons3D Package/Utility functions");
var currentnode = Node.FirstSelected();
var thedata = utilitydata.GetConnectorData(currentnode);
var allConnectors = thedata.split("\n");
for(var i=0; i < allConnectors.length; i++) {
var connector = allConnectors[i].split("\t");
if( (connector[3] & CONFLG_HIDDEN) != 0) continue;
var In = "";
if((connector[3] & CONFLG_IN) != 0) In = "input ";
var Out = "";
if((connector[3] & CONFLG_OUT) != 0) Out = "output ";
System.Trace(In + Out + connector[0] + " - " + connector[2]);
//connector[0] = script connector name
//connector[1] = connector name
//connector[2] = connector type
//connector[3] = flags
}
flags:
enum tagRtConFlags
{ CONFLG_DIRTY = 1,
CONFLG_OUT = 2,
CONFLG_IN = 4,
CONFLG_INOUT = 6,
CONFLG_RESERVED = 8,
CONFLG_EXPORTED = 16,
CONFLG_HIDDEN = 32,
CONFLG_CACHING = 64,
CONFLG_NONOTIFY = 128,
CONFLG_CONTROLFLOW = 256,
CONFLG_DISABLECACHING = 512,
CONFLG_REGISTERED = 1024,
CONFLG_CUSTOM = 2048,
CONFLG_TOPOLOGY = 4096,
CONFLG_LOCAL = 8192,
CONFLG_LAST = 8193
} RtConFlags;
Script adds UI controls, but no way to adjust them for labels, position, size etc. Controls disappear when the aspect is changed. Can make controls persistent by editing the panel.
setup offline render hooks for jscript
steps to install offline renderer
//
//Add Yafaray to offline renderers
//
//create/open render preferences node
ScriptObject.RunCmd("space 3d package/open offline renderer preferences");
if(!Node.Exists("/Offline renderers/Yafaray")) {
try {
Node.Create("Clintons3D Package/Yafaray", "/Offline renderers");
} catch (err) {
System.Trace("Error: Clintons3D Package plugin should be installed first");
}
}
Utility script that will read an exported scripts xml file, read the input parameters and create a new xml file with corresponding output parameters.
Usage:
Notes:
Communicate with other processes or servers via tcp sockets
util.SocketComm(text message, ip address of socket server, port number on socket server, timeout in ms - 0 means no timeout, true ==> use UDP otherwise use TCP) returns a text response
function writeOut(val)
{
var result = util.SocketComm(val,"127.0.0.1", 5000, 300, false)
System.Trace(result);
}
util = System.CreateDO("Clintons3D Package/Utility functions");
writeOut('some text to send')
Status Message autoloader copied from the Unofficial Update. Loads from preobjects.
Updating the status line from script adds to the undo history. This plugin based status line does not.
Set status message with a 5000 mS delay before clearing the message
var util = System.CreateDO("Clintons3D Package/Utility functions");
util.SetStatusMessage("Some message here", 5000);
Clear status message and do not clear the Model status, only clear the workspace ":" status
var util = System.CreateDO("Clintons3D Package/Utility functions");
var clearModelStatus = false;
util.ClearStatusMessage(clearModelStatus)
Resource Hacker can be used to look inside and change exe and dll files
http://www.angusj.com/resourcehacker/
ts7.exe contains the splash screen image
tSCommon.dll contains button icons and images
WindowsManager.dll contains button icons
Collection of script commands that do not add to the undo history.
function SetNodeValueMatrix(node, conn, matrix)
{
var util = System.CreateDO("Clintons3D Package/Utility functions")
util.SetNodeValueMatrix(node, conn,
matrix.GetAt(0,0), matrix.GetAt(1,0), matrix.GetAt(2,0), matrix.GetAt(3,0),
matrix.GetAt(0,1), matrix.GetAt(1,1), matrix.GetAt(2,1), matrix.GetAt(3,1),
matrix.GetAt(0,2), matrix.GetAt(1,2), matrix.GetAt(2,2), matrix.GetAt(3,2),
matrix.GetAt(0,3), matrix.GetAt(1,3), matrix.GetAt(2,3), matrix.GetAt(3,3)
);
}
Node.ReconnectFrom(SourceNode1, SourceNode1Conn, SourceNode2, SourceNode2Conn, Destination, DestinationConn);
===
Get the plugin status, "PACKAGE_INSTALLED", "PACKAGE_LOADED", "PACKAGE_UNINSTALLED".
This is useful for the View sample based plugins.
Name is from the "Name" field of the Package manager window.
copy a value from one source node to another destination node without creating an undo entry
reset a node connector without creating an undo entry
The ConReset works the same as the original Node.ConReset except it has 2 extra arguements. The second 2 are for reading the default value that will be applied to the first 2. This is needed bacause the default value may be active on an internal node.
If the node connector does not have any internal connections then repeat the first 2 arguments in the second spots.
If the connector has an internal connector trace it back to the node that has the default value and use it in the second set of arguments.
Export a connector and prevent undo - blank undo may be created. Similar to Node.ExportConnector
Get the text content of a script node
Set the text content of a script node
Save xml format of the script node
Load xml format file into the script node
GetNodeValueXXX() commands can be used inside toolbar buttons where Node.Value() does not. Also useful inside widget script command nodes.
get integer and float values from a node
Get the text content, color or matrix value from a node
similar to the built in Node.LinkedInputNode command but returns the node at index 0 and the connector of the node
GetLinkedInputNodeAndConn2 is the updated version of this command
similar to the built in Node.LinkedInputNode command but also returns the connector of the linked node
similar to the built in Node.LinkedOutputNode command but also returns the connector of the linked node
GetLinkedOutputNodeAndConn2 has the same bugs as the Node.GetLinkedOutputNode and requires special processing. Also not that if the node is selected it may be connected to a "Widget" on the WldMatrix output.
for(var i=0; i< Node.LinkedOutputNodeCount(firstsel, "WldMatrix");i++) {
var outnode = Node.LinkedOutputNode(firstsel, "WldMatrix", i);
if(outnode && Node.Exists(outnode)) {
System.Trace(i + " " + outnode );
result = util.GetLinkedOutputNodeAndConn2(firstsel, "WldMatrix", i+1)
System.Trace("result " + result)
}
}
will copy the contents of one node into another including all internal and exported connections
The plan is to use this with a new discovery. Node.Create for a kernel DummyEncaps will not be selectable in the 3D view. Used for Kernel Object and the result is selectable. So make new unselectable script that does not depend on widget additions.
rename using underscores instead of commas
Note that this is not a util style command
Does not return the new node
Will create undo history, unlike the util.SafeRename version
The following sequence can be used to get the new name
owner=Node.Owner(bsFullNodeName)
Clintons3dPlugin.SafeRename(bsFullNodeName, bsNewShortNodeName )
newName = owner + "/" + Node.SubObject(owner, Node.SubObjectCount(owner)-1);
Exp aspect above far right shows the result of adding one of each of the input types, BoolVal, IntVal, MatrixVal, NumVal, StrVal and StrEnumVal. Timeout and SingleShot are only used during setup.
Truespace watchdogs can be unreliable. This is an alternative means to setup a watchdog behavior type node.
Setup:
After setup connect the inputs in the Exp aspect.
If Timeout is used, the TimeoutDetected will fire off after the time is up.
Use Defaults aspect to activate, deactive and set the period for the watchdog
For normal operation the Activate/Deactivate would be run via code. This is one of the differences from the standard watchdog in that it needs to be activated.