POV-Ray : Newsgroups : povray.general : variable interference Server Time
31 Oct 2024 23:27:43 EDT (-0400)
  variable interference (Message 1 to 5 of 5)  
From: Barehunter
Subject: variable interference
Date: 6 Mar 2005 09:20:00
Message: <web.422b10b98ec2f0c4411f026c0@news.povray.org>
if a named object/variable in an inc file shares the same name as one in a
different inc file, and they are both used in the same pov file, will they
interfere with each other? Let me explain. I have been commissioned to
render a certain webcomic artist's characters. I put each character in it's
own inc so I can do the various comic in 3D. I use variables like
"RightUpperArmTurn". So farI have only done each character separate. But
soon I will have to do scenes containing more then one character. If I
render as is, will the RightUpperArmTurn of the first character effect the
second? or vice versa? If necessary, I can go thru each inc and put the
character's initials at the start of each variable but that would be a pain
in the butt.


Post a reply to this message

From: Alain
Subject: Re: variable interference
Date: 6 Mar 2005 09:27:26
Message: <422b134e$1@news.povray.org>
Barehunter nous apporta ses lumieres en ce 2005-03-06 09:16:
> if a named object/variable in an inc file shares the same name as one in a
> different inc file, and they are both used in the same pov file, will they
> interfere with each other? Let me explain. I have been commissioned to
> render a certain webcomic artist's characters. I put each character in it's
> own inc so I can do the various comic in 3D. I use variables like
> "RightUpperArmTurn". So farI have only done each character separate. But
> soon I will have to do scenes containing more then one character. If I
> render as is, will the RightUpperArmTurn of the first character effect the
> second? or vice versa? If necessary, I can go thru each inc and put the
> character's initials at the start of each variable but that would be a pain
> in the butt.
> 
> 
The last deffinition will override any previous one, but anything that used that
variable before 
will be left unchanged.
If the variable is suposed to only be used inside the include, you may use #local
instead of #declare.
You can include each file just before it's actualy used.

Alain


Post a reply to this message

From: Barehunter
Subject: Re: variable interference
Date: 6 Mar 2005 10:15:01
Message: <web.422b1e2935bd665411f026c0@news.povray.org>
> You can include each file just before it's actualy used.
>
> Alain

Really? I had thought all include files have to be mentioned at the top.
That brings up a possibility.
Can I define a variable, call up an inc file and have the inc file use the
variable I just defined?


Post a reply to this message

From: JWV
Subject: Re: variable interference
Date: 6 Mar 2005 10:26:19
Message: <422b211b@news.povray.org>
> Can I define a variable, call up an inc file and have the inc file use the
> variable I just defined?

yes you can, it can be very usefull.

JWV

"Barehunter" <nomail@nomail> wrote in message
news:web.422b1e2935bd665411f026c0@news.povray.org...
>
> > You can include each file just before it's actualy used.
> >
> > Alain
>
> Really? I had thought all include files have to be mentioned at the top.
> That brings up a possibility.
> Can I define a variable, call up an inc file and have the inc file use the
> variable I just defined?
>
>


Post a reply to this message

From: Barehunter
Subject: Re: variable interference
Date: 6 Mar 2005 10:40:00
Message: <web.422b23e035bd665411f026c0@news.povray.org>
"JWV" <jwv|at|planet.nl> wrote:
> > Can I define a variable, call up an inc file and have the inc file use the
> > variable I just defined?
>
> yes you can, it can be very usefull.
>

Cool thanks. wow this would have solved a bunch of problems I've had in
earlier pictures. lol


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.