POV-Ray : Newsgroups : povray.tools.general : Blender NURBS and Bezier Surfaces exported Server Time
31 Oct 2024 21:24:40 EDT (-0400)
  Blender NURBS and Bezier Surfaces exported (Message 1 to 2 of 2)  
From: J  F  Miller
Subject: Blender NURBS and Bezier Surfaces exported
Date: 4 Mar 2005 01:00:00
Message: <web.4227f86c33e2079242b9503b0@news.povray.org>
I have been playing around with blender for a while now, and I'm looking for
a tool that will let me export NURBS and Bezier Surfaces tp povray as
mathmatical surfaces and not meshes.  Does anyone know of such a tool?  If
not could anybody give me some hints on how I might write one.

Thanks

JFMILLER


Post a reply to this message

From: mark t
Subject: Re: Blender NURBS and Bezier Surfaces exported
Date: 14 Feb 2006 11:55:00
Message: <web.43f20a8f9d4ca644cede387b0@news.povray.org>
"J. F. Miller" <jfm### [at] hotmailcom> wrote:
> I have been playing around with blender for a while now, and I'm looking for
> a tool that will let me export NURBS and Bezier Surfaces tp povray as
> mathmatical surfaces and not meshes.  Does anyone know of such a tool?  If
> not could anybody give me some hints on how I might write one.
>
> Thanks
>
> JFMILLER

J F

I am currently trying to do the same thing.  I have Blender 2.41 and Python
2.40.  I have so far found it impossible to access data about NURBS
objects.  I wrote a little script to dump information about objects in the
scene.  However, when it encounters anything that is a NURBS surface it
emits a type of 'NoneType' and no data about the object.  I'm wanting to
export to RenderMan format but do not want everything to be a polygon mesh.
 The script I wrote is here for you to have a play with:

#!BPY

# geodump script by Mark Thorpe.  14/02/2006
# version 0.1
# script was written on blender 2.41 with python 2.40

import Blender # top-level blender module

#PARAMETER DECLARATIONS#

children = Blender.Object.Get()

#FUNCTION DEFINITIONS#

def emit(str):
     print("> " + str)

# list all the scene child objects and their respective lists of properties
(if any)
def main():
     print("*** STARTING THE DUMP ***")
     emitstr = "" # utility string
     for child in children:
          emit("0bject = : " + `child`)
          emit("type = : " + `type(child.getData())`)
          cproperties = child.getAllProperties()
          materials = child.getMaterials(1)
          emit("name = : " + child.getData(name_only=True))
          emit("properties :  ")
          for cproperty in cproperties:
               emit(" :" + cproperty.getName())
          emit("materials :  ")
          for material in materials:
               emit(" :" + `material`)
          emit("data:  ")
          emit("drawType:  " + `child.getDrawType()`)
          emit("matrix:  " + `child.getMatrix()`)
          emit(`child.getData(name_only=False, mesh=True)`)
          emit("n")
     print("*** END OF THE DUMP ***")

main()


Regards

Mark T


Post a reply to this message

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