Module World
[frames | no frames]

Module World

The Blender.World submodule

New: scriptLink methods: World.getScriptLinks, ...

INTRODUCTION

The module world allows you to access all the data of a Blender World.

Example:
 import Blender
 w = Blender.Get('World') #assume there exists a world named "world"
 print w.getName()
 w.hor = [1,1,.2]
 print w.getHor()
Example:
 import Blender
 from Blender import *

 AllWorlds = Blender.World.Get()  # returns a list of created world obejcts
 AvailWorlds = len(AllWorlds)  #       returns the number of available world objects
 PropWorld = dir(AllWorlds[0]) # returns the properties of the class world
 NameWorld = AllWorlds[0].getName() # get name of the first world object

 MiType = AllWorlds[0].getMistype()    # get kind of mist from the first world object
 MiParam = AllWorlds[0].getMist()      # get the parameters intensity, start, end and height of the mist

 HorColor = AllWorlds[0].getHor()      # horizon color of the first world object
 HorColorR = HorColor[0]               # get the red channel (RGB) of the horizon color

 ZenColor = AllWorlds[0].getZen()      # zenit color of the first world object
 ZenColorB = ZenColor[2]               # get the blue channel (RGB) of the Zenit color

 blending = AllWorlds[0].getSkytype() # get the blending modes (real, blend, paper) of the first world object

Classes
World This object gives access to generic data from all worlds in Blender.

Function Summary
Blender World or a list of Blender Worlds Get(name)
Get an World from Blender.
Blender World or None GetActive()
Get the active world of the scene.
Blender World New(name)
Creates a new World.

Function Details

Get(name)

Get an World from Blender.
Parameters:
name - The name of the world to retrieve.
           (type=string)
Returns:
  • (name): The World corresponding to the name
  • (): A list with all Worlds in the current scene.

           (type=Blender World or a list of Blender Worlds)

GetActive()

Get the active world of the scene.
Returns:
Blender World or None

New(name)

Creates a new World.
Parameters:
name - World's name (optionnal).
           (type=string)
Returns:
The created World. If the "name" paraeter has not been provided, it will be automatically be set by blender.
           (type=Blender World)

Generated by Epydoc 2.1 on Thu Aug 12 21:47:30 2004 http://epydoc.sf.net