Hi Guys,
I’m hoping someone can point me the right direction in my little scripting problem. I’ve add a example .toe to illustrate my problem.
Basically I want to have a table (table1) which stores various global variables and on change of these variables a script will modify my export strings (table2). For example if I change EnableExport to 0 in table 1 will change my export table to reflect the change. I was hope this could be done as a t-script which is executed on table1 change. Does have anyone have experiance with this, or is there a better way to solve this problem?
(see /project1)
To continue the way you’ve started, you could append some substitute DATs
substituting for tabr("table1", "GeoName", 1) for example.
(see /project2)
Alternatively, you could create local variables.
After cutting and pasting project11 into project2, you can create local variables.
Open the textport and type:
touch → cc /project2
touch → cvar GeoName=geo1
touch → cvar EnableExport=0
You’ll notice it created a component called “local” which houses these values as a
specially named table.
Important difference is that you can now reference them as variables up above.
A default evaluate DAT will expand them as you expect.
You can now modify these values with the ‘cvar’ command.
The third method is to use the exportmap to directly alter the export mapping of the
CHOP itself. Though this may require more scripting.
Also notice I removed the “/project2” prefix in the export path, to keep paths relative.
This keeps it simpler to copy+paste components without modifying absolute paths.
You also may want to consider exporting to the geo1 transform parameters directly,
instead of to the SOP transform below.
The SOP transform changes the actual point positions, whereas the geo transform is
simply a transform quickly applied to geometry already loaded for display.
Ive attached a modified version of the file.
Please feel free to get any clarification on the above.