Module Render
[hide private]
[frames] | no frames]

Source Code for Module Render

   1  # Blender.Scene.Render module and the RenderData PyType object 
   2   
   3  """ 
   4  The Blender.Scene.Render submodule. 
   5   
   6  Scene.Render 
   7  ============ 
   8   
   9  This module provides access to B{Scene Rendering Contexts} in Blender. 
  10   
  11  Example:: 
  12    import Blender 
  13    from Blender import * 
  14    from Blender.Scene import Render 
  15     
  16    scn = Scene.GetCurrent() 
  17    context = scn.getRenderingContext() 
  18     
  19    Render.EnableDispWin() 
  20    context.extensions = True 
  21    context.renderPath = "//myRenderdir/" 
  22    context.sizePreset(Render.PC) 
  23    context.imageType = Render.AVIRAW 
  24    context.sFrame = 2 
  25    context.eFrame = 10 
  26    context.renderAnim() 
  27     
  28    context.imageType = Render.TARGA 
  29    context.fps = 15 
  30    context.sFrame = 15 
  31    context.eFrame = 22 
  32    context.renderAnim() 
  33     
  34    Render.CloseRenderWindow() 
  35    print context.fps 
  36    print context.cFrame 
  37   
  38  @type Modes: readonly dictionary 
  39  @var Modes: Constant dict used for with L{RenderData.mode} bitfield attribute.   
  40  Values can be ORed together.  Individual bits can also be set/cleared with 
  41  boolean attributes. 
  42    - OSA: Oversampling (anti-aliasing) enabled 
  43    - SHADOW: Shadow calculation enabled 
  44    - GAMMA: Gamma correction enabled 
  45    - ENVMAP: Environment map rendering enabled 
  46    - TOONSHADING: Toon edge shading enabled 
  47    - FIELDRENDER: Field rendering enabled 
  48    - FIELDTIME: Time difference in field calculations I{disabled} 
  49    - RADIOSITY: Radiosity rendering enabled 
  50    - BORDER_RENDER: Small cut-out rendering enabled 
  51    - PANORAMA: Panorama rendering enabled 
  52    - CROP: Crop image during border renders 
  53    - ODDFIELD: Odd field first rendering enabled 
  54    - MBLUR: Motion blur enabled 
  55    - UNIFIED: Unified Renderer enabled 
  56    - RAYTRACING: Ray tracing enabled 
  57    - THREADS: Render in two threads enabled (Deprecated, use L{RenderData.threads}) 
  58   
  59  @type SceModes: readonly dictionary 
  60  @var SceModes: Constant dict used for with L{RenderData.sceneMode} bitfield attribute.   
  61  Values can be ORed together.  Individual bits can also be set/cleared with 
  62  boolean attributes. 
  63    - SEQUENCER: Enables sequencer output rendering. 
  64    - EXTENSION: Adds extensions to the output when rendering animations. 
  65    - SAVE_BUFFERS: Save render tiles to disk to save memory. 
  66    - FREE_IMAGES: Free images used by textures after each render. 
  67   
  68  @type FramingModes: readonly dictionary 
  69  @var FramingModes: Constant dict used for with L{RenderData.gameFrame} 
  70  attribute.  One of the following modes can be active: 
  71    - BARS: Show the entire viewport in the display window, using bar 
  72      horizontally or vertically. 
  73    - EXTEND: Show the entire viewport in the display window, viewing more 
  74      horizontally or vertically 
  75    - SCALE: Stretch or squeeze the viewport to fill the display window. 
  76   
  77  @type BakeModes: readonly dictionary 
  78  @var BakeModes: Constant dict used for with L{RenderData.bakeMode} 
  79  attribute.  One of the following modes can be active: 
  80    - LIGHT: Bake lighting only. 
  81    - ALL: Bake all render lighting. 
  82    - AO: Bake ambient occlusion. 
  83    - NORMALS: Bake a normal map. 
  84    - TEXTURE: Bake textures. 
  85    - DISPLACEMENT: Bake displacement. 
  86   
  87  @type BakeNormalSpaceModes: readonly dictionary 
  88  @var BakeNormalSpaceModes: Constant dict used for with L{RenderData.bakeNormalSpace} 
  89  attribute.  One of the following modes can be active: 
  90    - CAMERA: Bake normals relative to the camera. 
  91    - WORLD: Bake normals in worldspace. 
  92    - OBJECT: Bake normals relative to the object. 
  93    - TANGENT: Bake tangent space normals. 
  94   
  95  @var INTERNAL: The internal rendering engine. Use with setRenderer() 
  96  @var YAFRAY: Yafray rendering engine. Use with setRenderer() 
  97   
  98  @var AVIRAW: Output format. Use with renderdata.imageType / setImageType() 
  99  @var AVIJPEG: Output format. Use with renderdata.imageType / setImageType() 
 100  @var AVICODEC: Output format. Use with renderdata.imageType / setImageType() 
 101  @var QUICKTIME: Output format. Use with renderdata.imageType / setImageType() 
 102  @var TARGA: Output format. Use with renderdata.imageType / setImageType() 
 103  @var RAWTGA: Output format. Use with renderdata.imageType / setImageType() 
 104  @var HDR: Output format. Use with renderdata.imageType / setImageType() 
 105  @var PNG: Output format. Use with renderdata.imageType / setImageType() 
 106  @var BMP: Output format. Use with renderdata.imageType / setImageType() 
 107  @var JPEG: Output format. Use with renderdata.imageType / setImageType() 
 108  @var HAMX: Output format. Use with renderdata.imageType / setImageType() 
 109  @var IRIS: Output format. Use with renderdata.imageType / setImageType() 
 110  @var IRISZ: Output format. Use with renderdata.imageType / setImageType() 
 111  @var FTYPE: Output format. Use with renderdata.imageType / setImageType() 
 112  @var OPENEXR: Output format. Use with renderdata.imageType / setImageType() 
 113  @var MULTILAYER: Output format. Use with renderdata.imageType / setImageType() 
 114  @var TIFF: Output format. Use with renderdata.imageType / setImageType() 
 115  @var FFMPEG: Output format. Use with renderdata.imageType / setImageType() 
 116  @var CINEON: Output format. Use with renderdata.imageType / setImageType() 
 117  @var DPX: Output format. Use with renderdata.imageType / setImageType() 
 118   
 119  @var PAL: Output format. Use with renderdata.sizePreset() 
 120  @var NTSC: Output format. Use with renderdata.sizePreset() 
 121  @var DEFAULT: Output format. Use with renderdata.sizePreset() 
 122  @var PREVIEW: Output format. Use with renderdata.sizePreset() 
 123  @var PC: Output format. Use with renderdata.sizePreset() 
 124  @var PAL169: Output format. Use with renderdata.sizePreset() 
 125  @var B_PR_FULL: Output format. Use with renderdata.sizePreset() 
 126   
 127  @var NONE: Yafray GI Quality / Method. Use with renderdata.setYafrayGIQuality() 
 128  @var LOW: Yafray GI Quality. Use with renderdata.setYafrayGIQuality() 
 129  @var MEDIUM: Yafray GI Quality. Use with renderdata.setYafrayGIQuality() 
 130  @var HIGH: Yafray GI Quality. Use with renderdata.setYafrayGIQuality() 
 131  @var HIGHER: Yafray GI Quality. Use with renderdata.setYafrayGIQuality() 
 132  @var BEST: Yafray GI Quality. Use with renderdata.setYafrayGIQuality() 
 133  @var USEAOSETTINGS: Yafray GI Quality. Use with renderdata.setYafrayGIQuality() 
 134  @var SKYDOME: Yafray GI Method. Use with renderdata.setYafrayGIMethod() 
 135  @var GIFULL: Yafray GI Method. Use with renderdata.setYafrayGIMethod() 
 136  """ 
 137   
138 -def CloseRenderWindow():
139 """ 140 Closes the rendering window. 141 """
142
143 -def EnableDispView():
144 """ 145 Render in the 3d View area. B{Note} this method is deprecated; 146 use the l{displayMode} attribute instead. 147 """
148
149 -def EnableDispWin():
150 """ 151 Render in Render window. 152 B{Note} this method is deprecated; use the l{displayMode} attribute instead. 153 """
154
155 -def SetRenderWinPos(locationList):
156 """ 157 Set the position of the Render window on the screen. 158 Possible values are: 159 - S = south 160 - N = north 161 - W = west 162 - E = east 163 - C = center 164 - ne = northeast 165 - nw = northwest 166 - se = southeast 167 - sw = southwest 168 @type locationList: PyList of strings 169 @param locationList: a list of strings that together define 170 the location of the Render window on the screen. 171 """
172
173 -class RenderData:
174 """ 175 The RenderData object 176 ===================== 177 This object gives access to Scene rendering contexts in Blender. 178 @ivar unified: Unified Renderer enabled. 179 Also see B{UNIFIED} in L{Modes} constant dict. 180 @type unified: boolean 181 @ivar renderwinSize: Size of the rendering window. Valid values are 25, 50, 182 75, or 100. 183 @type renderwinSize: int 184 @ivar xParts: Number of horizontal parts for image render. 185 Values are clamped to the range [2,512]. 186 @type xParts: int 187 @ivar fieldRendering: Field rendering enabled. 188 Also see B{FIELDRENDER} in L{Modes} constant dict. 189 @type fieldRendering: boolean 190 @ivar gammaCorrection: Gamma correction enabled. 191 Also see B{GAMMA} in L{Modes} constant dict. 192 @type gammaCorrection: boolean 193 @ivar eFrame: Ending frame for rendering. 194 Values are clamped to the range [1,MAXFRAME]. 195 @type eFrame: int 196 @ivar radiosityRender: Radiosity rendering enabled. 197 @type radiosityRender: boolean 198 @ivar sizeX: Image width (in pixels). 199 Values are clamped to the range [4,10000]. 200 @type sizeX: int 201 @ivar shadow: Shadow calculation enabled. 202 Also see B{SHADOW} in L{Modes} constant dict. 203 @type shadow: boolean 204 @ivar aspectX: Horizontal aspect ratio. 205 Values are clamped to the range [1,200]. 206 @type aspectX: int 207 @ivar mode: Mode bitfield. See L{Modes} constant dict for values. 208 @type mode: bitfield 209 @ivar fieldTimeDisable: Time difference in field calculations I{disabled}. 210 @type fieldTimeDisable: int 211 @ivar cFrame: The current frame for rendering. 212 Values are clamped to the range [1,MAXFRAME]. 213 @type cFrame: int 214 @ivar crop: Crop image during border renders. 215 Also see B{CROP} in L{Modes} constant dict. 216 @type crop: boolean 217 @ivar sFrame: Starting frame for rendering. 218 Values are clamped to the range [1,MAXFRAME]. 219 @type sFrame: int 220 @ivar backbuf: Backbuffer image enabled. 221 @type backbuf: boolean 222 @ivar OSALevel: Oversampling (anti-aliasing) level. Valid values are 223 5, 8, 11, or 16. 224 @type OSALevel: int 225 @ivar displayMode: Render output in separate window or 3D view. 226 Valid values are 0 (display in image editor view), 1 (display in render 227 window), or 2 (display full screen). 228 @type displayMode: int 229 @ivar threads: Number of threads to render, clamed [1-8] 230 @type threads: int 231 @ivar backbufPath: Path to a background image (setting loads image). 232 @type backbufPath: string 233 @ivar toonShading: Toon edge shading enabled. 234 Also see B{TOONSHADING} in L{Modes} constant dict. 235 @type toonShading: boolean 236 @ivar sceneMode: Scene mode bitfield. See L{SceModes} constant dict for 237 values. 238 @type sceneMode: bitfield 239 @ivar gameFrameColor: RGB color triplet for bars. 240 Values are clamped in the range [0.0,1.0]. 241 @type gameFrameColor: list of RGB 3 floats 242 @ivar sizeY: Image height (in pixels). 243 Values are clamped to the range [4,10000]. 244 @type sizeY: int 245 @ivar renderer: Rendering engine choice. 246 Valid values are 0 (internal) or 1 (Yafray). 247 @type renderer: int 248 249 @ivar sequencer: Enables sequencer output rendering. 250 Also see B{SEQUENCER} in L{SceModes} constant dict. 251 @type sequencer: boolean 252 @ivar extensions: Add extensions to output (when rendering animations). 253 Also see B{EXTENSION} in L{SceModes} constant dict. 254 @type extensions: boolean 255 @ivar compositor: 'Do Compositor' enabled. 256 @type compositor: boolean 257 @ivar freeImages: Texture images are freed after render. 258 @type freeImages: boolean 259 @ivar singleLayer: Only render the active layer. 260 @type singleLayer: boolean 261 @ivar activeLayer: The active render layer. Must be in range[0,num render layers-1] 262 @type activeLayer: int 263 @ivar saveBuffers: Save render buffers to disk while rendering, saves memory. 264 @type saveBuffers: boolean 265 @ivar compositeFree: Free nodes that are not used while composite. 266 @type compositeFree: boolean 267 268 @ivar panorama: Panorama rendering enabled. 269 Also see B{PANORAMA} in L{Modes} constant dict. 270 @type panorama: boolean 271 @ivar rayTracing: Ray tracing enabled. 272 Also see B{RAYTRACING} in L{Modes} constant dict. 273 @type rayTracing: boolean 274 @ivar renderPath: The path to output the rendered images. 275 @type renderPath: string 276 @ivar gameFrame: Game framing type. See L{FramingModes} constant dict. 277 @type gameFrame: int 278 @ivar aspectY: Vertical aspect ratio. 279 Values are clamped to the range [1,200]. 280 @type aspectY: int 281 @ivar imageType: File format for saving images. See the module's constants 282 for values. 283 @type imageType: int 284 @ivar ftypePath: The path to Ftype file. 285 @type ftypePath: string 286 @ivar border: The border for border rendering. The format is 287 [xmin,ymin,xmax,ymax]. Values are clamped to [0.0,1.0]. 288 @type border: list of 4 floats. 289 @ivar edgeColor: RGB color triplet for edges in Toon shading (unified 290 renderer). 291 Values are clamped in the range [0.0,1.0]. 292 @type edgeColor: list of 3 RGB floats 293 @ivar yParts: Number of vertical parts for image render. 294 Values are clamped to the range [2,512]. 295 @type yParts: int 296 @ivar imagePlanes: Image depth in bits. Valid values are 8, 24, or 32. 297 @type imagePlanes: int 298 @ivar borderRender: Small cut-out rendering enabled. 299 Also see B{BORDER_RENDER} in L{Modes} constant dict. 300 @type borderRender: boolean 301 @ivar oversampling: Oversampling (anti-aliasing) enabled. 302 Also see B{OSA} in L{Modes} constant dict. 303 @type oversampling: boolean 304 @ivar fps: Frames per second. 305 Values are clamped to the range [1,120]. 306 @ivar fpsBase: Frames per second base: used to generate fractional frames 307 per second values. For example, setting fps to 30 and fps_base to 1.001 308 will approximate the NTSC frame rate of 29.97 fps. 309 Values are clamped to the range [1,120]. 310 @type fpsBase: float 311 @ivar timeCode: Get the current frame in HH:MM:SS:FF format. Read-only. 312 @type timeCode: string 313 @ivar environmentMap: Environment map rendering enabled. 314 Also see B{ENVMAP} in L{Modes} constant dict. 315 @type environmentMap: boolean 316 @ivar motionBlur: Motion blur enabled. 317 Also see B{MBLUR} in L{Modes} constant dict. 318 @type motionBlur: boolean 319 @ivar oddFieldFirst: Odd field first rendering enabled. 320 Also see B{ODDFIELD} in L{Modes} constant dict. 321 @type oddFieldFirst: boolean 322 @ivar alphaMode: Setting for sky/background. Valid values are 0 (fill 323 background with sky), 1 (multiply alpha in advance), or 2 (alpha and color 324 values remain unchanged). 325 @type alphaMode: int 326 @ivar gaussFilter: Gauss filter size. 327 Values are clamped to the range [0.5,1.5]. 328 @type gaussFilter: float 329 @ivar mblurFactor: Motion blur factor. 330 Values are clamped to the range [0.01,5.0]. 331 @type mblurFactor: float 332 @ivar mapOld: Number of frames the Map Old will last 333 Values are clamped to the range [1,900]. 334 @type mapOld: int 335 @ivar mapNew: New mapping value (in frames). 336 Values are clamped to the range [1,900]. 337 @type mapNew: int 338 @ivar set: The scene linked as a set to this scene. Values are an existing 339 scene or None (setting to None clears the set). The scene argument cannot 340 cause a circular link. 341 @type set: BPy_Scene or None 342 @ivar yafrayGIMethod: Global Illumination method. 343 Valid values are NONE (0), SKYDOME (1) or FULL (2). 344 @type yafrayGIMethod: int {NONE (0), SKYDOME (1), GIFULL (2)} 345 @ivar yafrayGIQuality: Global Illumination quality. 346 @type yafrayGIQuality: int {NONE (0), LOW (1), MEDIUM (2), HIGH (3), HIGHER (4), BEST (5), USEAOSETTINGS (6)} 347 @ivar yafrayExportToXML: If true export to an xml file and call yafray instead of plugin. 348 @type yafrayExportToXML: boolean 349 @ivar yafrayAutoAntiAliasing: Automatic anti-aliasing enabled/disabled. 350 @type yafrayAutoAntiAliasing: boolean 351 @ivar yafrayClampRGB: Clamp RGB enabled/disabled. 352 @type yafrayClampRGB: boolean 353 @ivar yafrayAntiAliasingPasses: Number of anti-aliasing passes (0 is no Anti-Aliasing). 354 @type yafrayAntiAliasingPasses: int [0, 64] 355 @ivar yafrayAntiAliasingSamples: Number of samples per pass. 356 @type yafrayAntiAliasingSamples: int [0, 2048] 357 @ivar yafrayAntiAliasingPixelSize: Anti-aliasing pixel filter size. 358 @type yafrayAntiAliasingPixelSize: float [1.0, 2.0] 359 @ivar yafrayAntiAliasingThreshold: Anti-aliasing threshold. 360 @type yafrayAntiAliasingThreshold: float [0.05, 1.0] 361 @ivar yafrayGICache: Cache occlusion/irradiance samples (faster). 362 @type yafrayGICache: boolean 363 @ivar yafrayGICacheBumpNormals: Enable/disable bumpnormals for cache. 364 @type yafrayGICacheBumpNormals: boolean 365 @ivar yafrayGICacheShadowQuality: Shadow quality, keep it under 0.95 :-). 366 @type yafrayGICacheShadowQuality: float [0.01, 1.0] 367 @ivar yafrayGICachePixelsPerSample: Maximum number of pixels without samples, the lower the better and slower. 368 @type yafrayGICachePixelsPerSample: int [1, 50] 369 @ivar yafrayGICacheRefinement: Threshold to refine shadows EXPERIMENTAL. 1 = no refinement. 370 @type yafrayGICacheRefinement: float [0.001, 1.0] 371 @ivar yafrayGIPhotons: Enable/disable use of global photons to help in GI. 372 @type yafrayGIPhotons: boolean 373 @ivar yafrayGITunePhotons: If true the photonmap is shown directly in the render for tuning. 374 @type yafrayGITunePhotons: boolean 375 @ivar bakeMode: The method used when baking, see L{BakeModes}. 376 @type bakeMode: int 377 @ivar bakeNormalSpace: The method used when baking, see L{BakeNormalSpaceModes}. 378 @type bakeNormalSpace: int 379 @ivar bakeClear: When enabled, baking clears the image first. 380 @type bakeClear: bool 381 @ivar bakeToActive: When enabled, selected objects are baked onto the active object. 382 @type bakeToActive: bool 383 @ivar bakeNormalize: Normalize AO and displacement to the range of the distance value. 384 @type bakeNormalize: bool 385 @ivar bakeMargin: The pixel distance to extend baked pixels past the boundry (reduces bleeding when mipmapping) 386 @type bakeMargin: int 387 @ivar bakeDist: The distance in blender units to use when bakeToActive is enabled and geomtry does not overlap. 388 @type bakeDist: float 389 @ivar bakeBias: The distance in blender units to bias faces further away from the object. 390 @type bakeBias: float 391 @ivar halfFloat: When enabled use 16bit floats rather then 32bit for OpenEXR files. 392 @type halfFloat: bool 393 @ivar zbuf: When enabled, save the zbuffer with an OpenEXR file 394 @type zbuf: bool 395 @ivar preview: When enabled, save a preview jpeg with an OpenEXR file 396 @type preview: bool 397 @ivar touch: Create an empty file before rendering it. 398 @type touch: bool 399 @ivar noOverwrite: Skip rendering frames when the file exists. 400 @type noOverwrite: bool 401 """ 402
403 - def currentFrame(frame = None):
404 """ 405 Get/set the current frame. 406 @type frame: int (optional) 407 @param frame: must be between 1 - 30000 408 @rtype: int (if prototype is empty) 409 @return: Current frame for the scene. 410 """
411
412 - def render():
413 """ 414 Render the scene. 415 """
416
417 - def bake():
418 """ 419 Bake selected objects in the scene. 420 """
421
422 - def renderAnim():
423 """ 424 Render a series of frames to an output directory. 425 """
426
427 - def saveRenderedImage(filename, zbuffer=0):
428 """ 429 Saves the image rendered using RenderData.render() to the filename and path 430 given in the variable 'filename'. 431 432 Make sure the filename you provide makes a valid path when added to the "render path" 433 (setRenderPath/getRenderPath) to make up the absolute path. 434 If you want to render to a new absolute path just set the renderpath to an 435 empty string and use the absolute path as the filename. 436 @param filename: The path+filename for the rendered image. 437 @type zbuffer: int 438 @param zbuffer: Whether or not to render the zbuffer along with the image. 439 @type filename: string 440 @since: 2.40 441 @requires: You must have an image currently rendered before calling this method 442 @warning: This wont work in background mode. use renderAnim instead. 443 """
444
445 - def play():
446 """ 447 play animation of rendered images/avi (searches Pics: field). 448 """
449
450 - def getTimeCode():
451 """ 452 Get the current frame as a string in HH:MM:SS:FF format 453 @rtype: string 454 @return: current frame as a string in HH:MM:SS:FF format 455 """
456
457 - def setRenderPath(path):
458 """ 459 Set the path to where the renderer will write to. 460 @type path: string 461 @param path: A directory for that the renderer searches for 462 both playback and output from the renderAnim function. 463 """
464
465 - def getRenderPath():
466 """ 467 Get the path to where the renderer will write to. 468 @rtype: string 469 @return: Returns the directory that is used to playback and store rendered 470 sequences. 471 """
472
473 - def getFrameFilename( frame ):
474 """ 475 Get the filename used for the remdered image. 476 @type frame: int 477 @param frame: the frame to use in the filename, if no argument given, use the current frame. 478 @rtype: string 479 @return: Returns the filename that blender would render to, taking into account output path, extension and frame number. 480 """
481
482 - def setBackbufPath(path):
483 """ 484 Set the path to a background image and load it. 485 @type path: string 486 @param path: The path to a background image for loading. 487 """
488
489 - def getBackbufPath():
490 """ 491 Get the path to the background image. 492 @rtype: string 493 @return: The path to a background image. 494 """
495
496 - def enableBackbuf(toggle):
497 """ 498 Enable/disable the backbuf image. 499 @type toggle: int 500 @param toggle: pass 1 for on / 0 for off 501 """
502
503 - def setFtypePath(path):
504 """ 505 Set the path to Ftype file. 506 @type path: string 507 @param path: Path to Ftype Image type. 508 """
509
510 - def getFtypePath():
511 """ 512 Get the path to the Ftype file 513 @rtype: string 514 @return: Path to FtypeImage type. 515 """
516
517 - def enableExtensions(toggle):
518 """ 519 Enable/disable windows extensions for output files. 520 @type toggle: int 521 @param toggle: pass 1 for on / 0 for off 522 """
523
524 - def enableSequencer(toggle):
525 """ 526 Enable/disable Do Sequence. 527 @type toggle: int 528 @param toggle: pass 1 for on / 0 for off 529 """
530
531 - def enableRenderDaemon(toggle):
532 """ 533 Enable/disable Scene daemon. 534 @type toggle: int 535 @param toggle: pass 1 for on / 0 for off 536 """
537
538 - def enableToonShading(toggle):
539 """ 540 Enable/disable Edge rendering. 541 @type toggle: int 542 @param toggle: pass 1 for on / 0 for off 543 """
544
545 - def edgeIntensity(intensity = None):
546 """ 547 Get/set edge intensity for toon shading. 548 @type intensity: int (optional) 549 @param intensity: must be between 0 - 255 550 @rtype: int (if prototype is empty) 551 @return: Current edge intensity for the scene. 552 """
553
554 - def setEdgeColor(red, green, blue):
555 """ 556 Set the edge color for toon shading. 557 @type red: float 558 @param red: must be between 0 - 1.0 559 @type green: float 560 @param green: must be between 0 - 1.0 561 @type blue: float 562 @param blue: must be between 0 - 1.0 563 """
564
565 - def getEdgeColor():
566 """ 567 Get the edge color for toon shading. 568 @rtype: string 569 @return: A string representing the edge color. 570 """
571
572 - def edgeAntiShift(intensity = None):
573 """ 574 With the unified renderer, reduce intensity on boundaries. 575 @type intensity: int (optional) 576 @param intensity: must be between 0 - 255 577 @rtype: int (if prototype is empty) 578 @return: Current edge antishift for the scene. 579 """
580
581 - def enableOversampling(toggle):
582 """ 583 Enable/disable oversampling (anti-aliasing). 584 @type toggle: int 585 @param toggle: pass 1 for on / 0 for off 586 """
587
588 - def setOversamplingLevel(level):
589 """ 590 Set the level of over-sampling (anti-aliasing). 591 @type level: int 592 @param level: can be either 5, 8, 11, or 16 593 """
594
595 - def enableMotionBlur(toggle):
596 """ 597 Enable/disable MBlur. 598 @type toggle: int 599 @param toggle: pass 1 for on / 0 for off 600 """
601
602 - def motionBlurLevel(level = None):
603 """ 604 Get/set the length of shutter time for motion blur. 605 @type level: float (optional) 606 @param level: must be between 0.01 - 5.0 607 @rtype: float (if prototype is empty) 608 @return: Current MBlur for the scene. 609 """
610
611 - def partsX(parts = None):
612 """ 613 Get/set the number of parts to divide the render in the X direction. 614 @type parts: int (optional) 615 @param parts: must be between 1 - 64 616 @rtype: int (if prototype is empty) 617 @return: Current number of parts in the X for the scene. 618 """
619
620 - def partsY(parts = None):
621 """ 622 Get/set the number of parts to divide the render in the Y direction. 623 @type parts: int (optional) 624 @param parts: must be between 1 - 64 625 @rtype: int (if prototype is empty) 626 @return: Current number of parts in the Y for the scene. 627 """
628
629 - def enableSky():
630 """ 631 Enable render background with sky. 632 """
633
634 - def enablePremultiply():
635 """ 636 Enable premultiply alpha. 637 """
638
639 - def enableKey():
640 """ 641 Enable alpha and color values remain unchanged. 642 """
643
644 - def enableShadow(toggle):
645 """ 646 Enable/disable shadow calculation. 647 @type toggle: int 648 @param toggle: pass 1 for on / 0 for off 649 """
650
651 - def enableEnvironmentMap(toggle):
652 """ 653 Enable/disable environment map rendering. 654 @type toggle: int 655 @param toggle: pass 1 for on / 0 for off 656 """
657
658 - def enableRayTracing(toggle):
659 """ 660 Enable/disable ray tracing. 661 @type toggle: int 662 @param toggle: pass 1 for on / 0 for off 663 """
664
665 - def enableRadiosityRender(toggle):
666 """ 667 Enable/disable radiosity rendering. 668 @type toggle: int 669 @param toggle: pass 1 for on / 0 for off 670 """
671
672 - def enablePanorama(toggle):
673 """ 674 Enable/disable panorama rendering (output width is multiplied by Xparts). 675 @type toggle: int 676 @param toggle: pass 1 for on / 0 for off 677 """
678
679 - def setRenderWinSize(size):
680 """ 681 Set the size of the render window. 682 @type size: int 683 @param size: can be 25, 50, 75 or 100 (percent). 684 """
685
686 - def getRenderWinSize():
687 """ 688 Get the size of the render window. 689 @rtype: int 690 @return: window size; can be 25, 50, 75 or 100 (percent). 691 """
692
693 - def enableFieldRendering(toggle):
694 """ 695 Enable/disable field rendering 696 @type toggle: int 697 @param toggle: pass 1 for on / 0 for off 698 """
699
700 - def enableOddFieldFirst(toggle):
701 """ 702 Enable/disable Odd field first rendering (Default: Even field). 703 @type toggle: int 704 @param toggle: pass 1 for on / 0 for off 705 """
706
707 - def enableFieldTimeDisable(toggle):
708 """ 709 Enable/disable time difference in field calculations. 710 @type toggle: int 711 @param toggle: pass 1 for on / 0 for off 712 """
713
714 - def enableGaussFilter(toggle):
715 """ 716 Enable/disable Gauss sampling filter for anti-aliasing. 717 @type toggle: int 718 @param toggle: pass 1 for on / 0 for off 719 """
720
721 - def enableBorderRender(toggle):
722 """ 723 Enable/disable small cut-out rendering. 724 @type toggle: int 725 @param toggle: pass 1 for on / 0 for off 726 """
727
728 - def setBorder(left,bottom,right,top):
729 """ 730 Set a border for rendering from cameras in the scene. 731 The left,bottom coordinates and right,top coordinates 732 define the size of the border. (0,0,1,1) will set the border 733 to the whole camera. (0,0) lower left and (1,1) upper right. 734 @type left: float 735 @param left: float between 0 and 1 736 @type right: float 737 @param right: float between 0 and 1 738 @type bottom: float 739 @param bottom: float between 0 and 1 740 @type top: float 741 @param top: float between 0 and 1 742 """
743
744 - def enableGammaCorrection(toggle):
745 """ 746 Enable/disable gamma correction. 747 @type toggle: int 748 @param toggle: pass 1 for on / 0 for off 749 """
750
751 - def gaussFilterSize(size = None):
752 """ 753 Get/sets the Gauss filter size. 754 @type size: float (optional) 755 @param size: must be between 0.5 - 1.5 756 @rtype: float (if prototype is empty) 757 @return: Current gauss filter size for the scene. 758 """
759
760 - def startFrame(frame = None):
761 """ 762 Get/set the starting frame for sequence rendering. 763 @type frame: int (optional) 764 @param frame: must be a valid Blender frame number. 765 @rtype: int (if prototype is empty) 766 @return: Current starting frame for the scene. 767 """
768
769 - def endFrame(frame = None):
770 """ 771 Get/set the ending frame for sequence rendering. 772 @type frame: int (optional) 773 @param frame: must be a valid Blender frame number. 774 @rtype: int (if prototype is empty) 775 @return: Current ending frame for the scene. 776 """
777
778 - def imageSizeX(size = None):
779 """ 780 Get/set the image width in pixels. 781 @type size: int (optional) 782 @param size: must be between 4 - 10000 783 @rtype: int (if prototype is empty) 784 @return: Current image width for the scene. 785 """
786
787 - def imageSizeY(size = None):
788 """ 789 Get/set the image height in pixels. 790 @type size: int (optional) 791 @param size: must be between 4 - 10000 792 @rtype: int (if prototype is empty) 793 @return: Current image height for the scene. 794 """
795
796 - def aspectRatioX(ratio = None):
797 """ 798 Get/set the horizontal aspect ratio. 799 @type ratio: int (optional) 800 @param ratio: must be between 1 - 200 801 @rtype: int (if prototype is empty) 802 @return: Current horizontal aspect ratio for the scene. 803 """
804
805 - def aspectRatioY(ratio = None):
806 """ 807 Get/set the vertical aspect ratio. 808 @type ratio: int (optional) 809 @param ratio: must be between 1 - 200 810 @rtype: int (if prototype is empty) 811 @return: Current vertical aspect ratio for the scene. 812 """
813
814 - def setRenderer(type):
815 """ 816 Get/set which renderer to render the output. 817 @type type: enum constant 818 @param type: must be one of 2 constants: 819 - INTERN: Blender's internal renderer 820 - YAFRAY: Yafray renderer 821 """
822
823 - def enableCropping(toggle):
824 """ 825 Deprecated: see the L{crop} attribute. 826 """
827
828 - def setImageType(type):
829 """ 830 Set the type of image to output from the render. 831 @type type: enum constant 832 @param type: must be one of 13 constants: 833 - AVIRAW: Uncompressed AVI files. AVI is a commonly used format on Windows platforms 834 - AVIJPEG: AVI movie w/ JPEG images 835 - AVICODEC: AVI using win32 codec 836 - QUICKTIME: Quicktime movie (if enabled) 837 - TARGA: Targa files 838 - RAWTGA: Raw Targa files 839 - PNG: Png files 840 - BMP: Bitmap files 841 - JPEG90: JPEG files 842 - HAMX: Hamx files 843 - IRIS: Iris files 844 - IRIZ: Iris + z-buffer files 845 - FTYPE: Ftype file 846 """
847
848 - def quality(qual = None):
849 """ 850 Get/set quality get/setting for JPEG images, AVI JPEG and SGI movies. 851 @type qual: int (optional) 852 @param qual: must be between 10 - 100 853 @rtype: int (if prototype is empty) 854 @return: Current image quality for the scene. 855 """
856
857 - def framesPerSec(qual = None):
858 """ 859 Get/set frames per second. 860 @type qual: int (optional) 861 @param qual: must be between 1 - 120 862 @rtype: int (if prototype is empty) 863 @return: Current frames per second for the scene. 864 """
865
866 - def enableGrayscale():
867 """ 868 Images are saved with black and white (grayscale) data. 869 """
870
871 - def enableRGBColor():
872 """ 873 Images are saved with RGB (color) data. 874 """
875
876 - def enableRGBAColor():
877 """ 878 Images are saved with RGB and Alpha data (if supported). 879 """
880
881 - def sizePreset(type):
882 """ 883 Set the renderer to one of a few presets. 884 @type type: enum constant 885 @param type: must be one of 8 constants: 886 - PAL: The European video standard: 720 x 576 pixels, 54 x 51 aspect. 887 - FULL: For large screens: 1280 x 1024 pixels. 888 - PREVIEW: For preview rendering: 320 x 256 pixels. 889 - PAL169: Wide-screen PAL. 890 - DEFAULT: Like "PAL", but here the render settings are also set. 891 - PANO: Panorama render. 892 - NTSC: For TV playback. 893 - PC: For standard PC graphics: 640 x 480 pixels. 894 """
895
896 - def enableUnifiedRenderer(toggle):
897 """ 898 Use the unified renderer. 899 @type toggle: int 900 @param toggle: pass 1 for on / 0 for off 901 """
902
903 - def setYafrayGIQuality(type):
904 """ 905 Set yafray global Illumination quality. 906 @type type: enum constant 907 @param type: must be one of 6 constants: 908 - NONE 909 - LOW 910 - MEDIUM 911 - HIGH 912 - HIGHER 913 - BEST 914 - USEAOSETTINGS 915 """
916
917 - def getYafrayGIQuality():
918 """ 919 Get yafray global Illumination quality. 920 @rtype: enum constant 921 @return: one of 6 constants: 922 - NONE 923 - LOW 924 - MEDIUM 925 - HIGH 926 - HIGHER 927 - BEST 928 - USEAOSETTINGS 929 """
930
931 - def setYafrayGIMethod(type):
932 """ 933 Set yafray global Illumination method. 934 @type type: enum constant 935 @param type: must be one of 3 constants: 936 - NONE: Do not use GI illumination 937 - SKYDOME: Use Skydome method 938 - GIFULL: Use Full method 939 """
940
941 - def getYafrayGIMethod():
942 # (dietrich) 2007/06/01 943 """ 944 Get yafray global Illumination method. 945 @rtype: enum constant - 946 @return: Current yafray global illumination method: 947 - NONE: Do not use GI illumination 948 - SKYDOME: Use Skydome method 949 - GIFULL: Use Full method 950 """
951
952 - def yafrayGIPower(power = None):
953 """ 954 Get/set GI lighting intensity scale. 955 YafrayMethod must be either SKYDOME or GIFULL. 956 @type power: float (optional) 957 @param power: must be between 0.01 - 100.0 958 @rtype: float (if prototype is empty) 959 @return: Current yafray global illumination intensity for the scene. 960 """
961
962 - def yafrayGIIndirPower(power = None):
963 """ 964 Get/set GI indirect lighting intensity scale. 965 @type power: float (optional) 966 @param power: must be between 0.01 - 100.0 967 @rtype: float (if prototype is empty) 968 @return: Current yafray indirect illumination intensity for the scene. 969 """
970
971 - def yafrayGIDepth(depth = None):
972 """ 973 Get/set number of bounces of the indirect light. 974 YafrayMethod must be GIFULL. 975 @type depth: int (optional) 976 @param depth: must be between 1 - 8 977 @rtype: int (if prototype is empty) 978 @return: Current yafray global illumination light bounces for the scene. 979 """
980
981 - def yafrayGICDepth(depth = None):
982 """ 983 Get/set number of bounces inside objects (for caustics). 984 YafrayMethod must be GIFULL. 985 @type depth: int (optional) 986 @param depth: must be between 1 - 8 987 @rtype: int (if prototype is empty) 988 @return: Current yafray global illumination inside light bounces for the scene. 989 """
990
991 - def enableYafrayGICache(toggle):
992 """ 993 Enable/disable cache irradiance samples (faster). 994 YafrayMethod must be GIFULL. 995 @type toggle: int 996 @param toggle: pass 1 for on / 0 for off 997 """
998
999 - def enableYafrayGIPhotons(toggle):
1000 """ 1001 Enable/disable use of global photons to help in GI. 1002 YafrayMethod must be GIFULL. 1003 @type toggle: int 1004 @param toggle: pass 1 for on / 0 for off 1005 """
1006
1007 - def yafrayGIPhotonCount(count = None):
1008 """ 1009 Get/set number of photons to shoot. 1010 YafrayMethod must be GIFULL and Photons enabled. 1011 @type count: int (optional) 1012 @param count: must be between 0 - 10000000 1013 @rtype: int (if prototype is empty) 1014 @return: Current number of photons to shoot for the scene. 1015 """
1016 1017
1018 - def yafrayGIPhotonRadius(radius = None):
1019 """ 1020 Get/set radius to search for photons to mix (blur). 1021 YafrayMethod must be GIFULL and Photons enabled. 1022 @type radius: float (optional) 1023 @param radius: must be between 0.00001 - 100.0 1024 @rtype: float (if prototype is empty) 1025 @return: Current photon search radius for the scene. 1026 """
1027 1028
1029 - def yafrayGIPhotonMixCount(count = None):
1030 """ 1031 Get/set number of photons to keep inside radius. 1032 YafrayMethod must be GIFULL and Photons enabled. 1033 @type count: int (optional) 1034 @param count: must be between 0 - 1000 1035 @rtype: int (if prototype is empty) 1036 @return: Current number of photons to keep inside radius for the scene. 1037 """
1038
1039 - def enableYafrayGITunePhotons(toggle):
1040 """ 1041 Enable/disable show the photon map directly in the render for tuning. 1042 YafrayMethod must be GIFULL and Photons enabled. 1043 @type toggle: int 1044 @param toggle: pass 1 for on / 0 for off 1045 """
1046
1047 - def yafrayGIShadowQuality(qual = None):
1048 """ 1049 Get/set the shadow quality, keep it under 0.95. 1050 YafrayMethod must be GIFULL and Cache enabled. 1051 @type qual: float (optional) 1052 @param qual: must be between 0.01 - 1.0 1053 @rtype: float (if prototype is empty) 1054 @return: Current shadow quality for the scene. 1055 """
1056
1057 - def yafrayGIPixelsPerSample(pixels = None):
1058 """ 1059 Get/set maximum number of pixels without samples, the lower the better and slower. 1060 YafrayMethod must be GIFULL and Cache enabled. 1061 @type pixels: int (optional) 1062 @param pixels: must be between 1 - 50 1063 @rtype: int (if prototype is empty) 1064 @return: Current number of pixels without samples for the scene. 1065 """
1066
1067 - def enableYafrayGIGradient(toggle):
1068 """ 1069 Enable/disable try to smooth lighting using a gradient. 1070 YafrayMethod must be GIFULL and Cache enabled. 1071 @type toggle: int 1072 @param toggle: pass 1 for on / 0 for off 1073 """
1074
1075 - def yafrayGIRefinement(refine = None):
1076 """ 1077 Get/set threshold to refine shadows EXPERIMENTAL. 1 = no refinement. 1078 YafrayMethod must be GIFULL and Cache enabled. 1079 @type refine: float (optional) 1080 @param refine: must be between 0.001 - 1.0 1081 @rtype: float (if prototype is empty) 1082 @return: Current threshold to refine shadows for the scene. 1083 """
1084
1085 - def yafrayRayBias(bias = None):
1086 """ 1087 Get/set shadow ray bias to avoid self shadowing. 1088 @type bias: float (optional) 1089 @param bias: must be between 0 - 10.0 1090 @rtype: float (if prototype is empty) 1091 @return: Current ray bias for the scene. 1092 """
1093
1094 - def yafrayRayDepth(depth = None):
1095 """ 1096 Get/set maximum render ray depth from the camera. 1097 @type depth: int (optional) 1098 @param depth: must be between 1 - 80 1099 @rtype: int (if prototype is empty) 1100 @return: Current ray depth for the scene. 1101 """
1102
1103 - def yafrayGamma(gamma = None):
1104 """ 1105 Get/set gamma correction, 1 is off. 1106 @type gamma: float (optional) 1107 @param gamma: must be between 0.001 - 5.0 1108 @rtype: float (if prototype is empty) 1109 @return: Current gamma correction for the scene. 1110 """
1111
1112 - def yafrayExposure(expose = None):
1113 """ 1114 Get/set exposure adjustment, 0 is off. 1115 @type expose: float (optional) 1116 @param expose: must be between 0 - 10.0 1117 @rtype: float (if prototype is empty) 1118 @return: Current exposure adjustment for the scene. 1119 """
1120
1122 """ 1123 Enable stretch or squeeze the viewport to fill the display window. 1124 """
1125
1127 """ 1128 Enable show the entire viewport in the display window, viewing more 1129 horizontally or vertically. 1130 """
1131
1132 - def enableGameFrameBars():
1133 """ 1134 Enable show the entire viewport in the display window, using bar 1135 horizontally or vertically. 1136 """
1137
1138 - def setGameFrameColor(red, green, blue):
1139 """ 1140 Set the red, green, blue component of the bars. 1141 @type red: float 1142 @param red: must be between 0 - 1.0 1143 @type green: float 1144 @param green: must be between 0 - 1.0 1145 @type blue: float 1146 @param blue: must be between 0 - 1.0 1147 """
1148
1149 - def getGameFrameColor():
1150 """ 1151 Set the red, green, blue component of the bars. 1152 @rtype: string 1153 @return: A string representing the color component of the bars. 1154 """
1155
1156 - def gammaLevel(level = None):
1157 """ 1158 Get/set the gamma value for blending oversampled images (1.0 = no correction). 1159 Unified renderer must be enabled. 1160 @type level: float (optional) 1161 @param level: must be between 0.2 - 5.0 1162 @rtype: float (if prototype is empty) 1163 @return: Current gamma value for the scene. 1164 """
1165
1166 - def postProcessAdd(add = None):
1167 """ 1168 Get/set post processing add. 1169 Unified renderer must be enabled. 1170 @type add: float (optional) 1171 @param add: must be between -1.0 - 1.0 1172 @rtype: float (if prototype is empty) 1173 @return: Current processing add value for the scene. 1174 """
1175
1176 - def postProcessMultiply(mult = None):
1177 """ 1178 Get/set post processing multiply. 1179 Unified renderer must be enabled. 1180 @type mult: float (optional) 1181 @param mult: must be between 0.01 - 4.0 1182 @rtype: float (if prototype is empty) 1183 @return: Current processing multiply value for the scene. 1184 """
1185
1186 - def postProcessGamma(gamma = None):
1187 """ 1188 Get/set post processing gamma. 1189 Unified renderer must be enabled. 1190 @type gamma: float (optional) 1191 @param gamma: must be between 0.2 - 2.0 1192 @rtype: float (if prototype is empty) 1193 @return: Current processing gamma value for the scene. 1194 """
1195
1196 - def SGIMaxsize(size = None):
1197 """ 1198 Get/set maximum size per frame to save in an SGI movie. 1199 SGI must be defined on your machine. 1200 @type size: int (optional) 1201 @param size: must be between 0 - 500 1202 @rtype: int (if prototype is empty) 1203 @return: Current SGI maximum size per frame for the scene. 1204 """
1205
1206 - def enableSGICosmo(toggle):
1207 """ 1208 Enable/disable attempt to save SGI movies using Cosmo hardware 1209 SGI must be defined on your machine. 1210 @type toggle: int 1211 @param toggle: pass 1 for on / 0 for off 1212 """
1213
1214 - def oldMapValue(value = None):
1215 """ 1216 Get/set specify old map value in frames. 1217 @type value: int (optional) 1218 @param value: must be between 1 - 900 1219 @rtype: int (if prototype is empty) 1220 @return: Current old map value for the scene. 1221 """
1222
1223 - def newMapValue(value = None):
1224 """ 1225 Get/set specify new map value in frames. 1226 @type value: int (optional) 1227 @param value: must be between 1 - 900 1228 @rtype: int (if prototype is empty) 1229 @return: Current new map value for the scene. 1230 """
1231
1232 - def addRenderLayer():
1233 """ 1234 Add a new render layer to the rendering context, see L{RenderLayer}. 1235 @rtype: RenderLayer 1236 @return: The newly created renderlayer. 1237 """
1238
1239 - def removeRenderLayer(renderlayer):
1240 """ 1241 Remove the specified render layer from the rendering context. 1242 @type renderlayer: L{RenderLayer} 1243 @param renderlayer: must be a L{RenderLayer} 1244 """
1245