4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * Contributor(s): Blender Foundation (2008).
22 * ***** END GPL LICENSE BLOCK *****
27 #include "RNA_define.h"
28 #include "RNA_types.h"
30 #include "rna_internal.h"
32 #include "DNA_scene_types.h"
35 #include "BKE_writeffmpeg.h"
36 #include <libavcodec/avcodec.h>
37 #include <libavformat/avformat.h>
42 /* prop_mode needs to be accessible from transform operator */
43 EnumPropertyItem prop_mode_items[] ={
44 {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
45 {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
46 {PROP_ROOT, "ROOT", 0, "Root", ""},
47 {PROP_SHARP, "SHARP", 0, "Sharp", ""},
48 {PROP_LIN, "LINEAR", 0, "Linear", ""},
49 {PROP_CONST, "CONSTANT", 0, "Constant", ""},
50 {PROP_RANDOM, "RANDOM", 0, "Random", ""},
51 {0, NULL, 0, NULL, NULL}};
55 #include "DNA_node_types.h"
57 #include "BKE_context.h"
58 #include "BKE_global.h"
61 #include "BLI_threads.h"
63 #include "RE_pipeline.h"
65 PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
67 ListBaseIterator *internal= iter->internal;
69 /* we are actually iterating a Base list, so override get */
70 return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
73 static int layer_set(int lay, const int *values)
77 /* ensure we always have some layer selected */
86 if(values[i]) lay |= (1<<i);
93 static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
95 Scene *scene= (Scene*)ptr->data;
97 scene->lay= layer_set(scene->lay, values);
100 static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
102 Scene *data= (Scene*)ptr->data;
103 CLAMP(value, 1, data->r.efra);
107 static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
109 Scene *data= (Scene*)ptr->data;
110 CLAMP(value, data->r.sfra, MAXFRAME);
114 static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
116 //Scene *scene= ptr->id.data;
117 //update_for_newframe();
120 static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
122 RenderData *rd= (RenderData*)ptr->data;
124 if(rd->mode & R_FIXED_THREADS)
127 return BLI_system_thread_count();
130 static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
132 RenderData *rd= (RenderData*)ptr->data;
134 return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
137 static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
139 RenderData *rd= (RenderData*)ptr->data;
143 ffmpeg_verify_image_type(rd);
147 static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
149 RenderData *rd= (RenderData*)ptr->data;
153 static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
155 RenderData *rd= (RenderData*)ptr->data;
159 static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
161 RenderData *rd= (RenderData*)ptr->data;
164 *max= BLI_countlist(&rd->layers)-1;
168 static void rna_SceneRenderData_engine_set(PointerRNA *ptr, int value)
170 RenderData *rd= (RenderData*)ptr->data;
171 RenderEngineType *type= BLI_findlink(&R_engines, value);
174 BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
177 static EnumPropertyItem *rna_SceneRenderData_engine_itemf(bContext *C, PointerRNA *ptr, int *free)
179 RenderEngineType *type;
180 EnumPropertyItem *item= NULL;
181 EnumPropertyItem tmp = {0, "", 0, "", ""};
184 for(type=R_engines.first; type; type=type->next, a++) {
186 tmp.identifier= type->idname;
187 tmp.name= type->name;
188 RNA_enum_item_add(&item, &totitem, &tmp);
191 RNA_enum_item_end(&item, &totitem);
197 static int rna_SceneRenderData_engine_get(PointerRNA *ptr)
199 RenderData *rd= (RenderData*)ptr->data;
200 RenderEngineType *type;
203 for(type=R_engines.first; type; type=type->next, a++)
204 if(strcmp(type->idname, rd->engine) == 0)
210 static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
212 Scene *scene= (Scene*)ptr->id.data;
213 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
215 BLI_strncpy(rl->name, value, sizeof(rl->name));
217 if(scene->nodetree) {
219 int index= BLI_findindex(&scene->r.layers, rl);
221 for(node= scene->nodetree->nodes.first; node; node= node->next) {
222 if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
223 if(node->custom1==index)
224 BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
230 static int rna_SceneRenderData_multiple_engines_get(PointerRNA *ptr)
232 return (BLI_countlist(&R_engines) > 1);
235 static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
237 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
238 rl->lay= layer_set(rl->lay, values);
241 static void rna_SceneRenderLayer_zmask_layer_set(PointerRNA *ptr, const int *values)
243 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
244 rl->lay_zmask= layer_set(rl->lay_zmask, values);
247 static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
249 Scene *scene= (Scene*)ptr->id.data;
252 ntreeCompositForceHidden(scene->nodetree, scene);
257 static void rna_def_sculpt(BlenderRNA *brna)
262 srna= RNA_def_struct(brna, "Sculpt", NULL);
263 RNA_def_struct_nested(brna, srna, "Scene");
264 RNA_def_struct_ui_text(srna, "Sculpt", "");
266 prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
267 RNA_def_property_struct_type(prop, "Brush");
268 RNA_def_property_ui_text(prop, "Brush", "");
270 prop= RNA_def_property(srna, "symmetry_x", PROP_BOOLEAN, PROP_NONE);
271 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_X);
272 RNA_def_property_ui_text(prop, "Symmetry X", "Mirror brush across the X axis.");
274 prop= RNA_def_property(srna, "symmetry_y", PROP_BOOLEAN, PROP_NONE);
275 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Y);
276 RNA_def_property_ui_text(prop, "Symmetry Y", "Mirror brush across the Y axis.");
278 prop= RNA_def_property(srna, "symmetry_z", PROP_BOOLEAN, PROP_NONE);
279 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Z);
280 RNA_def_property_ui_text(prop, "Symmetry Z", "Mirror brush across the Z axis.");
282 prop= RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
283 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_X);
284 RNA_def_property_ui_text(prop, "Lock X", "Disallow changes to the X axis of vertices.");
286 prop= RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
287 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Y);
288 RNA_def_property_ui_text(prop, "Lock Y", "Disallow changes to the Y axis of vertices.");
290 prop= RNA_def_property(srna, "lock_z", PROP_BOOLEAN, PROP_NONE);
291 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Z);
292 RNA_def_property_ui_text(prop, "Lock Z", "Disallow changes to the Z axis of vertices.");
294 prop= RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
295 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DRAW_BRUSH);
296 RNA_def_property_ui_text(prop, "Show Brush", "");
298 prop= RNA_def_property(srna, "partial_redraw", PROP_BOOLEAN, PROP_NONE);
299 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DRAW_FAST);
300 RNA_def_property_ui_text(prop, "Partial Redraw", "Optimize sculpting by only refreshing modified faces.");
303 static void rna_def_tool_settings(BlenderRNA *brna)
308 static EnumPropertyItem uv_select_mode_items[] = {
309 {UV_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
310 {UV_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
311 {UV_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
312 {UV_SELECT_ISLAND, "ISLAND", ICON_LINKEDSEL, "Island", "Island selection mode."},
313 {0, NULL, 0, NULL, NULL}};
315 static EnumPropertyItem mesh_select_mode_items[] = {
316 {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
317 {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
318 {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
319 {0, NULL, 0, NULL, NULL}};
321 static EnumPropertyItem snap_element_items[] = {
322 {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
323 {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
324 {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
325 {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
326 {0, NULL, 0, NULL, NULL}};
328 static EnumPropertyItem snap_mode_items[] = {
329 {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
330 {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
331 {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
332 {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
333 {0, NULL, 0, NULL, NULL}};
335 srna= RNA_def_struct(brna, "ToolSettings", NULL);
336 RNA_def_struct_ui_text(srna, "Tool Settings", "");
338 prop= RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
339 RNA_def_property_struct_type(prop, "Sculpt");
340 RNA_def_property_ui_text(prop, "Sculpt", "");
342 prop= RNA_def_property(srna, "vpaint", PROP_POINTER, PROP_NONE);
343 RNA_def_property_struct_type(prop, "VPaint");
344 RNA_def_property_ui_text(prop, "Vertex Paint", "");
346 prop= RNA_def_property(srna, "wpaint", PROP_POINTER, PROP_NONE);
347 RNA_def_property_struct_type(prop, "VPaint");
348 RNA_def_property_ui_text(prop, "Weight Paint", "");
351 prop= RNA_def_property(srna, "proportional_editing", PROP_BOOLEAN, PROP_NONE);
352 RNA_def_property_boolean_sdna(prop, NULL, "proportional", 0);
353 RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
355 prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
356 RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
357 RNA_def_property_enum_items(prop, prop_mode_items);
358 RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
360 prop= RNA_def_property(srna, "automerge_editing", PROP_BOOLEAN, PROP_NONE);
361 RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
362 RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location.");
364 prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
365 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
366 RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
367 RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
369 prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
370 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
371 RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
372 RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
374 prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
375 RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
376 RNA_def_property_enum_items(prop, snap_element_items);
377 RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
379 prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
380 RNA_def_property_enum_sdna(prop, NULL, "snap_target");
381 RNA_def_property_enum_items(prop, snap_mode_items);
382 RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
384 prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
385 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
386 RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
387 RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
390 prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
391 RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
392 RNA_def_property_enum_items(prop, uv_select_mode_items);
393 RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
395 prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
396 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
397 RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
398 RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
400 prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
401 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
402 RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
405 prop= RNA_def_property(srna, "mesh_selection_mode", PROP_ENUM, PROP_NONE);
406 RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
407 RNA_def_property_enum_items(prop, mesh_select_mode_items);
408 RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Mesh selection and display mode.");
410 prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_PERCENTAGE);
411 RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
412 RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
415 rna_def_sculpt(brna);
418 void rna_def_render_layer_common(StructRNA *srna, int scene)
422 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
423 if(scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
424 else RNA_def_property_string_sdna(prop, NULL, "name");
425 RNA_def_property_ui_text(prop, "Name", "Render layer name.");
426 RNA_def_struct_name_property(srna, prop);
427 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
428 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
430 prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
431 RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
432 RNA_def_property_struct_type(prop, "Material");
433 RNA_def_property_flag(prop, PROP_EDITABLE);
434 RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
435 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
436 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
438 prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
439 RNA_def_property_pointer_sdna(prop, NULL, "light_override");
440 RNA_def_property_struct_type(prop, "Group");
441 RNA_def_property_flag(prop, PROP_EDITABLE);
442 RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
443 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
444 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
447 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
448 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
449 RNA_def_property_array(prop, 20);
450 RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
451 if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
452 else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
453 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
454 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
456 prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_NONE);
457 RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
458 RNA_def_property_array(prop, 20);
459 RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
460 if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set");
461 else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_zmask_layer_set");
462 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
463 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
466 prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
467 RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
468 RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
469 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
470 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
472 prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE);
473 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
474 RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
475 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
476 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
478 prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE);
479 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
480 RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
481 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
482 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
484 prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE);
485 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
486 RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
487 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
488 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
490 prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE);
491 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
492 RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
493 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
494 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
496 prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
497 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
498 RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
499 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
500 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
502 prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE);
503 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
504 RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
505 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
506 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
508 prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
509 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
510 RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
511 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
512 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
514 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
515 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
516 RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
517 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
518 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
520 prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE);
521 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
522 RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
523 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
524 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
527 prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
528 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
529 RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
530 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
531 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
533 prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE);
534 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
535 RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
536 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
537 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
539 prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE);
540 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
541 RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
542 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
543 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
545 prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
546 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
547 RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
548 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
549 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
551 prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
552 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
553 RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
554 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
555 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
557 prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
558 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
559 RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
560 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
561 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
563 prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
564 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
565 RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
566 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
567 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
569 prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
570 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
571 RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
572 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
573 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
575 prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
576 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
577 RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
578 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
579 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
581 prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
582 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
583 RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
584 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
585 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
587 prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
588 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
589 RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
590 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
591 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
593 prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
594 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
595 RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
596 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
597 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
599 prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
600 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
601 RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass.");
602 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
603 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
605 prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
606 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
607 RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass.");
608 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
609 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
611 prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
612 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
613 RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
614 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
615 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
617 prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
618 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
619 RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
620 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
621 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
623 prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
624 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
625 RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
626 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
627 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
629 prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
630 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
631 RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined.");
632 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
633 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
635 prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
636 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
637 RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined.");
638 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
639 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
642 void rna_def_scene_game_data(BlenderRNA *brna)
647 static EnumPropertyItem framing_types_items[] ={
648 {SCE_GAMEFRAMING_BARS, "BARS", 0, "Stretch", ""},
649 {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", ""},
650 {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", ""},
651 {0, NULL, 0, NULL, NULL}};
653 static EnumPropertyItem dome_modes_items[] ={
654 {DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
655 {DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""},
656 {DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
657 {DOME_ENVMAP, "ENVMAP", 0, "Cube Map", ""},
658 {DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""},
659 {0, NULL, 0, NULL, NULL}};
661 static EnumPropertyItem stereo_modes_items[] ={
662 // {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
663 {STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
664 {STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
665 {STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
666 {STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""},
667 {STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""},
668 {STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
669 // {STEREO_DOME, "DOME", 0, "Dome", ""},
670 {0, NULL, 0, NULL, NULL}};
672 static EnumPropertyItem stereo_items[] ={
673 {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
674 {STEREO_ENABLED, "STEREO", 0, "Stereo", ""},
675 {STEREO_DOME, "DOME", 0, "Dome", ""},
676 {0, NULL, 0, NULL, NULL}};
678 static EnumPropertyItem physics_engine_items[] = {
679 {WOPHY_NONE, "NONE", 0, "None", ""},
680 //{WOPHY_ENJI, "ENJI", 0, "Enji", ""},
681 //{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""},
682 //{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""},
683 //{WOPHY_ODE, "ODE", 0, "ODE", ""},
684 {WOPHY_BULLET, "BULLET", 0, "Bullet", ""},
685 {0, NULL, 0, NULL, NULL}};
687 srna= RNA_def_struct(brna, "SceneGameData", NULL);
688 RNA_def_struct_sdna(srna, "GameData");
689 RNA_def_struct_nested(brna, srna, "Scene");
690 RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablock.");
692 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
693 RNA_def_property_int_sdna(prop, NULL, "xplay");
694 RNA_def_property_range(prop, 4, 10000);
695 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen.");
696 RNA_def_property_update(prop, NC_SCENE, NULL);
698 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
699 RNA_def_property_int_sdna(prop, NULL, "yplay");
700 RNA_def_property_range(prop, 4, 10000);
701 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen.");
702 RNA_def_property_update(prop, NC_SCENE, NULL);
704 prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
705 RNA_def_property_int_sdna(prop, NULL, "depth");
706 RNA_def_property_range(prop, 8, 32);
707 RNA_def_property_ui_text(prop, "Bits", "Displays bit depth of full screen display.");
708 RNA_def_property_update(prop, NC_SCENE, NULL);
710 // Do we need it here ? (since we already have it in World
711 prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
712 RNA_def_property_int_sdna(prop, NULL, "freqplay");
713 RNA_def_property_range(prop, 4, 2000);
714 RNA_def_property_ui_text(prop, "Freq", "Displays clock frequency of fullscreen display.");
715 RNA_def_property_update(prop, NC_SCENE, NULL);
717 prop= RNA_def_property(srna, "fullscreen", PROP_BOOLEAN, PROP_NONE);
718 RNA_def_property_boolean_sdna(prop, NULL, "fullscreen", 1.0);
719 RNA_def_property_ui_text(prop, "Fullscreen", "Starts player in a new fullscreen display");
720 RNA_def_property_update(prop, NC_SCENE, NULL);
723 prop= RNA_def_property(srna, "framing_type", PROP_ENUM, PROP_NONE);
724 RNA_def_property_enum_sdna(prop, NULL, "framing.type");
725 RNA_def_property_enum_items(prop, framing_types_items);
726 RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want.");
727 RNA_def_property_update(prop, NC_SCENE, NULL);
729 prop= RNA_def_property(srna, "framing_color", PROP_FLOAT, PROP_COLOR);
730 RNA_def_property_float_sdna(prop, NULL, "framing.col");
731 RNA_def_property_array(prop, 3);
732 RNA_def_property_ui_text(prop, "", "");
733 RNA_def_property_update(prop, NC_SCENE, NULL);
736 prop= RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE);
737 RNA_def_property_enum_sdna(prop, NULL, "stereoflag");
738 RNA_def_property_enum_items(prop, stereo_items);
739 RNA_def_property_ui_text(prop, "Stereo Options", "");
740 RNA_def_property_update(prop, NC_SCENE, NULL);
742 prop= RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
743 RNA_def_property_enum_sdna(prop, NULL, "stereomode");
744 RNA_def_property_enum_items(prop, stereo_modes_items);
745 RNA_def_property_ui_text(prop, "Stereo Mode", "");
746 RNA_def_property_update(prop, NC_SCENE, NULL);
749 prop= RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
750 RNA_def_property_enum_sdna(prop, NULL, "dome.mode");
751 RNA_def_property_enum_items(prop, dome_modes_items);
752 RNA_def_property_ui_text(prop, "Dome Mode", "");
753 RNA_def_property_update(prop, NC_SCENE, NULL);
755 prop= RNA_def_property(srna, "dome_tesselation", PROP_INT, PROP_NONE);
756 RNA_def_property_int_sdna(prop, NULL, "dome.res");
757 RNA_def_property_ui_range(prop, 1, 8, 1, 1);
758 RNA_def_property_ui_text(prop, "Tesselation", "Tesselation level - check the generated mesh in wireframe mode");
759 RNA_def_property_update(prop, NC_SCENE, NULL);
761 prop= RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP_NONE);
762 RNA_def_property_float_sdna(prop, NULL, "dome.resbuf");
763 RNA_def_property_ui_range(prop, 0.1, 1.0, 0.1, 0.1);
764 RNA_def_property_ui_text(prop, "Buffer Resolution", "Buffer Resolution - decrease it to increase speed");
765 RNA_def_property_update(prop, NC_SCENE, NULL);
767 prop= RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE);
768 RNA_def_property_int_sdna(prop, NULL, "dome.angle");
769 RNA_def_property_ui_range(prop, 90, 250, 1, 1);
770 RNA_def_property_ui_text(prop, "Angle", "Field of View of the Dome - it only works in mode Fisheye and Truncated");
771 RNA_def_property_update(prop, NC_SCENE, NULL);
773 prop= RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE);
774 RNA_def_property_int_sdna(prop, NULL, "dome.tilt");
775 RNA_def_property_ui_range(prop, -180, 180, 1, 1);
776 RNA_def_property_ui_text(prop, "Tilt", "Camera rotation in horizontal axis");
777 RNA_def_property_update(prop, NC_SCENE, NULL);
779 prop= RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE);
780 RNA_def_property_pointer_sdna(prop, NULL, "dome.warptext");
781 RNA_def_property_struct_type(prop, "Text");
782 RNA_def_property_flag(prop, PROP_EDITABLE);
783 RNA_def_property_ui_text(prop, "Warp Data", "Custom Warp Mesh data file");
784 RNA_def_property_update(prop, NC_SCENE, NULL);
787 prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
788 RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
789 RNA_def_property_enum_items(prop, physics_engine_items);
790 RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
791 RNA_def_property_update(prop, NC_SCENE, NULL);
793 prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_NONE);
794 RNA_def_property_float_sdna(prop, NULL, "gravity");
795 RNA_def_property_range(prop, 0.0, 25.0);
796 RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
797 RNA_def_property_update(prop, NC_SCENE, NULL);
799 prop= RNA_def_property(srna, "occlusion_culling_resolution", PROP_FLOAT, PROP_NONE);
800 RNA_def_property_float_sdna(prop, NULL, "occlusionRes");
801 RNA_def_property_range(prop, 128.0, 1024.0);
802 RNA_def_property_ui_text(prop, "Occlusion Resolution", "The size of the occlusion buffer in pixel, use higher value for better precsion (slower)");
803 RNA_def_property_update(prop, NC_SCENE, NULL);
805 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
806 RNA_def_property_int_sdna(prop, NULL, "ticrate");
807 RNA_def_property_ui_range(prop, 1, 60, 1, 1);
808 RNA_def_property_range(prop, 1, 250);
809 RNA_def_property_ui_text(prop, "Frames Per Second", "The nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate.");
810 RNA_def_property_update(prop, NC_SCENE, NULL);
812 prop= RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
813 RNA_def_property_int_sdna(prop, NULL, "maxlogicstep");
814 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
815 RNA_def_property_range(prop, 1, 5);
816 RNA_def_property_ui_text(prop, "Max Logic Steps", "Sets the maximum number of logic frame per game frame if graphics slows down the game, higher value allows better synchronization with physics");
817 RNA_def_property_update(prop, NC_SCENE, NULL);
819 prop= RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
820 RNA_def_property_int_sdna(prop, NULL, "maxphystep");
821 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
822 RNA_def_property_range(prop, 1, 5);
823 RNA_def_property_ui_text(prop, "Max Physics Steps", "Sets the maximum number of physics step per game frame if graphics slows down the game, higher value allows physics to keep up with realtime");
824 RNA_def_property_update(prop, NC_SCENE, NULL);
826 prop= RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
827 RNA_def_property_int_sdna(prop, NULL, "physubstep");
828 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
829 RNA_def_property_range(prop, 1, 5);
830 RNA_def_property_ui_text(prop, "Physics Sub Steps", "Sets the number of simulation substep per physic timestep, higher value give better physics precision");
831 RNA_def_property_update(prop, NC_SCENE, NULL);
834 prop= RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
835 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 5)); //XXX mode hardcoded // WO_DBVT_CULLING
836 RNA_def_property_ui_text(prop, "DBVT culling", "Use optimized Bullet DBVT tree for view frustrum and occlusion culling");
837 RNA_def_property_update(prop, NC_SCENE, NULL);
839 // not used // deprecated !!!!!!!!!!!!!
840 prop= RNA_def_property(srna, "activity_culling", PROP_BOOLEAN, PROP_NONE);
841 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 3)); //XXX mode hardcoded
842 RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is enabled");
843 RNA_def_property_update(prop, NC_SCENE, NULL);
845 // not used // deprecated !!!!!!!!!!!!!
846 prop= RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
847 RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
848 RNA_def_property_range(prop, 0.0, 1000.0);
849 RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled");
850 RNA_def_property_update(prop, NC_SCENE, NULL);
853 static void rna_def_scene_render_layer(BlenderRNA *brna)
857 srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
858 RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
860 rna_def_render_layer_common(srna, 1);
863 static void rna_def_scene_render_data(BlenderRNA *brna)
868 static EnumPropertyItem pixel_filter_items[] ={
869 {R_FILTER_BOX, "BOX", 0, "Box", ""},
870 {R_FILTER_TENT, "TENT", 0, "Tent", ""},
871 {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", ""},
872 {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", ""},
873 {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", ""},
874 {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", ""},
875 {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", ""},
876 {0, NULL, 0, NULL, NULL}};
878 static EnumPropertyItem alpha_mode_items[] ={
879 {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
880 {R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
881 {R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
882 {0, NULL, 0, NULL, NULL}};
884 static EnumPropertyItem color_mode_items[] ={
885 {R_PLANESBW, "BW", 0, "BW", "Images are saved with BW (grayscale) data"},
886 {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
887 {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
888 {0, NULL, 0, NULL, NULL}};
890 static EnumPropertyItem display_mode_items[] ={
891 {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
892 {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
893 {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
894 {0, NULL, 0, NULL, NULL}};
896 static EnumPropertyItem octree_resolution_items[] = {
897 {64, "OCTREE_RES_64", 0, "64", ""},
898 {128, "OCTREE_RES_128", 0, "128", ""},
899 {256, "OCTREE_RES_256", 0, "256", ""},
900 {512, "OCTREE_RES_512", 0, "512", ""},
901 {0, NULL, 0, NULL, NULL}};
903 static EnumPropertyItem fixed_oversample_items[] = {
904 {5, "OVERSAMPLE_5", 0, "5", ""},
905 {8, "OVERSAMPLE_8", 0, "8", ""},
906 {11, "OVERSAMPLE_11", 0, "11", ""},
907 {16, "OVERSAMPLE_16", 0, "16", ""},
908 {0, NULL, 0, NULL, NULL}};
910 static EnumPropertyItem field_order_items[] = {
911 {0, "FIELDS_EVENFIRST", 0, "Even", "Even Fields First"},
912 {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Odd", "Odd Fields First"},
913 {0, NULL, 0, NULL, NULL}};
915 static EnumPropertyItem threads_mode_items[] = {
916 {0, "THREADS_AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
917 {R_FIXED_THREADS, "THREADS_FIXED", 0, "Fixed", "Manually determine the number of threads"},
918 {0, NULL, 0, NULL, NULL}};
920 static EnumPropertyItem stamp_font_size_items[] = {
921 {1, "STAMP_FONT_TINY", 0, "Tiny", ""},
922 {2, "STAMP_FONT_SMALL", 0, "Small", ""},
923 {3, "STAMP_FONT_MEDIUM", 0, "Medium", ""},
924 {0, "STAMP_FONT_LARGE", 0, "Large", ""},
925 {4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
926 {0, NULL, 0, NULL, NULL}};
929 static EnumPropertyItem image_type_items[] = {
930 {R_PNG, "PNG", 0, "PNG", ""},
931 {R_JPEG90, "JPEG", 0, "JPEG", ""},
933 {R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
935 {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
936 {R_BMP, "BMP", 0, "BMP", ""},
937 {R_TARGA, "TARGA", 0, "Targa", ""},
938 {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
939 //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
940 {R_HAMX, "HAMX", 0, "HamX", ""},
941 {R_IRIS, "IRIS", 0, "Iris", ""},
942 {0, "", 0, NULL, NULL},
944 {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
945 {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
947 {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
948 {R_CINEON, "CINEON", 0, "Cineon", ""},
949 {R_DPX, "DPX", 0, "DPX", ""},
950 {0, "", 0, NULL, NULL},
951 {R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
952 {R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
954 {R_AVICODEC, "AVICODEC", 0, "AVI Codec", ""},
956 #ifdef WITH_QUICKTIME
957 {R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""},
960 {R_MOVIE, "MOVIE", 0, "Movie", ""},
963 {R_H264, "H264", 0, "H.264", ""},
964 {R_XVID, "XVID", 0, "Xvid", ""},
968 {R_THEORA, "THEORA", 0, "Ogg Theora", ""},
971 {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
973 {0, "", 0, NULL, NULL},
974 {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
975 {0, NULL, 0, NULL, NULL}};
978 static EnumPropertyItem exr_codec_items[] = {
979 {0, "NONE", 0, "None", ""},
980 {1, "PXR24", 0, "Pxr24 (lossy)", ""},
981 {2, "ZIP", 0, "ZIP (lossless)", ""},
982 {3, "PIZ", 0, "PIZ (lossless)", ""},
983 {4, "RLE", 0, "RLE (lossless)", ""},
984 {0, NULL, 0, NULL, NULL}};
988 static EnumPropertyItem jp2_preset_items[] = {
989 {0, "NO_PRESET", 0, "No Preset", ""},
990 {1, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 2048x1080", ""},
991 {2, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
992 {3, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 4096x2160", ""},
993 {4, "R_JPEG2K_CINE_PRESET", 0, "Cine-Scope 24fps 2048x858", ""},
994 {5, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
995 {6, "R_JPEG2K_CINE_PRESET", 0, "Cine-Flat 24fps 1998x1080", ""},
996 {7, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
997 {0, NULL, 0, NULL, NULL}};
999 static EnumPropertyItem jp2_depth_items[] = {
1000 {0, "8", 0, "8", ""},
1001 {R_JPEG2K_12BIT, "16", 0, "16", ""},
1002 {R_JPEG2K_16BIT, "32", 0, "32", ""},
1003 {0, NULL, 0, NULL, NULL}};
1007 static EnumPropertyItem ffmpeg_format_items[] = {
1008 {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
1009 {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
1010 {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
1011 {FFMPEG_AVI, "AVI", 0, "AVI", ""},
1012 {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
1013 {FFMPEG_DV, "DV", 0, "DV", ""},
1014 {FFMPEG_H264, "H264", 0, "H.264", ""},
1015 {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
1019 {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
1022 {FFMPEG_FLV, "FLASH", 0, "Flash", ""},
1023 {0, NULL, 0, NULL, NULL}};
1025 static EnumPropertyItem ffmpeg_codec_items[] = {
1026 {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
1027 {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
1028 {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
1029 {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
1030 {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
1031 {CODEC_ID_H264, "H264", 0, "H.264", ""},
1032 {CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
1034 {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
1036 {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
1037 {0, NULL, 0, NULL, NULL}};
1039 static EnumPropertyItem ffmpeg_audio_codec_items[] = {
1040 {CODEC_ID_MP2, "MP2", 0, "MP2", ""},
1041 {CODEC_ID_MP3, "MP3", 0, "MP3", ""},
1042 {CODEC_ID_AC3, "AC3", 0, "AC3", ""},
1043 {CODEC_ID_AAC, "AAC", 0, "AAC", ""},
1044 {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
1045 {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
1046 {0, NULL, 0, NULL, NULL}};
1049 static EnumPropertyItem engine_items[] = {
1050 {0, "BLENDER", 0, "Blender", ""},
1051 {0, NULL, 0, NULL, NULL}};
1053 srna= RNA_def_struct(brna, "SceneRenderData", NULL);
1054 RNA_def_struct_sdna(srna, "RenderData");
1055 RNA_def_struct_nested(brna, srna, "Scene");
1056 RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
1058 prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
1059 RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
1060 RNA_def_property_enum_items(prop, color_mode_items);
1061 RNA_def_property_ui_text(prop, "Color Mode", "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels");
1063 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
1064 RNA_def_property_int_sdna(prop, NULL, "xsch");
1065 RNA_def_property_range(prop, 4, 10000);
1066 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image.");
1067 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1069 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
1070 RNA_def_property_int_sdna(prop, NULL, "ysch");
1071 RNA_def_property_range(prop, 4, 10000);
1072 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image.");
1073 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1075 prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
1076 RNA_def_property_int_sdna(prop, NULL, "size");
1077 RNA_def_property_ui_range(prop, 1, 100, 10, 1);
1078 RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
1080 prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
1081 RNA_def_property_int_sdna(prop, NULL, "xparts");
1082 RNA_def_property_range(prop, 1, 512);
1083 RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering.");
1084 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1086 prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
1087 RNA_def_property_int_sdna(prop, NULL, "yparts");
1088 RNA_def_property_range(prop, 1, 512);
1089 RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering.");
1090 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1092 prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
1093 RNA_def_property_float_sdna(prop, NULL, "xasp");
1094 RNA_def_property_range(prop, 1.0f, 200.0f);
1095 RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
1096 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1098 prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
1099 RNA_def_property_float_sdna(prop, NULL, "yasp");
1100 RNA_def_property_range(prop, 1.0f, 200.0f);
1101 RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
1102 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1104 /* JPEG and AVI JPEG */
1106 prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
1107 RNA_def_property_int_sdna(prop, NULL, "quality");
1108 RNA_def_property_range(prop, 1, 100);
1109 RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
1110 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1114 prop= RNA_def_property(srna, "tiff_bit", PROP_BOOLEAN, PROP_NONE);
1115 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
1116 RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
1117 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1119 /* Cineon and DPX */
1121 prop= RNA_def_property(srna, "cineon_log", PROP_BOOLEAN, PROP_NONE);
1122 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
1123 RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
1124 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1126 prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
1127 RNA_def_property_int_sdna(prop, NULL, "cineonblack");
1128 RNA_def_property_range(prop, 0, 1024);
1129 RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
1130 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1132 prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
1133 RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
1134 RNA_def_property_range(prop, 0, 1024);
1135 RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
1136 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1138 prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
1139 RNA_def_property_float_sdna(prop, NULL, "cineongamma");
1140 RNA_def_property_range(prop, 0.0f, 10.0f);
1141 RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
1142 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1147 prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
1148 RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
1149 RNA_def_property_enum_items(prop, exr_codec_items);
1150 RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
1151 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1153 prop= RNA_def_property(srna, "exr_half", PROP_BOOLEAN, PROP_NONE);
1154 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
1155 RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel");
1156 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1158 prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE);
1159 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF);
1160 RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int zbuffer)");
1161 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1163 prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
1164 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
1165 RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
1166 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1169 #ifdef WITH_OPENJPEG
1172 prop= RNA_def_property(srna, "jpeg_preset", PROP_ENUM, PROP_NONE);
1173 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_preset");
1174 RNA_def_property_enum_items(prop, jp2_preset_items);
1175 RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
1176 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1178 prop= RNA_def_property(srna, "jpeg_depth", PROP_ENUM, PROP_NONE);
1179 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
1180 RNA_def_property_enum_items(prop, jp2_depth_items);
1181 RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
1182 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1184 prop= RNA_def_property(srna, "jpeg_ycc", PROP_BOOLEAN, PROP_NONE);
1185 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
1186 RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
1187 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1193 prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
1194 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
1195 RNA_def_property_enum_items(prop, ffmpeg_format_items);
1196 RNA_def_property_ui_text(prop, "Format", "Output file format");
1197 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1199 prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE);
1200 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec");
1201 RNA_def_property_enum_items(prop, ffmpeg_codec_items);
1202 RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
1203 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1205 prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
1206 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
1207 RNA_def_property_range(prop, 1, 14000);
1208 RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate(kb/s)");
1209 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1211 prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE);
1212 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate");
1213 RNA_def_property_range(prop, 0, 9000);
1214 RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate(kb/s)");
1215 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1217 prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE);
1218 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate");
1219 RNA_def_property_range(prop, 1, 14000);
1220 RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate(kb/s)");
1221 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1223 prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE);
1224 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate");
1225 RNA_def_property_range(prop, 0, 100000000);
1226 RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
1227 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1229 prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE);
1230 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size");
1231 RNA_def_property_range(prop, 0, 100);
1232 RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
1233 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1235 prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE);
1236 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size");
1237 RNA_def_property_range(prop, 0, 2000);
1238 RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
1239 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1241 prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE);
1242 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size");
1243 RNA_def_property_range(prop, 0, 16384);
1244 RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
1245 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1247 prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE);
1248 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT);
1249 RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary.");
1250 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1254 prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
1255 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
1256 RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
1257 RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
1258 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1260 prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
1261 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
1262 RNA_def_property_range(prop, 32, 384);
1263 RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)");
1264 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1266 prop= RNA_def_property(srna, "ffmpeg_multiplex_audio", PROP_BOOLEAN, PROP_NONE);
1267 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_MULTIPLEX_AUDIO);
1268 RNA_def_property_ui_text(prop, "Multiplex Audio", "Interleave audio with the output video");
1269 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1272 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
1273 RNA_def_property_int_sdna(prop, NULL, "frs_sec");
1274 RNA_def_property_range(prop, 1, 120);
1275 RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second.");
1276 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1278 prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
1279 RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
1280 RNA_def_property_range(prop, 0.1f, 120.0f);
1281 RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
1282 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1284 prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
1285 RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
1286 RNA_def_property_range(prop, 0.0f, 2.0f);
1287 RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding.");
1288 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1290 prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE);
1291 RNA_def_property_enum_sdna(prop, NULL, "filtertype");
1292 RNA_def_property_enum_items(prop, pixel_filter_items);
1293 RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples.");
1294 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1296 prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
1297 RNA_def_property_float_sdna(prop, NULL, "gauss");
1298 RNA_def_property_range(prop, 0.5f, 1.5f);
1299 RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples.");
1300 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1302 prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
1303 RNA_def_property_enum_sdna(prop, NULL, "alphamode");
1304 RNA_def_property_enum_items(prop, alpha_mode_items);
1305 RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels.");
1306 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1308 prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
1309 RNA_def_property_enum_sdna(prop, NULL, "ocres");
1310 RNA_def_property_enum_items(prop, octree_resolution_items);
1311 RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
1312 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1314 prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
1315 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
1316 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges.");
1317 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1319 prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
1320 RNA_def_property_enum_sdna(prop, NULL, "osa");
1321 RNA_def_property_enum_items(prop, fixed_oversample_items);
1322 RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel.");
1323 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1325 prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
1326 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
1327 RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output.");
1328 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1330 prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
1331 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1332 RNA_def_property_enum_items(prop, field_order_items);
1333 RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. Select which lines get rendered first, to create smooth motion for TV output");
1335 prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
1336 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
1337 RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
1338 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1340 prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
1341 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
1342 RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
1343 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1345 prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE);
1346 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
1347 RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering.");
1348 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1350 prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE);
1351 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
1352 RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering.");
1353 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1355 prop= RNA_def_property(srna, "render_sss", PROP_BOOLEAN, PROP_NONE);
1356 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
1357 RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering.");
1358 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1360 prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE);
1361 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
1362 RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects.");
1363 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1365 prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE);
1366 RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
1367 RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties.");
1368 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1370 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
1371 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
1372 RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
1373 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1375 prop= RNA_def_property(srna, "edge_intensity", PROP_INT, PROP_NONE);
1376 RNA_def_property_int_sdna(prop, NULL, "edgeint");
1377 RNA_def_property_range(prop, 0, 255);
1378 RNA_def_property_ui_text(prop, "Edge Intensity", "Threshold for drawing outlines on geometry edges");
1379 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1381 prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
1382 RNA_def_property_float_sdna(prop, NULL, "edgeR");
1383 RNA_def_property_array(prop, 3);
1384 RNA_def_property_ui_text(prop, "Edge Color", "");
1385 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1387 prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
1388 RNA_def_property_int_sdna(prop, NULL, "threads");
1389 RNA_def_property_range(prop, 1, 8);
1390 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
1391 RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
1392 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1394 prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
1395 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1396 RNA_def_property_enum_items(prop, threads_mode_items);
1397 RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
1399 prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
1400 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
1401 RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
1402 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1404 prop= RNA_def_property(srna, "border", PROP_BOOLEAN, PROP_NONE);
1405 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
1406 RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
1407 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1409 prop= RNA_def_property(srna, "crop_to_border", PROP_BOOLEAN, PROP_NONE);
1410 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
1411 RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
1412 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1414 prop= RNA_def_property(srna, "placeholders", PROP_BOOLEAN, PROP_NONE);
1415 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
1416 RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
1417 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1419 prop= RNA_def_property(srna, "no_overwrite", PROP_BOOLEAN, PROP_NONE);
1420 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
1421 RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering");
1422 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1424 prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
1425 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
1426 RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled.");
1427 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1429 prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
1430 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
1431 RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
1432 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1434 prop= RNA_def_property(srna, "color_management", PROP_BOOLEAN, PROP_NONE);
1435 RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
1436 RNA_def_property_ui_text(prop, "Color Management", "Use color profiles and gamma corrected imaging pipeline");
1437 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_MATERIAL|ND_SHADING, NULL);
1439 prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE);
1440 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
1441 RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
1442 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1444 prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
1445 RNA_def_property_enum_sdna(prop, NULL, "imtype");
1446 RNA_def_property_enum_items(prop, image_type_items);
1447 RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
1448 RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
1449 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1451 prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
1452 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1453 RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");
1454 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1456 prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
1457 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
1458 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
1459 RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample).");
1460 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1462 prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
1463 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
1464 RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing.");
1465 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1467 prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
1468 RNA_def_property_boolean_sdna(prop, NULL, "bufflag", R_BACKBUF);
1469 RNA_def_property_ui_text(prop, "Back Buffer", "Render backbuffer image");
1470 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1472 prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
1473 RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
1474 RNA_def_property_enum_items(prop, display_mode_items);
1475 RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
1477 prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
1478 RNA_def_property_string_sdna(prop, NULL, "pic");
1479 RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
1480 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1484 prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
1485 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
1486 RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
1487 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1489 prop= RNA_def_property(srna, "stamp_date", PROP_BOOLEAN, PROP_NONE);
1490 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
1491 RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
1492 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1494 prop= RNA_def_property(srna, "stamp_frame", PROP_BOOLEAN, PROP_NONE);
1495 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
1496 RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
1497 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1499 prop= RNA_def_property(srna, "stamp_camera", PROP_BOOLEAN, PROP_NONE);
1500 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
1501 RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
1502 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1504 prop= RNA_def_property(srna, "stamp_scene", PROP_BOOLEAN, PROP_NONE);
1505 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
1506 RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
1507 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1509 prop= RNA_def_property(srna, "stamp_note", PROP_BOOLEAN, PROP_NONE);
1510 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
1511 RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
1512 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1514 prop= RNA_def_property(srna, "stamp_marker", PROP_BOOLEAN, PROP_NONE);
1515 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
1516 RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
1517 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1519 prop= RNA_def_property(srna, "stamp_filename", PROP_BOOLEAN, PROP_NONE);
1520 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
1521 RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata");
1522 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1524 prop= RNA_def_property(srna, "stamp_sequence_strip", PROP_BOOLEAN, PROP_NONE);
1525 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
1526 RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
1527 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1529 prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
1530 RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
1531 RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
1532 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1534 prop= RNA_def_property(srna, "render_stamp", PROP_BOOLEAN, PROP_NONE);
1535 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
1536 RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
1537 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1539 prop= RNA_def_property(srna, "stamp_font_size", PROP_ENUM, PROP_NONE);
1540 RNA_def_property_enum_sdna(prop, NULL, "stamp_font_id");
1541 RNA_def_property_enum_items(prop, stamp_font_size_items);
1542 RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp text");
1543 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1545 prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
1546 RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
1547 RNA_def_property_array(prop, 4);
1548 RNA_def_property_range(prop,0.0,1.0);
1549 RNA_def_property_ui_text(prop, "Stamp Foreground", "Stamp text color");
1550 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1552 prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
1553 RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
1554 RNA_def_property_array(prop, 4);
1555 RNA_def_property_range(prop,0.0,1.0);
1556 RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text");
1557 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1561 prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
1562 RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
1563 RNA_def_property_struct_type(prop, "SceneRenderLayer");
1564 RNA_def_property_ui_text(prop, "Render Layers", "");
1566 prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
1567 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
1568 RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
1569 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1571 prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
1572 RNA_def_property_int_sdna(prop, NULL, "actlay");
1573 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
1574 RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
1575 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1578 prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
1579 RNA_def_property_enum_items(prop, engine_items);
1580 RNA_def_property_enum_funcs(prop, "rna_SceneRenderData_engine_get", "rna_SceneRenderData_engine_set", "rna_SceneRenderData_engine_itemf");
1581 RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering.");
1583 prop= RNA_def_property(srna, "multiple_engines", PROP_BOOLEAN, PROP_NONE);
1584 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_multiple_engines_get", NULL);
1585 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1586 RNA_def_property_ui_text(prop, "Multiple Engine", "More than one rendering engine is available.");
1589 void RNA_def_scene(BlenderRNA *brna)
1594 srna= RNA_def_struct(brna, "Scene", "ID");
1595 RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
1596 RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
1597 RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
1599 prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
1600 RNA_def_property_flag(prop, PROP_EDITABLE);
1601 RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene.");
1603 prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
1604 RNA_def_property_flag(prop, PROP_EDITABLE);
1605 RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
1607 prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_VECTOR);
1608 RNA_def_property_float_sdna(prop, NULL, "cursor");
1609 RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
1610 RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
1612 prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
1613 RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
1614 RNA_def_property_struct_type(prop, "Object");
1615 RNA_def_property_ui_text(prop, "Objects", "");
1616 RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
1618 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
1619 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
1620 RNA_def_property_array(prop, 20);
1621 RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
1622 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
1624 prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_NONE);
1625 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1626 RNA_def_property_int_sdna(prop, NULL, "r.cfra");
1627 RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
1628 RNA_def_property_ui_text(prop, "Current Frame", "");
1629 RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
1631 prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
1632 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1633 RNA_def_property_int_sdna(prop, NULL, "r.sfra");
1634 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
1635 RNA_def_property_ui_text(prop, "Start Frame", "");
1636 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1638 prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
1639 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1640 RNA_def_property_int_sdna(prop, NULL, "r.efra");
1641 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
1642 RNA_def_property_ui_text(prop, "End Frame", "");
1643 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1645 prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
1646 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1647 RNA_def_property_int_sdna(prop, NULL, "frame_step");
1648 RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
1649 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1651 prop= RNA_def_property(srna, "stamp_note", PROP_STRING, PROP_NONE);
1652 RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
1653 RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
1654 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1656 prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
1657 RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
1659 prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
1660 RNA_def_property_pointer_sdna(prop, NULL, "ed");
1661 RNA_def_property_struct_type(prop, "SequenceEditor");
1662 RNA_def_property_ui_text(prop, "Sequence Editor", "");
1664 prop= RNA_def_property(srna, "keyingsets", PROP_COLLECTION, PROP_NONE);
1665 RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
1666 RNA_def_property_struct_type(prop, "KeyingSet");
1667 RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene.");
1669 prop= RNA_def_property(srna, "active_keyingset", PROP_INT, PROP_NONE);
1670 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1671 RNA_def_property_ui_text(prop, "Active Keying Set", "Current Keying Set index.");
1673 prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
1674 RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
1675 RNA_def_property_struct_type(prop, "ToolSettings");
1676 RNA_def_property_ui_text(prop, "Tool Settings", "");
1678 prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE);
1679 RNA_def_property_pointer_sdna(prop, NULL, "r");
1680 RNA_def_property_struct_type(prop, "SceneRenderData");
1681 RNA_def_property_ui_text(prop, "Render Data", "");
1683 prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
1684 RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
1685 RNA_def_property_struct_type(prop, "TimelineMarker");
1686 RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
1689 prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NONE);
1690 RNA_def_property_pointer_sdna(prop, NULL, "gm");
1691 RNA_def_property_struct_type(prop, "SceneGameData");
1692 RNA_def_property_ui_text(prop, "Game Data", "");
1694 rna_def_tool_settings(brna);
1695 rna_def_scene_render_data(brna);
1696 rna_def_scene_game_data(brna);
1697 rna_def_scene_render_layer(brna);