|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Trevor Quayle" wrote:
> Just thinking, if this is the case perhaps you could
> do something like:
That only works when the code invoking the macro expects a string, which it
doesn't.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Trevor Quayle" wrote:
> This may not be what rune is looking for, if I understand
> correctly. If you do this, you may end up getting an
> error when you try to use the macro.
Exactly.
> If you could undefine it, then you could check if it is
> defined, and only run it if it was.
Yes. And much other code will also only be run if the macro is defined.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Could it be good workaround for you ?
Sorry, too slow, as the macro will be called 10000, 100000 or more times.
Besides, the macro is to be defined by the *user* of my include file, so
simplicity is vital.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ron Parker" wrote:
> Can you just redefine it to do nothing?
No! I want to undefine it!
I use #ifdef to test whether or not the macro is defined, and of course it
still returns true if I redefine the macro to do nothing.
You can define a macro and you can test whether or not it's defined, but you
can't undefine it. I find that highly inconsistent! Is there any reasoning
behind this design in POV-Ray?
If not, I hope that the ability to undefine a macro using #undef will be
added to POV-Ray ASAP.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Mark Wagner" wrote:
> You should be able to "undefine" a macro by
> redefining it as something like:
That's not undefining the macro. #ifdef is the proof, and also the reason
it's not a working solution for me.
See my reply to Ron.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 7 Dec 2001 16:41:58 +0100, "Rune" <run### [at] mobilixnetdk> wrote:
> Besides, the macro is to be defined by the *user* of my include file, so
> simplicity is vital.
Is it some kind of method/properities of the particle ?
Can you list this methods ?
Can you build array of arrays of methods ?
#if(Defined_Method(ParticleID,Method_Selector)) ?
So user have to write macro with method and define entry in array of methods?
Of course it is workaround not as good as it could be.
ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 7 Dec 2001 16:43:56 +0100, Rune wrote:
> "Ron Parker" wrote:
>> Can you just redefine it to do nothing?
>
> No! I want to undefine it!
>
> I use #ifdef to test whether or not the macro is defined, and of course it
> still returns true if I redefine the macro to do nothing.
>
> You can define a macro and you can test whether or not it's defined, but you
> can't undefine it. I find that highly inconsistent! Is there any reasoning
> behind this design in POV-Ray?
>
> If not, I hope that the ability to undefine a macro using #undef will be
> added to POV-Ray ASAP.
The ability to do so was mostly already there, but there was a bug that
prevented it from working. When we saw the macro ID, we tried to invoke
the macro instead of just looking at its ID. That bug will be fixed in
the next beta of 3.5.
--
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ron Parker" wrote:
> The ability to do so was mostly already there, but
> there was a bug that prevented it from working.
> When we saw the macro ID, we tried to invoke the
> macro instead of just looking at its ID. That bug
> will be fixed in the next beta of 3.5.
Just what I hoped for! Many thanks!
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Of course it is workaround not as good as it could be.
Never mind, Ron have said that the problem will be fixed in the next beta.
:)
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Nov 5)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Rune" <run### [at] mobilixnetdk> wrote in message
news:3c110d9b$1@news.povray.org...
> > Of course it is workaround not as good as it could be.
>
> Never mind, Ron have said that the problem will be fixed in the next beta.
> :)
>
> Rune
Phew, I have been wracking my brain all day trying to figure this one out.
I have been released.
I did come up with some really odd stuff in the process though.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |