|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I saw it in somebody elses scripts but cant remember where...
I need to easily turn certain object on or off.
Let say i have object my_sphere, used as a trouble shooting marker for
development purpose only. But intsead of puting /* ..... */ every time in
need to get rid of it, can i write
my_sphere = true/false, or something along those lines
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
#declare ShowObject = true/false/yes/no/on/off;
#if(ShowObject)
object {
obj_Whatever
}
#end
--
Kevin
http://www.geocities.com/qsquared_1999/
#macro _(r)#if(r<12)#local i=asc(substr(
"oqshilacefg",r,1))-97;disc{<mod(i,7)-3,
div(i,7)-1,6>,z,.4pigment{rgb 10}}_(r+1)
#end#end _(1)//KL
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 12 Aug 2003 19:15:02 -0600, "Kevin Loney" <kev### [at] ekoikcom> wrote:
> #declare ShowObject = true/false/yes/no/on/off;
>
> #if(ShowObject)
> object {
> obj_Whatever
> }
> #end
additionally ShowObject can be controlled from command line/ini option box
Ini Option:
Declare=ShowObject=1
POV Script:
#ifndef(ShowObject)
#declare ShowObject = true/false/yes/no/on/off/0/1;
#endif
// [...] some POV code
#if(ShowObject)
object {
obj_Whatever
}
#end
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Boris,
as usual, there are many solutions, for example:
(1) COMMENT/UNCOMMENT
//*
// SDL of object goes here
// */
To switch the object off, delete one of the "/" of "//*".
(A really nice trick I've seen somewhere here, but can't remember
who invented it. Don't omit the space in "// */".)
(2) DECLARE AND USE OR DON'T USE
#declare myObject = ...
object { myObject } // in scene
//object { myObject } // not in scene
(3) INCLUDE OR DON'T INCLUDE
#include "myObject.inc" // in scene
//#include "myObject.inc" // not in scene
(4) ACTIVATE OBJECTS BY A STRING
#declare Enabled = "abcdefg" // string of "one-character-names"
// of enabled objects
#macro Use(U)
#local I = 1;
#while (I<=strlen(Enabled))
#if (strcmp(substr(Enabled,I,1),U)=0)
#declare I = 999; // exit loop
#end//if
#local I = I+1;
#end//while I
(I=1000)
#end//macro Use
#if (Use("a"))
// SDL for object "a" goes here; displayed when Enabled contains "a"
#end//"a"
#if (Use("b"))
// SDL for object "b" goes here; displayed when Enabled contains "b"
#end//"b"
And of course all the other solutions in this thread ...
Sputnik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.3f39862ac76d2e2e6af901ee0@news.povray.org>, "BorisW37"
<Bor### [at] yahoocom> wrote:
> I saw it in somebody elses scripts but cant remember where...
> I need to easily turn certain object on or off.
> Let say i have object my_sphere, used as a trouble shooting marker for
> development purpose only. But intsead of puting /* ..... */ every time in
> need to get rid of it, can i write
> my_sphere = true/false, or something along those lines
>
some methods :
1) one variable, multiple object
#declare troubleShooting=true/false;
source
...
#if (troubleShooting)
object {...}
object {...}
#end
...
#if (troubleShooting)
object {...}
object {...}
#end
2) one variable, one object
#declare drawPlane = true/false;
#declare drawSky = true/fase;
source
...
...
#if (drawPlane)
plane { }
#end
...
#if (drawSky)
sky_sphre { }
#end
...
hope this help
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"BorisW37" wrote in message
> I saw it in somebody elses scripts but cant remember where...
> I need to easily turn certain object on or off.
> Let say i have object my_sphere, used as a trouble shooting marker for
> development purpose only. But intsead of puting /* ..... */ every time in
> need to get rid of it, can i write
> my_sphere = true/false, or something along those lines
This is the way I do it. If I need a fast test render of a complex object, I
declare a variable named "DEBUG" in my main pov source.
#declare DEBUG = true;
Then in my object code I put blocks like these
#declare MyComplexObject = object {
object { blah blah }
#ifndef (DEBUG)
object { more complex shapes blah blah }
#end
}
This way you only have to remove the DEBUG declare statement if you need a
full render.
Please note that there really is no right ot wrong way to do this, everyone
prefers a different method but it all comes down to the same results. Just
thought I would share my method :)
Cheers,
Peter
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |