Module Render

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