|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This is a bit similar to SharkD's question above, but I wonder if it is
possible.
What I want to do is the following:
#local PoserName = "Beggar_";
#include concat(PoserName, "POV_geom.inc")
#local ObjName = object {PoserName}
The first two line of code work correctly, but the third one generates a
parse error of course, as a string identifier instead of an object is found.
How can I make this work?
--
All the best,
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot wrote:
> This is a bit similar to SharkD's question above, but I wonder if it is
> possible.
>
> What I want to do is the following:
>
> #local PoserName = "Beggar_";
> #include concat(PoserName, "POV_geom.inc")
> #local ObjName = object {PoserName}
>
> The first two line of code work correctly, but the third one generates a
> parse error of course, as a string identifier instead of an object is found.
> How can I make this work?
>
similar problem with wanting to include a frame number in the name of
the object (in PovRay) until I saw that you can define in PoseRay what
you want to name the object.
--
Best Regards,
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote in message
news:4aeea8ac$1@news.povray.org...
> This is a bit similar to SharkD's question above, but I wonder if it is
> possible.
>
> What I want to do is the following:
>
> #local PoserName = "Beggar_";
> #include concat(PoserName, "POV_geom.inc")
> #local ObjName = object {PoserName}
>
> The first two line of code work correctly, but the third one generates a
> parse error of course, as a string identifier instead of an object is
> found. How can I make this work?
>
> --
> All the best,
>
> Thomas
>
I assume that an object called 'Beggar_' is declared within the include
file?
If so you could use the Parse_String(String) macro. This macro takes a
string, writes it to a file, and then includes that file, effectively
evaluating the string, so:
#include "strings.inc"
Parse_String(concat("object {",PoserName,"}"))
should do it. Warning. I didn't test this for syntax errors.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Stephen" <mca### [at] aolDOTcom> schreef in bericht
news:4aeeb3a2$1@news.povray.org...
> problem with wanting to include a frame number in the name of the object
> (in PovRay) until I saw that you can define in PoseRay what you want to
> name the object.
Yes, I know this posibility, but that is not my problem. I try to simplify a
POV-Ray test scene for Poser figures that I use regularly, where I simply
have to give the generic name of the figure only once.
Thomas
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Convert string identifier to object name
Date: 2 Nov 2009 07:34:50
Message: <4aeed1ea@news.povray.org>
|
|
|
| |
| |
|
|
"Chris B" <nom### [at] nomailcom> schreef in bericht
news:4aeec1dc@news.povray.org...
> I assume that an object called 'Beggar_' is declared within the include
> file?
Yes indeed.
> If so you could use the Parse_String(String) macro. This macro takes a
> string, writes it to a file, and then includes that file, effectively
> evaluating the string, so:
>
> #include "strings.inc"
> Parse_String(concat("object {",PoserName,"}"))
>
Perfect Chris! It works. I just changed my code line to:
#local ObjName = Parse_String(concat("object {",PoserName,"}"))
and used that for further work in the scene.
Thomas
PS I shall have to look into strings.inc to discover what more is hidden
there :-) Fact is that I do not know *everything* that POV-Ray offers....
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot wrote:
> "Stephen" <mca### [at] aolDOTcom> schreef in bericht
> news:4aeeb3a2$1@news.povray.org...
>> problem with wanting to include a frame number in the name of the object
>> (in PovRay) until I saw that you can define in PoseRay what you want to
>> name the object.
>
> Yes, I know this posibility, but that is not my problem. I try to simplify a
> POV-Ray test scene for Poser figures that I use regularly, where I simply
> have to give the generic name of the figure only once.
>
> Thomas
>
>
--
Best Regards,
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot schrieb:
> Perfect Chris! It works. I just changed my code line to:
>
> #local ObjName = Parse_String(concat("object {",PoserName,"}"))
>
> and used that for further work in the scene.
>
> Thomas
>
> PS I shall have to look into strings.inc to discover what more is hidden
> there :-) Fact is that I do not know *everything* that POV-Ray offers....
Fun facts to know:
The Parse_String macro actually "inlines" the string by writing it to a
temporary file, which it then includes.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote in message
news:4aeed1ea@news.povray.org...
>
> PS I shall have to look into strings.inc to discover what more is hidden
> there :-) Fact is that I do not know *everything* that POV-Ray offers....
>
Nor do I. :o)
That's one great thing about using such a mature application. It's got
depth. Lots of handy tricks and features just waiting to be explored.
Regards,
ChrisB.
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Convert string identifier to object name
Date: 2 Nov 2009 10:34:18
Message: <4aeefbfa@news.povray.org>
|
|
|
| |
| |
|
|
"Chris B" <nom### [at] nomailcom> schreef in bericht
news:4aeedcf1$1@news.povray.org...
>
> Nor do I. :o)
> That's one great thing about using such a mature application. It's got
> depth. Lots of handy tricks and features just waiting to be explored.
>
Which makes one marvel (and slaver) at all those hidden goodies :-)
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"clipka" <ano### [at] anonymousorg> schreef in bericht
news:4aeedb78$1@news.povray.org...
> Fun facts to know:
>
> The Parse_String macro actually "inlines" the string by writing it to a
> temporary file, which it then includes.
Neat.
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |