chris.scherer
02-05-2006, 07:14 PM
Hello World,
In order to efficiently prototype a database-based compositing-solution I need some nifty scripting for Shake, running on my Powerbook in a Wintel-network.
Hereīs the set up: Several FileIn-Nodes and some Color-Nodes are mashed together. The FileIn Nodes use a composit filename that goes like:
:pathname.text+elementname.text+"_passname"
Naturally, I included some text fields called pathname and elementname to keep the information accessible. The "_passname" is hard-wired of course.
Now, the node-tree works well when assembled in Shake, with all the flexibility I asked for: Easily change the path for several files chewed out by Maya as I write this.
Unfortunately, when I make a Macro out of it, there seem to be some problems with the file-name-handling etc. as the "node is in error", and the console tells me it cant resolve the pass. But then, it even looks for the wrong stuff, as the Macro-Maker enters "<undefined><range>" where the ":pathname.text+elementname.text+"_passname"" should be. Humming explicit lyrics. Really loud.
Here's an excerpt of the macro Shake yields, censorship and some debugging-attempts of mine applied. I, for example, replaced the "undefined range" with the script-line as it is written when I paste the original tree into a textpad:
------------------------------------------------------------------------------------
image LastRitesA(
const char *text="lack_allgemein_",
const char *pathname_text="//IP-Adress/pathname/"
)
{
pathname = Text(720, 486, 1, pathname_text, "Utopia Regular",
100, xFontScale/GetDefaultAspect(), 1, width/2, height/2,
0, 2, 2, 1, 1, 1, 1, 0, 0, 0, 45, 0, 1);
elementname = Text(720, 486, 1, text, "Utopia Regular", 100,
xFontScale/GetDefaultAspect(), 1, width/2, height/2, 0, 2,
2, 1, 1, 1, 1, 0, 0, 0, 45, 0, 1);
Diffusepass = SFileIn(:pathname.text+elementname.text+"diffuse.tga", "Auto", 0, 0,
"v1.1","0", "");
Highlightpass = SFileIn(:pathname.text+elementname.text+"highlight.tga", "Auto", 0, 0,
"v1.1", "0", "");
Metallicpass = SFileIn(:pathname.text+elementname.text+"metallic.tga", "Auto", 0, 0,
"v1.1", "0", "");
Mirror = SFileIn(:pathname.text+elementname.text+"mirror.tga", "Auto", 0, 0,
"v1.1", "0", "");
Reflectivity = SFileIn(:pathname.text+elementname.text+"reflectivity.tga", "Auto", 0, 0,
"v1.1", "0", "");
...here there be compositing...
return CoMpOsItInG;
}
----------------------------------------------------------------
On a secondary battlefront I want to incorporate several color-fields in the macro. Yet, with Macro-Maker, only the first works out fine, the other parameters (red,green,blue) are represented as sliders. Is there any way I can work around this ?
Thanks in advance, chris.scherer
End
In order to efficiently prototype a database-based compositing-solution I need some nifty scripting for Shake, running on my Powerbook in a Wintel-network.
Hereīs the set up: Several FileIn-Nodes and some Color-Nodes are mashed together. The FileIn Nodes use a composit filename that goes like:
:pathname.text+elementname.text+"_passname"
Naturally, I included some text fields called pathname and elementname to keep the information accessible. The "_passname" is hard-wired of course.
Now, the node-tree works well when assembled in Shake, with all the flexibility I asked for: Easily change the path for several files chewed out by Maya as I write this.
Unfortunately, when I make a Macro out of it, there seem to be some problems with the file-name-handling etc. as the "node is in error", and the console tells me it cant resolve the pass. But then, it even looks for the wrong stuff, as the Macro-Maker enters "<undefined><range>" where the ":pathname.text+elementname.text+"_passname"" should be. Humming explicit lyrics. Really loud.
Here's an excerpt of the macro Shake yields, censorship and some debugging-attempts of mine applied. I, for example, replaced the "undefined range" with the script-line as it is written when I paste the original tree into a textpad:
------------------------------------------------------------------------------------
image LastRitesA(
const char *text="lack_allgemein_",
const char *pathname_text="//IP-Adress/pathname/"
)
{
pathname = Text(720, 486, 1, pathname_text, "Utopia Regular",
100, xFontScale/GetDefaultAspect(), 1, width/2, height/2,
0, 2, 2, 1, 1, 1, 1, 0, 0, 0, 45, 0, 1);
elementname = Text(720, 486, 1, text, "Utopia Regular", 100,
xFontScale/GetDefaultAspect(), 1, width/2, height/2, 0, 2,
2, 1, 1, 1, 1, 0, 0, 0, 45, 0, 1);
Diffusepass = SFileIn(:pathname.text+elementname.text+"diffuse.tga", "Auto", 0, 0,
"v1.1","0", "");
Highlightpass = SFileIn(:pathname.text+elementname.text+"highlight.tga", "Auto", 0, 0,
"v1.1", "0", "");
Metallicpass = SFileIn(:pathname.text+elementname.text+"metallic.tga", "Auto", 0, 0,
"v1.1", "0", "");
Mirror = SFileIn(:pathname.text+elementname.text+"mirror.tga", "Auto", 0, 0,
"v1.1", "0", "");
Reflectivity = SFileIn(:pathname.text+elementname.text+"reflectivity.tga", "Auto", 0, 0,
"v1.1", "0", "");
...here there be compositing...
return CoMpOsItInG;
}
----------------------------------------------------------------
On a secondary battlefront I want to incorporate several color-fields in the macro. Yet, with Macro-Maker, only the first works out fine, the other parameters (red,green,blue) are represented as sliders. Is there any way I can work around this ?
Thanks in advance, chris.scherer
End
