[OpenSCAD] new "Special Variable"?
lenbok at gmail.com
Tue May 5 20:39:31 EDT 2015
On 6 May 2015 at 10:31, jellsworth <jerry.ellsworth at gmail.com> wrote:
> * The problem here is that this clever approach leaves the version control
> users out in the cold, if they can only stamp their models based on
You can pass variables in from outside by using the -D parameter to
openscad. Yvette could thus use a workaround wrapper script when launching
openscad that sets a variable to the current filename. In linux this would
look something like:
if [ "$1" ]; then
openscad -D fileName=$(basename $1) $1
Similarly, if you have your files under version control you could
substitute the output of git describe as your version tag.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Discuss