POV-Ray : Newsgroups : povray.general : Macro creating 2 textures? Server Time
28 Nov 2024 19:42:24 EST (-0500)
  Macro creating 2 textures? (Message 1 to 5 of 5)  
From: Raf256
Subject: Macro creating 2 textures?
Date: 21 Sep 2006 02:25:08
Message: <45123044@news.povray.org>
How can I write a macro that creates a layaered texture, since

#macro foo
texture {}
texture {}
#end

#declare mytext1 = foo()

is a syntax error (it works fine with one texture in foo)


-- 

Cytat tygodnia:


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Macro creating 2 textures?
Date: 21 Sep 2006 03:04:57
Message: <45123999@news.povray.org>
Raf256 wrote:
> How can I write a macro that creates a layaered texture, since
> 
> #macro foo
> texture {}
> texture {}
> #end

   #macro foo()
    #local t_result=
    texture{}
    texture{}
    #local dummy=0;
    t_result
   #end

--
Jaime


Post a reply to this message

From: Raf256
Subject: Re: Macro creating 2 textures?
Date: 21 Sep 2006 07:10:12
Message: <45127314@news.povray.org>
Jaime Vives Piqueres <45123999@news.povray.org> Thursday 21 of September
2006 09:04

>> #macro foo
>> texture {}
>> texture {}
>> #end
> 
>    #macro foo()
>     #local t_result=
>     texture{}
>     texture{}
>     #local dummy=0;
>     t_result
>    #end
> 

Thans :)


-- 

Cytat tygodnia:


Post a reply to this message

From: chaps
Subject: Re: Macro creating 2 textures?
Date: 28 Sep 2006 16:30:00
Message: <web.451c3073aabd8950a2c2e8e00@news.povray.org>
Hi Jaime,

this looks very fine. I understand why you use #local t_result,

But why #local dummy=0; is there????

Pascal.

...............

Tengo la opportunidad, entonces te lo digo:

Me gusta mucho tu trabajo.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Macro creating 2 textures?
Date: 29 Sep 2006 09:05:12
Message: <451d1a08$1@news.povray.org>
chaps wrote:
> Hi Jaime,
> 
> this looks very fine. I understand why you use #local t_result,
> 
> But why #local dummy=0; is there????

   It's just to avoid POV-Ray interpreting the result as the 3rd layer 
of the declared texture. :)

> Tengo la opportunidad, entonces te lo digo:
> 
> Me gusta mucho tu trabajo.

   Gracias!

--
Jaime


Post a reply to this message

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