_dodger opened this issue on Jun 26, 2003 ยท 26 posts
_dodger posted Thu, 26 June 2003 at 9:36 PM
In programming, the concept of an include is a way of statically linking library files into a program. For instance, let's say you wrote a function called in() to compare a string to the contents of an array and you wanted to use this in a lot of your programs. You could include this in your sourcecode instead of copyihg and pasting the source into the file. For instance, if you start learing C you'll find a lot of programs with lines at the top like: #include stdio.h Which means include the functions from stdio.h, the standard Input/Output library. (The '.h' means 'header file' and is used as a general way to delineate files that are generally intended to be included by other programs instead of programs themselves which usually end in '.c') In perl, you'll find stuff like: require 'cgi-lib.pl'; or use CGI; Both of which are forms of includes. The first includes the Perl 4 CGI perl library at runtime, while the second includes the CGI.pm perl 5 CGI OO module at compile-time. Even in some html, specifically SSI (Server-Side Includes, there's that word again), you can include things. Many .shtml pages contain things like: Which simply means 'Insert this file here as if it was part of the HTML code.' You can do this in Poser files using the readScript directive. readScript has been covered a lot lately because of it's extensive and exhaustive use in Victoria 3 from DAZ. I'm not going to go completely into its use, so here's a synopsis: readScript
material Head
{
}
Now, inside each of these blocks, add the readScript directive pointing at your file. Fo rinstance, if you named your file 'chrome.p4mat' and saved it inside the Runtime directory directly, it would look like this: material Head { { readScript :Runtime:chrome.p4mat }
Do this to all of them (or at least those you want to share chrome settings). Save the MAT pose as normal. When you load up D-Bot and apply the pose, everything you set to have the readScript materials will have the contents of the chrome.p4mat file set as the settings for the material in question. This can theoretically be used for anything. You could, rather than loading an entire INJ pose, simply make a normal Pose file that does a readScript for the contents of the deltas block. If you wanted to be really weird you could actually include external geometry using the geomCustom directive, by taking an OBJ file and adding the curlies to the first and last line thus making it a viable Poser document, then referring to it with a readScript in the contents of the geomCustom block. AFAIK, it doesn't even have to be a full block you do this with. For instance, lets say you wanted to save out light colours in a seperate file and load those colours up for the colour channels of lights, but not the other aspects of the lights (like their positions or even types). And hey, Nerd, this might possibly help you with your multi-figure problem, as you could, in theory, load up large chunks of channels from readScript includes and only keep the channels that refer specifically to a figure (via ERC or an otherActor directive) and save stating the same thing every time. Oh, yeah and it might be noted that if someone can come up with a way to reproduce the UNIX functionality of a named pipe, one could, in theory, point a readScript at a pipe from a program that listens to the current figure ID through pokes and peeks and supplies the correct figure ID. I don't have ProPack, but I imagine this could also be used in Python scripting, too.