POV-Ray : Newsgroups : povray.programming : change all textures : Re: change all textures Server Time
27 Sep 2024 19:10:58 EDT (-0400)
  Re: change all textures  
From: Mike Williams
Date: 10 Jan 2005 12:10:59
Message: <$VOXJCAbTr4BFwov@econym.demon.co.uk>
Wasn't it Rafal 'Raf256' Maj who wrote:
>
>I need to do it in a program, not manualy change the code of "TheObject" 
>(since TheObject is produced by external program and it would be a 
>problem).

If you arrange for TheObject to be in a separate include file, it might
be easier to use a simple external program to produce a copy with *all*
the textures removed. I'd suggest using Perl or Python.

The program would have to be able to count the depth of "{" to "}"
nesting and be able to recognise the keywords "material", "texture",
"pigment", "normal" and "finish". When it finds such a keyword it skips
it, and skips the following characters until the curly-bracket depth
gets back to the current level.

All the textures you want to apply would be held in the scene file that
#includes the stripped file.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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