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"
33 #include "DNA_userdef_types.h"
36 #include "BKE_writeffmpeg.h"
37 #include <libavcodec/avcodec.h>
38 #include <libavformat/avformat.h>
43 /* prop_mode needs to be accessible from transform operator */
44 EnumPropertyItem prop_mode_items[] ={
45 {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
46 {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
47 {PROP_ROOT, "ROOT", 0, "Root", ""},
48 {PROP_SHARP, "SHARP", 0, "Sharp", ""},
49 {PROP_LIN, "LINEAR", 0, "Linear", ""},
50 {PROP_CONST, "CONSTANT", 0, "Constant", ""},
51 {PROP_RANDOM, "RANDOM", 0, "Random", ""},
52 {0, NULL, 0, NULL, NULL}};
56 #include "DNA_anim_types.h"
57 #include "DNA_node_types.h"
59 #include "BKE_context.h"
60 #include "BKE_global.h"
63 #include "BLI_threads.h"
68 #include "RE_pipeline.h"
70 PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
72 ListBaseIterator *internal= iter->internal;
74 /* we are actually iterating a Base list, so override get */
75 return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
78 static int layer_set(int lay, const int *values)
82 /* ensure we always have some layer selected */
91 if(values[i]) lay |= (1<<i);
98 static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
100 Scene *scene= (Scene*)ptr->data;
102 scene->lay= layer_set(scene->lay, values);
105 static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
107 Scene *data= (Scene*)ptr->data;
108 CLAMP(value, 1, data->r.efra);
112 static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
114 Scene *data= (Scene*)ptr->data;
115 CLAMP(value, data->r.sfra, MAXFRAME);
119 static int rna_Scene_use_preview_range_get(PointerRNA *ptr)
121 Scene *data= (Scene*)ptr->data;
123 /* this is simply overloaded to assume that preview-range
124 * start frame cannot be less than 1 when on,
125 * so psfra=0 means 'off'
127 return (data->r.psfra != 0);
130 static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
132 Scene *data= (Scene*)ptr->data;
134 /* if enable, copy range from render-range, otherwise just clear */
136 data->r.psfra= data->r.sfra;
137 data->r.pefra= data->r.efra;
144 static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
146 Scene *data= (Scene*)ptr->data;
148 /* check if enabled already */
149 if (data->r.psfra == 0) {
150 /* set end of preview range to end frame, then clamp as per normal */
151 // TODO: or just refuse to set instead?
152 data->r.pefra= data->r.efra;
155 /* now set normally */
156 CLAMP(value, 1, data->r.pefra);
157 data->r.psfra= value;
160 static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
162 Scene *data= (Scene*)ptr->data;
164 /* check if enabled already */
165 if (data->r.psfra == 0) {
166 /* set start of preview range to start frame, then clamp as per normal */
167 // TODO: or just refuse to set instead?
168 data->r.psfra= data->r.sfra;
171 /* now set normally */
172 CLAMP(value, data->r.psfra, MAXFRAME);
173 data->r.pefra= value;
176 static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
178 //Scene *scene= ptr->id.data;
179 //ED_update_for_newframe(C);
182 static int rna_Scene_active_keying_set_editable(PointerRNA *ptr)
184 Scene *scene= (Scene *)ptr->data;
186 /* only editable if there are some Keying Sets to change to */
187 return (scene->keyingsets.first != NULL);
190 static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
192 Scene *scene= (Scene *)ptr->data;
193 return rna_pointer_inherit_refine(ptr, &RNA_KeyingSet, BLI_findlink(&scene->keyingsets, scene->active_keyingset-1));
196 static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
198 Scene *scene= (Scene *)ptr->data;
199 KeyingSet *ks= (KeyingSet*)value.data;
200 scene->active_keyingset= BLI_findindex(&scene->keyingsets, ks) + 1;
203 static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
205 Scene *scene= (Scene *)ptr->data;
206 return MAX2(scene->active_keyingset-1, 0);
209 static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
211 Scene *scene= (Scene *)ptr->data;
212 scene->active_keyingset= value+1;
215 static void rna_Scene_active_keying_set_index_range(PointerRNA *ptr, int *min, int *max)
217 Scene *scene= (Scene *)ptr->data;
220 *max= BLI_countlist(&scene->keyingsets)-1;
225 static char *rna_SceneRenderData_path(PointerRNA *ptr)
227 return BLI_sprintfN("render_data");
230 static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
232 RenderData *rd= (RenderData*)ptr->data;
234 if(rd->mode & R_FIXED_THREADS)
237 return BLI_system_thread_count();
240 static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
242 RenderData *rd= (RenderData*)ptr->data;
244 return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
247 static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
249 RenderData *rd= (RenderData*)ptr->data;
253 ffmpeg_verify_image_type(rd);
257 static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
259 RenderData *rd= (RenderData*)ptr->data;
263 static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
265 RenderData *rd= (RenderData*)ptr->data;
269 static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
271 RenderData *rd= (RenderData*)ptr->data;
274 *max= BLI_countlist(&rd->layers)-1;
278 static void rna_SceneRenderData_engine_set(PointerRNA *ptr, int value)
280 RenderData *rd= (RenderData*)ptr->data;
281 RenderEngineType *type= BLI_findlink(&R_engines, value);
284 BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
287 static EnumPropertyItem *rna_SceneRenderData_engine_itemf(bContext *C, PointerRNA *ptr, int *free)
289 RenderEngineType *type;
290 EnumPropertyItem *item= NULL;
291 EnumPropertyItem tmp = {0, "", 0, "", ""};
294 for(type=R_engines.first; type; type=type->next, a++) {
296 tmp.identifier= type->idname;
297 tmp.name= type->name;
298 RNA_enum_item_add(&item, &totitem, &tmp);
301 RNA_enum_item_end(&item, &totitem);
307 static int rna_SceneRenderData_engine_get(PointerRNA *ptr)
309 RenderData *rd= (RenderData*)ptr->data;
310 RenderEngineType *type;
313 for(type=R_engines.first; type; type=type->next, a++)
314 if(strcmp(type->idname, rd->engine) == 0)
320 static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
322 Scene *scene= (Scene*)ptr->id.data;
323 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
325 BLI_strncpy(rl->name, value, sizeof(rl->name));
327 if(scene->nodetree) {
329 int index= BLI_findindex(&scene->r.layers, rl);
331 for(node= scene->nodetree->nodes.first; node; node= node->next) {
332 if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
333 if(node->custom1==index)
334 BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
340 static int rna_SceneRenderData_multiple_engines_get(PointerRNA *ptr)
342 return (BLI_countlist(&R_engines) > 1);
345 static int rna_SceneRenderData_use_game_engine_get(PointerRNA *ptr)
347 RenderData *rd= (RenderData*)ptr->data;
348 RenderEngineType *type;
350 for(type=R_engines.first; type; type=type->next)
351 if(strcmp(type->idname, rd->engine) == 0)
352 return (type->flag & RE_GAME);
357 static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
359 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
360 rl->lay= layer_set(rl->lay, values);
363 static void rna_SceneRenderLayer_zmask_layer_set(PointerRNA *ptr, const int *values)
365 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
366 rl->lay_zmask= layer_set(rl->lay_zmask, values);
369 static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
371 Scene *scene= (Scene*)ptr->id.data;
374 ntreeCompositForceHidden(scene->nodetree, scene);
377 void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
379 Scene *scene= (Scene*)ptr->data;
381 scene->use_nodes= value;
382 if(scene->use_nodes && scene->nodetree==NULL)
383 ED_node_composit_default(scene);
388 static void rna_def_tool_settings(BlenderRNA *brna)
393 static EnumPropertyItem uv_select_mode_items[] = {
394 {UV_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
395 {UV_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
396 {UV_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
397 {UV_SELECT_ISLAND, "ISLAND", ICON_LINKEDSEL, "Island", "Island selection mode."},
398 {0, NULL, 0, NULL, NULL}};
400 static EnumPropertyItem mesh_select_mode_items[] = {
401 {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
402 {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
403 {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
404 {0, NULL, 0, NULL, NULL}};
406 static EnumPropertyItem snap_element_items[] = {
407 {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
408 {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
409 {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
410 {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
411 {0, NULL, 0, NULL, NULL}};
413 static EnumPropertyItem snap_mode_items[] = {
414 {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
415 {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
416 {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
417 {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
418 {0, NULL, 0, NULL, NULL}};
420 static EnumPropertyItem auto_key_items[] = {
421 {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
422 {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
423 {0, NULL, 0, NULL, NULL}};
425 srna= RNA_def_struct(brna, "ToolSettings", NULL);
426 RNA_def_struct_ui_text(srna, "Tool Settings", "");
428 prop= RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
429 RNA_def_property_struct_type(prop, "Sculpt");
430 RNA_def_property_ui_text(prop, "Sculpt", "");
432 prop= RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
433 RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
434 RNA_def_property_ui_text(prop, "Vertex Paint", "");
436 prop= RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE);
437 RNA_def_property_pointer_sdna(prop, NULL, "wpaint");
438 RNA_def_property_ui_text(prop, "Weight Paint", "");
440 prop= RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE);
441 RNA_def_property_pointer_sdna(prop, NULL, "imapaint");
442 RNA_def_property_ui_text(prop, "Image Paint", "");
444 prop= RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
445 RNA_def_property_pointer_sdna(prop, NULL, "particle");
446 RNA_def_property_ui_text(prop, "Particle Edit", "");
449 prop= RNA_def_property(srna, "proportional_editing", PROP_BOOLEAN, PROP_NONE);
450 RNA_def_property_boolean_sdna(prop, NULL, "proportional", 0);
451 RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
453 prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
454 RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
455 RNA_def_property_enum_items(prop, prop_mode_items);
456 RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
458 prop= RNA_def_property(srna, "automerge_editing", PROP_BOOLEAN, PROP_NONE);
459 RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
460 RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location.");
462 prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
463 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
464 RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
465 RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
467 prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
468 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
469 RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
470 RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
472 prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
473 RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
474 RNA_def_property_enum_items(prop, snap_element_items);
475 RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
477 prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
478 RNA_def_property_enum_sdna(prop, NULL, "snap_target");
479 RNA_def_property_enum_items(prop, snap_mode_items);
480 RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
482 prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
483 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
484 RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
485 RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
488 prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
489 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
490 RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
492 prop= RNA_def_property(srna, "autokey_mode", PROP_ENUM, PROP_NONE);
493 RNA_def_property_enum_sdna(prop, NULL, "autokey_mode");
494 RNA_def_property_enum_items(prop, auto_key_items);
495 RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
497 prop= RNA_def_property(srna, "record_with_nla", PROP_BOOLEAN, PROP_NONE);
498 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
499 RNA_def_property_ui_text(prop, "Layered", "Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking.");
502 prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
503 RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
504 RNA_def_property_enum_items(prop, uv_select_mode_items);
505 RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
507 prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
508 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
509 RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
510 RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
512 prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
513 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
514 RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
517 prop= RNA_def_property(srna, "mesh_selection_mode", PROP_ENUM, PROP_NONE);
518 RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
519 RNA_def_property_enum_items(prop, mesh_select_mode_items);
520 RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Mesh selection and display mode.");
522 prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_PERCENTAGE);
523 RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
524 RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
528 static void rna_def_unit_settings(BlenderRNA *brna)
533 static EnumPropertyItem unit_systems[] = {
534 {USER_UNIT_NONE, "NONE", 0, "None", ""},
535 {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
536 {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
537 {0, NULL, 0, NULL, NULL}};
539 srna= RNA_def_struct(brna, "UnitSettings", NULL);
540 RNA_def_struct_ui_text(srna, "Unit Settings", "");
543 prop= RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
544 RNA_def_property_enum_items(prop, unit_systems);
545 RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display.");
546 RNA_def_property_update(prop, NC_WINDOW, NULL);
548 prop= RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
549 RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions.");
550 RNA_def_property_range(prop, 0.00001, 100000.0);
551 RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
552 RNA_def_property_update(prop, NC_WINDOW, NULL);
554 prop= RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
555 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT);
556 RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs.");
557 RNA_def_property_update(prop, NC_WINDOW, NULL);
561 void rna_def_render_layer_common(StructRNA *srna, int scene)
565 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
566 if(scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
567 else RNA_def_property_string_sdna(prop, NULL, "name");
568 RNA_def_property_ui_text(prop, "Name", "Render layer name.");
569 RNA_def_struct_name_property(srna, prop);
570 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
571 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
573 prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
574 RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
575 RNA_def_property_struct_type(prop, "Material");
576 RNA_def_property_flag(prop, PROP_EDITABLE);
577 RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
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, "light_override", PROP_POINTER, PROP_NONE);
582 RNA_def_property_pointer_sdna(prop, NULL, "light_override");
583 RNA_def_property_struct_type(prop, "Group");
584 RNA_def_property_flag(prop, PROP_EDITABLE);
585 RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
586 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
587 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
590 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
591 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
592 RNA_def_property_array(prop, 20);
593 RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
594 if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
595 else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
596 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
597 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
599 prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_NONE);
600 RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
601 RNA_def_property_array(prop, 20);
602 RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
603 if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set");
604 else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_zmask_layer_set");
605 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
606 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
609 prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
610 RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
611 RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
612 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
613 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
615 prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE);
616 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
617 RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
618 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
619 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
621 prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE);
622 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
623 RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
624 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
625 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
627 prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE);
628 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
629 RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
630 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
631 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
633 prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE);
634 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
635 RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
636 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
637 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
639 prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
640 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
641 RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
642 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
643 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
645 prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE);
646 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
647 RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
648 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
649 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
651 prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
652 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
653 RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
654 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
655 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
657 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
658 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
659 RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
660 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
661 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
663 prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE);
664 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
665 RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
666 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
667 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
670 prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
671 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
672 RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
673 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
674 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
676 prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE);
677 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
678 RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
679 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
680 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
682 prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE);
683 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
684 RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
685 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
686 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
688 prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
689 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
690 RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
691 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
692 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
694 prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
695 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
696 RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
697 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
698 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
700 prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
701 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
702 RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
703 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
704 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
706 prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
707 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
708 RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
709 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
710 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
712 prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
713 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
714 RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
715 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
716 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
718 prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
719 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
720 RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
721 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
722 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
724 prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
725 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
726 RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
727 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
728 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
730 prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
731 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
732 RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
733 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
734 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
736 prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
737 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
738 RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
739 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
740 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
742 prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
743 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
744 RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass.");
745 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
746 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
748 prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
749 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
750 RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass.");
751 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
752 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
754 prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
755 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
756 RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
757 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
758 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
760 prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
761 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
762 RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
763 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
764 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
766 prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
767 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
768 RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
769 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
770 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
772 prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
773 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
774 RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined.");
775 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
776 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
778 prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
779 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
780 RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined.");
781 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
782 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
785 void rna_def_scene_game_data(BlenderRNA *brna)
790 static EnumPropertyItem framing_types_items[] ={
791 {SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", "Show the entire viewport in the display window, using bar horizontally or vertically"},
792 {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", "Show the entire viewport in the display window, viewing more horizontally or vertically"},
793 {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
794 {0, NULL, 0, NULL, NULL}};
796 static EnumPropertyItem dome_modes_items[] ={
797 {DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
798 {DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""},
799 {DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
800 {DOME_ENVMAP, "ENVMAP", 0, "Cube Map", ""},
801 {DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""},
802 {0, NULL, 0, NULL, NULL}};
804 static EnumPropertyItem stereo_modes_items[] ={
805 // {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
806 {STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
807 {STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
808 {STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
809 {STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""},
810 {STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""},
811 {STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
812 // {STEREO_DOME, "DOME", 0, "Dome", ""},
813 {0, NULL, 0, NULL, NULL}};
815 static EnumPropertyItem stereo_items[] ={
816 {STEREO_NOSTEREO, "NONE", 0, "None", ""},
817 {STEREO_ENABLED, "STEREO", 0, "Stereo", ""},
818 {STEREO_DOME, "DOME", 0, "Dome", ""},
819 {0, NULL, 0, NULL, NULL}};
821 static EnumPropertyItem physics_engine_items[] = {
822 {WOPHY_NONE, "NONE", 0, "None", ""},
823 //{WOPHY_ENJI, "ENJI", 0, "Enji", ""},
824 //{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""},
825 //{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""},
826 //{WOPHY_ODE, "ODE", 0, "ODE", ""},
827 {WOPHY_BULLET, "BULLET", 0, "Bullet", ""},
828 {0, NULL, 0, NULL, NULL}};
830 static EnumPropertyItem material_items[] ={
831 {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials."},
832 {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials."},
833 {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders."},
834 {0, NULL, 0, NULL, NULL}};
836 srna= RNA_def_struct(brna, "SceneGameData", NULL);
837 RNA_def_struct_sdna(srna, "GameData");
838 RNA_def_struct_nested(brna, srna, "Scene");
839 RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablock.");
841 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
842 RNA_def_property_int_sdna(prop, NULL, "xplay");
843 RNA_def_property_range(prop, 4, 10000);
844 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen.");
845 RNA_def_property_update(prop, NC_SCENE, NULL);
847 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
848 RNA_def_property_int_sdna(prop, NULL, "yplay");
849 RNA_def_property_range(prop, 4, 10000);
850 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen.");
851 RNA_def_property_update(prop, NC_SCENE, NULL);
853 prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
854 RNA_def_property_int_sdna(prop, NULL, "depth");
855 RNA_def_property_range(prop, 8, 32);
856 RNA_def_property_ui_text(prop, "Bits", "Displays bit depth of full screen display.");
857 RNA_def_property_update(prop, NC_SCENE, NULL);
859 // Do we need it here ? (since we already have it in World
860 prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
861 RNA_def_property_int_sdna(prop, NULL, "freqplay");
862 RNA_def_property_range(prop, 4, 2000);
863 RNA_def_property_ui_text(prop, "Freq", "Displays clock frequency of fullscreen display.");
864 RNA_def_property_update(prop, NC_SCENE, NULL);
866 prop= RNA_def_property(srna, "fullscreen", PROP_BOOLEAN, PROP_NONE);
867 RNA_def_property_boolean_sdna(prop, NULL, "fullscreen", 1.0);
868 RNA_def_property_ui_text(prop, "Fullscreen", "Starts player in a new fullscreen display");
869 RNA_def_property_update(prop, NC_SCENE, NULL);
872 prop= RNA_def_property(srna, "framing_type", PROP_ENUM, PROP_NONE);
873 RNA_def_property_enum_sdna(prop, NULL, "framing.type");
874 RNA_def_property_enum_items(prop, framing_types_items);
875 RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want.");
876 RNA_def_property_update(prop, NC_SCENE, NULL);
878 prop= RNA_def_property(srna, "framing_color", PROP_FLOAT, PROP_COLOR);
879 RNA_def_property_float_sdna(prop, NULL, "framing.col");
880 RNA_def_property_array(prop, 3);
881 RNA_def_property_ui_text(prop, "", "");
882 RNA_def_property_update(prop, NC_SCENE, NULL);
885 prop= RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE);
886 RNA_def_property_enum_sdna(prop, NULL, "stereoflag");
887 RNA_def_property_enum_items(prop, stereo_items);
888 RNA_def_property_ui_text(prop, "Stereo Options", "");
889 RNA_def_property_update(prop, NC_SCENE, NULL);
891 prop= RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
892 RNA_def_property_enum_sdna(prop, NULL, "stereomode");
893 RNA_def_property_enum_items(prop, stereo_modes_items);
894 RNA_def_property_ui_text(prop, "Stereo Mode", "");
895 RNA_def_property_update(prop, NC_SCENE, NULL);
898 prop= RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
899 RNA_def_property_enum_sdna(prop, NULL, "dome.mode");
900 RNA_def_property_enum_items(prop, dome_modes_items);
901 RNA_def_property_ui_text(prop, "Dome Mode", "");
902 RNA_def_property_update(prop, NC_SCENE, NULL);
904 prop= RNA_def_property(srna, "dome_tesselation", PROP_INT, PROP_NONE);
905 RNA_def_property_int_sdna(prop, NULL, "dome.res");
906 RNA_def_property_ui_range(prop, 1, 8, 1, 1);
907 RNA_def_property_ui_text(prop, "Tesselation", "Tesselation level - check the generated mesh in wireframe mode");
908 RNA_def_property_update(prop, NC_SCENE, NULL);
910 prop= RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP_NONE);
911 RNA_def_property_float_sdna(prop, NULL, "dome.resbuf");
912 RNA_def_property_ui_range(prop, 0.1, 1.0, 0.1, 0.1);
913 RNA_def_property_ui_text(prop, "Buffer Resolution", "Buffer Resolution - decrease it to increase speed");
914 RNA_def_property_update(prop, NC_SCENE, NULL);
916 prop= RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE);
917 RNA_def_property_int_sdna(prop, NULL, "dome.angle");
918 RNA_def_property_ui_range(prop, 90, 250, 1, 1);
919 RNA_def_property_ui_text(prop, "Angle", "Field of View of the Dome - it only works in mode Fisheye and Truncated");
920 RNA_def_property_update(prop, NC_SCENE, NULL);
922 prop= RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE);
923 RNA_def_property_int_sdna(prop, NULL, "dome.tilt");
924 RNA_def_property_ui_range(prop, -180, 180, 1, 1);
925 RNA_def_property_ui_text(prop, "Tilt", "Camera rotation in horizontal axis");
926 RNA_def_property_update(prop, NC_SCENE, NULL);
928 prop= RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE);
929 RNA_def_property_pointer_sdna(prop, NULL, "dome.warptext");
930 RNA_def_property_struct_type(prop, "Text");
931 RNA_def_property_flag(prop, PROP_EDITABLE);
932 RNA_def_property_ui_text(prop, "Warp Data", "Custom Warp Mesh data file");
933 RNA_def_property_update(prop, NC_SCENE, NULL);
936 prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
937 RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
938 RNA_def_property_enum_items(prop, physics_engine_items);
939 RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
940 RNA_def_property_update(prop, NC_SCENE, NULL);
942 prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
943 RNA_def_property_float_sdna(prop, NULL, "gravity");
944 RNA_def_property_range(prop, 0.0, 25.0);
945 RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
946 RNA_def_property_update(prop, NC_SCENE, NULL);
948 prop= RNA_def_property(srna, "occlusion_culling_resolution", PROP_FLOAT, PROP_NONE);
949 RNA_def_property_float_sdna(prop, NULL, "occlusionRes");
950 RNA_def_property_range(prop, 128.0, 1024.0);
951 RNA_def_property_ui_text(prop, "Occlusion Resolution", "The size of the occlusion buffer in pixel, use higher value for better precsion (slower)");
952 RNA_def_property_update(prop, NC_SCENE, NULL);
954 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
955 RNA_def_property_int_sdna(prop, NULL, "ticrate");
956 RNA_def_property_ui_range(prop, 1, 60, 1, 1);
957 RNA_def_property_range(prop, 1, 250);
958 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.");
959 RNA_def_property_update(prop, NC_SCENE, NULL);
961 prop= RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
962 RNA_def_property_int_sdna(prop, NULL, "maxlogicstep");
963 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
964 RNA_def_property_range(prop, 1, 5);
965 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");
966 RNA_def_property_update(prop, NC_SCENE, NULL);
968 prop= RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
969 RNA_def_property_int_sdna(prop, NULL, "maxphystep");
970 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
971 RNA_def_property_range(prop, 1, 5);
972 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");
973 RNA_def_property_update(prop, NC_SCENE, NULL);
975 prop= RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
976 RNA_def_property_int_sdna(prop, NULL, "physubstep");
977 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
978 RNA_def_property_range(prop, 1, 5);
979 RNA_def_property_ui_text(prop, "Physics Sub Steps", "Sets the number of simulation substep per physic timestep, higher value give better physics precision");
980 RNA_def_property_update(prop, NC_SCENE, NULL);
983 prop= RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
984 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 5)); //XXX mode hardcoded // WO_DBVT_CULLING
985 RNA_def_property_ui_text(prop, "DBVT culling", "Use optimized Bullet DBVT tree for view frustrum and occlusion culling");
986 RNA_def_property_update(prop, NC_SCENE, NULL);
988 // not used // deprecated !!!!!!!!!!!!!
989 prop= RNA_def_property(srna, "activity_culling", PROP_BOOLEAN, PROP_NONE);
990 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 3)); //XXX mode hardcoded
991 RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is enabled");
992 RNA_def_property_update(prop, NC_SCENE, NULL);
994 // not used // deprecated !!!!!!!!!!!!!
995 prop= RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
996 RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
997 RNA_def_property_range(prop, 0.0, 1000.0);
998 RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled");
999 RNA_def_property_update(prop, NC_SCENE, NULL);
1002 prop= RNA_def_property(srna, "all_frames", PROP_BOOLEAN, PROP_NONE);
1003 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
1004 RNA_def_property_ui_text(prop, "All Frames", "Render as many frames as possible, rather than respecting framerate.");
1005 RNA_def_property_update(prop, NC_SCENE, NULL);
1007 prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
1008 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS);
1009 RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs.");
1010 RNA_def_property_update(prop, NC_SCENE, NULL);
1012 prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
1013 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
1014 RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs.");
1015 RNA_def_property_update(prop, NC_SCENE, NULL);
1017 prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
1018 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
1019 RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions.");
1020 RNA_def_property_update(prop, NC_SCENE, NULL);
1022 prop= RNA_def_property(srna, "display_lists", PROP_BOOLEAN, PROP_NONE);
1023 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS);
1024 RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU.");
1025 RNA_def_property_update(prop, NC_SCENE, NULL);
1027 prop= RNA_def_property(srna, "deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
1028 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS);
1029 RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API.");
1030 RNA_def_property_update(prop, NC_SCENE, NULL);
1033 prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
1034 RNA_def_property_enum_sdna(prop, NULL, "matmode");
1035 RNA_def_property_enum_items(prop, material_items);
1036 RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering.");
1037 RNA_def_property_update(prop, NC_SCENE, NULL);
1039 prop= RNA_def_property(srna, "glsl_lights", PROP_BOOLEAN, PROP_NONE);
1040 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
1041 RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering.");
1042 RNA_def_property_update(prop, NC_SCENE, NULL);
1044 prop= RNA_def_property(srna, "glsl_shaders", PROP_BOOLEAN, PROP_NONE);
1045 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
1046 RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering.");
1047 RNA_def_property_update(prop, NC_SCENE, NULL);
1049 prop= RNA_def_property(srna, "glsl_shadows", PROP_BOOLEAN, PROP_NONE);
1050 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
1051 RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering.");
1052 RNA_def_property_update(prop, NC_SCENE, NULL);
1054 prop= RNA_def_property(srna, "glsl_ramps", PROP_BOOLEAN, PROP_NONE);
1055 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
1056 RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering.");
1057 RNA_def_property_update(prop, NC_SCENE, NULL);
1059 prop= RNA_def_property(srna, "glsl_nodes", PROP_BOOLEAN, PROP_NONE);
1060 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
1061 RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering.");
1062 RNA_def_property_update(prop, NC_SCENE, NULL);
1064 prop= RNA_def_property(srna, "glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
1065 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
1066 RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering.");
1067 RNA_def_property_update(prop, NC_SCENE, NULL);
1070 static void rna_def_scene_render_layer(BlenderRNA *brna)
1074 srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
1075 RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
1077 rna_def_render_layer_common(srna, 1);
1080 static void rna_def_scene_render_data(BlenderRNA *brna)
1085 static EnumPropertyItem pixel_filter_items[] ={
1086 {R_FILTER_BOX, "BOX", 0, "Box", ""},
1087 {R_FILTER_TENT, "TENT", 0, "Tent", ""},
1088 {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", ""},
1089 {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", ""},
1090 {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", ""},
1091 {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", ""},
1092 {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", ""},
1093 {0, NULL, 0, NULL, NULL}};
1095 static EnumPropertyItem alpha_mode_items[] ={
1096 {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
1097 {R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
1098 {R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
1099 {0, NULL, 0, NULL, NULL}};
1101 static EnumPropertyItem color_mode_items[] ={
1102 {R_PLANESBW, "BW", 0, "BW", "Images are saved with BW (grayscale) data"},
1103 {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
1104 {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
1105 {0, NULL, 0, NULL, NULL}};
1107 static EnumPropertyItem display_mode_items[] ={
1108 {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
1109 {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
1110 {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
1111 {0, NULL, 0, NULL, NULL}};
1113 static EnumPropertyItem octree_resolution_items[] = {
1114 {64, "OCTREE_RES_64", 0, "64", ""},
1115 {128, "OCTREE_RES_128", 0, "128", ""},
1116 {256, "OCTREE_RES_256", 0, "256", ""},
1117 {512, "OCTREE_RES_512", 0, "512", ""},
1118 {0, NULL, 0, NULL, NULL}};
1120 static EnumPropertyItem fixed_oversample_items[] = {
1121 {5, "OVERSAMPLE_5", 0, "5", ""},
1122 {8, "OVERSAMPLE_8", 0, "8", ""},
1123 {11, "OVERSAMPLE_11", 0, "11", ""},
1124 {16, "OVERSAMPLE_16", 0, "16", ""},
1125 {0, NULL, 0, NULL, NULL}};
1127 static EnumPropertyItem field_order_items[] = {
1128 {0, "FIELDS_EVENFIRST", 0, "Even", "Even Fields First"},
1129 {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Odd", "Odd Fields First"},
1130 {0, NULL, 0, NULL, NULL}};
1132 static EnumPropertyItem threads_mode_items[] = {
1133 {0, "THREADS_AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
1134 {R_FIXED_THREADS, "THREADS_FIXED", 0, "Fixed", "Manually determine the number of threads"},
1135 {0, NULL, 0, NULL, NULL}};
1137 static EnumPropertyItem stamp_font_size_items[] = {
1138 {1, "STAMP_FONT_TINY", 0, "Tiny", ""},
1139 {2, "STAMP_FONT_SMALL", 0, "Small", ""},
1140 {3, "STAMP_FONT_MEDIUM", 0, "Medium", ""},
1141 {0, "STAMP_FONT_LARGE", 0, "Large", ""},
1142 {4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
1143 {0, NULL, 0, NULL, NULL}};
1146 static EnumPropertyItem image_type_items[] = {
1147 {0, "", 0, "Image", NULL},
1148 {R_PNG, "PNG", 0, "PNG", ""},
1149 {R_JPEG90, "JPEG", 0, "JPEG", ""},
1150 #ifdef WITH_OPENJPEG
1151 {R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
1153 {R_BMP, "BMP", 0, "BMP", ""},
1154 {R_TARGA, "TARGA", 0, "Targa", ""},
1155 {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
1156 //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
1157 {R_HAMX, "HAMX", 0, "HamX", ""},
1158 {R_IRIS, "IRIS", 0, "Iris", ""},
1159 {0, "", 0, " ", NULL},
1161 {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
1162 {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
1164 {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
1165 {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
1166 {R_CINEON, "CINEON", 0, "Cineon", ""},
1167 {R_DPX, "DPX", 0, "DPX", ""},
1168 {0, "", 0, "Movie", NULL},
1169 {R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
1170 {R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
1172 {R_AVICODEC, "AVICODEC", 0, "AVI Codec", ""},
1174 #ifdef WITH_QUICKTIME
1175 {R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""},
1178 {R_MOVIE, "MOVIE", 0, "Movie", ""},
1181 {R_H264, "H264", 0, "H.264", ""},
1182 {R_XVID, "XVID", 0, "Xvid", ""},
1186 {R_THEORA, "THEORA", 0, "Ogg Theora", ""},
1189 {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
1191 {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
1192 {0, NULL, 0, NULL, NULL}};
1195 static EnumPropertyItem exr_codec_items[] = {
1196 {0, "NONE", 0, "None", ""},
1197 {1, "PXR24", 0, "Pxr24 (lossy)", ""},
1198 {2, "ZIP", 0, "ZIP (lossless)", ""},
1199 {3, "PIZ", 0, "PIZ (lossless)", ""},
1200 {4, "RLE", 0, "RLE (lossless)", ""},
1201 {0, NULL, 0, NULL, NULL}};
1204 #ifdef WITH_OPENJPEG
1205 static EnumPropertyItem jp2_preset_items[] = {
1206 {0, "NO_PRESET", 0, "No Preset", ""},
1207 {1, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 2048x1080", ""},
1208 {2, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
1209 {3, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 4096x2160", ""},
1210 {4, "R_JPEG2K_CINE_PRESET", 0, "Cine-Scope 24fps 2048x858", ""},
1211 {5, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
1212 {6, "R_JPEG2K_CINE_PRESET", 0, "Cine-Flat 24fps 1998x1080", ""},
1213 {7, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
1214 {0, NULL, 0, NULL, NULL}};
1216 static EnumPropertyItem jp2_depth_items[] = {
1217 {0, "8", 0, "8", ""},
1218 {R_JPEG2K_12BIT, "16", 0, "16", ""},
1219 {R_JPEG2K_16BIT, "32", 0, "32", ""},
1220 {0, NULL, 0, NULL, NULL}};
1224 static EnumPropertyItem ffmpeg_format_items[] = {
1225 {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
1226 {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
1227 {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
1228 {FFMPEG_AVI, "AVI", 0, "AVI", ""},
1229 {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
1230 {FFMPEG_DV, "DV", 0, "DV", ""},
1231 {FFMPEG_H264, "H264", 0, "H.264", ""},
1232 {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
1236 {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
1239 {FFMPEG_FLV, "FLASH", 0, "Flash", ""},
1240 {0, NULL, 0, NULL, NULL}};
1242 static EnumPropertyItem ffmpeg_codec_items[] = {
1243 {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
1244 {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
1245 {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
1246 {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
1247 {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
1248 {CODEC_ID_H264, "H264", 0, "H.264", ""},
1249 {CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
1251 {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
1253 {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
1254 {0, NULL, 0, NULL, NULL}};
1256 static EnumPropertyItem ffmpeg_audio_codec_items[] = {
1257 {CODEC_ID_MP2, "MP2", 0, "MP2", ""},
1258 {CODEC_ID_MP3, "MP3", 0, "MP3", ""},
1259 {CODEC_ID_AC3, "AC3", 0, "AC3", ""},
1260 {CODEC_ID_AAC, "AAC", 0, "AAC", ""},
1261 {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
1262 {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
1263 {0, NULL, 0, NULL, NULL}};
1266 static EnumPropertyItem engine_items[] = {
1267 {0, "BLENDER_RENDER", 0, "Blender Render", ""},
1268 {0, NULL, 0, NULL, NULL}};
1270 srna= RNA_def_struct(brna, "SceneRenderData", NULL);
1271 RNA_def_struct_sdna(srna, "RenderData");
1272 RNA_def_struct_nested(brna, srna, "Scene");
1273 RNA_def_struct_path_func(srna, "rna_SceneRenderData_path");
1274 RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
1276 prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
1277 RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
1278 RNA_def_property_enum_items(prop, color_mode_items);
1279 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");
1281 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
1282 RNA_def_property_int_sdna(prop, NULL, "xsch");
1283 RNA_def_property_range(prop, 4, 10000);
1284 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image.");
1285 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1287 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
1288 RNA_def_property_int_sdna(prop, NULL, "ysch");
1289 RNA_def_property_range(prop, 4, 10000);
1290 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image.");
1291 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1293 prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
1294 RNA_def_property_int_sdna(prop, NULL, "size");
1295 RNA_def_property_ui_range(prop, 1, 100, 10, 1);
1296 RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
1298 prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
1299 RNA_def_property_int_sdna(prop, NULL, "xparts");
1300 RNA_def_property_range(prop, 1, 512);
1301 RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering.");
1302 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1304 prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
1305 RNA_def_property_int_sdna(prop, NULL, "yparts");
1306 RNA_def_property_range(prop, 1, 512);
1307 RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering.");
1308 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1310 prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
1311 RNA_def_property_float_sdna(prop, NULL, "xasp");
1312 RNA_def_property_range(prop, 1.0f, 200.0f);
1313 RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
1314 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1316 prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
1317 RNA_def_property_float_sdna(prop, NULL, "yasp");
1318 RNA_def_property_range(prop, 1.0f, 200.0f);
1319 RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
1320 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
1322 /* JPEG and AVI JPEG */
1324 prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
1325 RNA_def_property_int_sdna(prop, NULL, "quality");
1326 RNA_def_property_range(prop, 1, 100);
1327 RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
1328 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1332 prop= RNA_def_property(srna, "tiff_bit", PROP_BOOLEAN, PROP_NONE);
1333 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
1334 RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
1335 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1337 /* Cineon and DPX */
1339 prop= RNA_def_property(srna, "cineon_log", PROP_BOOLEAN, PROP_NONE);
1340 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
1341 RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
1342 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1344 prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
1345 RNA_def_property_int_sdna(prop, NULL, "cineonblack");
1346 RNA_def_property_range(prop, 0, 1024);
1347 RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
1348 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1350 prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
1351 RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
1352 RNA_def_property_range(prop, 0, 1024);
1353 RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
1354 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1356 prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
1357 RNA_def_property_float_sdna(prop, NULL, "cineongamma");
1358 RNA_def_property_range(prop, 0.0f, 10.0f);
1359 RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
1360 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1365 prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
1366 RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
1367 RNA_def_property_enum_items(prop, exr_codec_items);
1368 RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
1369 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1371 prop= RNA_def_property(srna, "exr_half", PROP_BOOLEAN, PROP_NONE);
1372 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
1373 RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel");
1374 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1376 prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE);
1377 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF);
1378 RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int zbuffer)");
1379 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1381 prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
1382 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
1383 RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
1384 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1387 #ifdef WITH_OPENJPEG
1390 prop= RNA_def_property(srna, "jpeg_preset", PROP_ENUM, PROP_NONE);
1391 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_preset");
1392 RNA_def_property_enum_items(prop, jp2_preset_items);
1393 RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
1394 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1396 prop= RNA_def_property(srna, "jpeg_depth", PROP_ENUM, PROP_NONE);
1397 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
1398 RNA_def_property_enum_items(prop, jp2_depth_items);
1399 RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
1400 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1402 prop= RNA_def_property(srna, "jpeg_ycc", PROP_BOOLEAN, PROP_NONE);
1403 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
1404 RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
1405 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1411 prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
1412 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
1413 RNA_def_property_enum_items(prop, ffmpeg_format_items);
1414 RNA_def_property_ui_text(prop, "Format", "Output file format");
1415 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1417 prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE);
1418 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec");
1419 RNA_def_property_enum_items(prop, ffmpeg_codec_items);
1420 RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
1421 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1423 prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
1424 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
1425 RNA_def_property_range(prop, 1, 14000);
1426 RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate(kb/s)");
1427 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1429 prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE);
1430 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate");
1431 RNA_def_property_range(prop, 0, 9000);
1432 RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate(kb/s)");
1433 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1435 prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE);
1436 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate");
1437 RNA_def_property_range(prop, 1, 14000);
1438 RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate(kb/s)");
1439 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1441 prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE);
1442 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate");
1443 RNA_def_property_range(prop, 0, 100000000);
1444 RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
1445 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1447 prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE);
1448 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size");
1449 RNA_def_property_range(prop, 0, 100);
1450 RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
1451 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1453 prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE);
1454 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size");
1455 RNA_def_property_range(prop, 0, 2000);
1456 RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
1457 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1459 prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE);
1460 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size");
1461 RNA_def_property_range(prop, 0, 16384);
1462 RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
1463 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1465 prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE);
1466 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT);
1467 RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary.");
1468 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1472 prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
1473 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
1474 RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
1475 RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
1476 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1478 prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
1479 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
1480 RNA_def_property_range(prop, 32, 384);
1481 RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)");
1482 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1484 prop= RNA_def_property(srna, "ffmpeg_multiplex_audio", PROP_BOOLEAN, PROP_NONE);
1485 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_MULTIPLEX_AUDIO);
1486 RNA_def_property_ui_text(prop, "Multiplex Audio", "Interleave audio with the output video");
1487 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1490 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
1491 RNA_def_property_int_sdna(prop, NULL, "frs_sec");
1492 RNA_def_property_range(prop, 1, 120);
1493 RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second.");
1494 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1496 prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
1497 RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
1498 RNA_def_property_range(prop, 0.1f, 120.0f);
1499 RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
1500 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1502 prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
1503 RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
1504 RNA_def_property_range(prop, 0.0f, 2.0f);
1505 RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding.");
1506 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1508 prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE);
1509 RNA_def_property_enum_sdna(prop, NULL, "filtertype");
1510 RNA_def_property_enum_items(prop, pixel_filter_items);
1511 RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples.");
1512 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1514 prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
1515 RNA_def_property_float_sdna(prop, NULL, "gauss");
1516 RNA_def_property_range(prop, 0.5f, 1.5f);
1517 RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples.");
1518 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1520 prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
1521 RNA_def_property_enum_sdna(prop, NULL, "alphamode");
1522 RNA_def_property_enum_items(prop, alpha_mode_items);
1523 RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels.");
1524 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1526 prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
1527 RNA_def_property_enum_sdna(prop, NULL, "ocres");
1528 RNA_def_property_enum_items(prop, octree_resolution_items);
1529 RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
1530 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1532 prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
1533 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
1534 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges.");
1535 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1537 prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
1538 RNA_def_property_enum_sdna(prop, NULL, "osa");
1539 RNA_def_property_enum_items(prop, fixed_oversample_items);
1540 RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel.");
1541 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1543 prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
1544 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
1545 RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output.");
1546 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1548 prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
1549 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1550 RNA_def_property_enum_items(prop, field_order_items);
1551 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");
1553 prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
1554 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
1555 RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
1556 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1558 prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
1559 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
1560 RNA_def_property_ui_text(prop, "Sync Audio", "Play back and sync with audio from Sequence Editor");
1561 RNA_def_property_update(prop, NC_SCENE, NULL);
1563 prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
1564 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
1565 RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
1566 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1568 prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE);
1569 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
1570 RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering.");
1571 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1573 prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE);
1574 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
1575 RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering.");
1576 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1578 prop= RNA_def_property(srna, "render_sss", PROP_BOOLEAN, PROP_NONE);
1579 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
1580 RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering.");
1581 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1583 prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE);
1584 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
1585 RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects.");
1586 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1588 prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE);
1589 RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
1590 RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties.");
1591 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1593 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
1594 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
1595 RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
1596 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1598 prop= RNA_def_property(srna, "edge_intensity", PROP_INT, PROP_NONE);
1599 RNA_def_property_int_sdna(prop, NULL, "edgeint");
1600 RNA_def_property_range(prop, 0, 255);
1601 RNA_def_property_ui_text(prop, "Edge Intensity", "Threshold for drawing outlines on geometry edges");
1602 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1604 prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
1605 RNA_def_property_float_sdna(prop, NULL, "edgeR");
1606 RNA_def_property_array(prop, 3);
1607 RNA_def_property_ui_text(prop, "Edge Color", "");
1608 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1610 prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
1611 RNA_def_property_int_sdna(prop, NULL, "threads");
1612 RNA_def_property_range(prop, 1, 8);
1613 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
1614 RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
1615 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1617 prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
1618 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1619 RNA_def_property_enum_items(prop, threads_mode_items);
1620 RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
1622 prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
1623 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
1624 RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
1625 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1627 prop= RNA_def_property(srna, "border", PROP_BOOLEAN, PROP_NONE);
1628 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
1629 RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
1630 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1632 prop= RNA_def_property(srna, "crop_to_border", PROP_BOOLEAN, PROP_NONE);
1633 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
1634 RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
1635 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1637 prop= RNA_def_property(srna, "placeholders", PROP_BOOLEAN, PROP_NONE);
1638 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
1639 RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
1640 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1642 prop= RNA_def_property(srna, "no_overwrite", PROP_BOOLEAN, PROP_NONE);
1643 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
1644 RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering");
1645 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1647 prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
1648 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
1649 RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled.");
1650 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1652 prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
1653 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
1654 RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
1655 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1657 prop= RNA_def_property(srna, "color_management", PROP_BOOLEAN, PROP_NONE);
1658 RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
1659 RNA_def_property_ui_text(prop, "Color Management", "Use color profiles and gamma corrected imaging pipeline");
1660 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_MATERIAL|ND_SHADING, NULL);
1662 prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE);
1663 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
1664 RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
1665 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1667 prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
1668 RNA_def_property_enum_sdna(prop, NULL, "imtype");
1669 RNA_def_property_enum_items(prop, image_type_items);
1670 RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
1671 RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
1672 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1674 prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
1675 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1676 RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");
1677 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1679 prop= RNA_def_property(srna, "free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
1680 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1681 RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory.");
1682 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1684 prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
1685 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
1686 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
1687 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).");
1688 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1690 prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
1691 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
1692 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.");
1693 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1695 prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
1696 RNA_def_property_boolean_sdna(prop, NULL, "bufflag", R_BACKBUF);
1697 RNA_def_property_ui_text(prop, "Back Buffer", "Render backbuffer image");
1698 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1700 prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
1701 RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
1702 RNA_def_property_enum_items(prop, display_mode_items);
1703 RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
1705 prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
1706 RNA_def_property_string_sdna(prop, NULL, "pic");
1707 RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
1708 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1712 prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
1713 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
1714 RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
1715 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1717 prop= RNA_def_property(srna, "stamp_date", PROP_BOOLEAN, PROP_NONE);
1718 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
1719 RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
1720 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1722 prop= RNA_def_property(srna, "stamp_frame", PROP_BOOLEAN, PROP_NONE);
1723 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
1724 RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
1725 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1727 prop= RNA_def_property(srna, "stamp_camera", PROP_BOOLEAN, PROP_NONE);
1728 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
1729 RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
1730 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1732 prop= RNA_def_property(srna, "stamp_scene", PROP_BOOLEAN, PROP_NONE);
1733 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
1734 RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
1735 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1737 prop= RNA_def_property(srna, "stamp_note", PROP_BOOLEAN, PROP_NONE);
1738 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
1739 RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
1740 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1742 prop= RNA_def_property(srna, "stamp_marker", PROP_BOOLEAN, PROP_NONE);
1743 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
1744 RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
1745 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1747 prop= RNA_def_property(srna, "stamp_filename", PROP_BOOLEAN, PROP_NONE);
1748 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
1749 RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata");
1750 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1752 prop= RNA_def_property(srna, "stamp_sequence_strip", PROP_BOOLEAN, PROP_NONE);
1753 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
1754 RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
1755 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1757 prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
1758 RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
1759 RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
1760 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1762 prop= RNA_def_property(srna, "render_stamp", PROP_BOOLEAN, PROP_NONE);
1763 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
1764 RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
1765 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1767 prop= RNA_def_property(srna, "stamp_font_size", PROP_ENUM, PROP_NONE);
1768 RNA_def_property_enum_sdna(prop, NULL, "stamp_font_id");
1769 RNA_def_property_enum_items(prop, stamp_font_size_items);
1770 RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp text");
1771 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1773 prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
1774 RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
1775 RNA_def_property_array(prop, 4);
1776 RNA_def_property_range(prop,0.0,1.0);
1777 RNA_def_property_ui_text(prop, "Stamp Foreground", "Stamp text color");
1778 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1780 prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
1781 RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
1782 RNA_def_property_array(prop, 4);
1783 RNA_def_property_range(prop,0.0,1.0);
1784 RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text");
1785 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1789 prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
1790 RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
1791 RNA_def_property_struct_type(prop, "SceneRenderLayer");
1792 RNA_def_property_ui_text(prop, "Render Layers", "");
1794 prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
1795 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
1796 RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
1797 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1799 prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
1800 RNA_def_property_int_sdna(prop, NULL, "actlay");
1801 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
1802 RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
1803 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1806 prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
1807 RNA_def_property_enum_items(prop, engine_items);
1808 RNA_def_property_enum_funcs(prop, "rna_SceneRenderData_engine_get", "rna_SceneRenderData_engine_set", "rna_SceneRenderData_engine_itemf");
1809 RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering.");
1810 RNA_def_property_update(prop, NC_WINDOW, NULL);
1812 prop= RNA_def_property(srna, "multiple_engines", PROP_BOOLEAN, PROP_NONE);
1813 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_multiple_engines_get", NULL);
1814 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1815 RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available.");
1817 prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
1818 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_use_game_engine_get", NULL);
1819 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1820 RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine.");
1823 void RNA_def_scene(BlenderRNA *brna)
1829 /* Struct definition */
1830 srna= RNA_def_struct(brna, "Scene", "ID");
1831 RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
1832 RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
1833 RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
1835 /* Global Settings */
1836 prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
1837 RNA_def_property_flag(prop, PROP_EDITABLE);
1838 RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene.");
1840 prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
1841 RNA_def_property_flag(prop, PROP_EDITABLE);
1842 RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
1843 RNA_def_property_update(prop, NC_WORLD, NULL);
1845 prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
1846 RNA_def_property_float_sdna(prop, NULL, "cursor");
1847 RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
1848 RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
1849 RNA_def_property_update(prop, NC_WINDOW, NULL);
1852 prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
1853 RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
1854 RNA_def_property_struct_type(prop, "Object");
1855 RNA_def_property_ui_text(prop, "Objects", "");
1856 RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
1859 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
1860 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
1861 RNA_def_property_array(prop, 20);
1862 RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
1863 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
1866 /* Frame Range Stuff */
1867 prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
1868 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1869 RNA_def_property_int_sdna(prop, NULL, "r.cfra");
1870 RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
1871 RNA_def_property_ui_text(prop, "Current Frame", "");
1872 RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
1874 prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
1875 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1876 RNA_def_property_int_sdna(prop, NULL, "r.sfra");
1877 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
1878 RNA_def_property_ui_text(prop, "Start Frame", "");
1879 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1881 prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
1882 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1883 RNA_def_property_int_sdna(prop, NULL, "r.efra");
1884 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
1885 RNA_def_property_ui_text(prop, "End Frame", "");
1886 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1888 prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
1889 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1890 RNA_def_property_int_sdna(prop, NULL, "frame_step");
1891 RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
1892 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1894 /* Preview Range (frame-range for UI playback) */
1895 prop=RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE); /* use_preview_range is not really a separate setting in SDNA */
1896 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1897 RNA_def_property_boolean_funcs(prop, "rna_Scene_use_preview_range_get", "rna_Scene_use_preview_range_set");
1898 RNA_def_property_ui_text(prop, "Use Preview Range", "");
1899 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1901 prop= RNA_def_property(srna, "preview_range_start_frame", PROP_INT, PROP_TIME);
1902 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1903 RNA_def_property_int_sdna(prop, NULL, "r.psfra");
1904 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
1905 RNA_def_property_ui_text(prop, "Preview Range Start Frame", "");
1906 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1908 prop= RNA_def_property(srna, "preview_range_end_frame", PROP_INT, PROP_TIME);
1909 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1910 RNA_def_property_int_sdna(prop, NULL, "r.pefra");
1911 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
1912 RNA_def_property_ui_text(prop, "Preview Range End Frame", "");
1913 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1916 prop= RNA_def_property(srna, "stamp_note", PROP_STRING, PROP_NONE);
1917 RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
1918 RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
1919 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1921 /* Nodes (Compositing) */
1922 prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
1923 RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
1925 prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
1926 RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
1927 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set");
1928 RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree.");
1929 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1932 prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
1933 RNA_def_property_pointer_sdna(prop, NULL, "ed");
1934 RNA_def_property_struct_type(prop, "SequenceEditor");
1935 RNA_def_property_ui_text(prop, "Sequence Editor", "");
1938 prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
1939 RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
1940 RNA_def_property_struct_type(prop, "KeyingSet");
1941 RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene.");
1942 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
1944 prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
1945 RNA_def_property_struct_type(prop, "KeyingSet");
1946 RNA_def_property_flag(prop, PROP_EDITABLE);
1947 RNA_def_property_editable_func(prop, "rna_Scene_active_keying_set_editable");
1948 RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL);
1949 RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
1950 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
1952 prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE);
1953 RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
1954 RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", "rna_Scene_active_keying_set_index_range");
1955 RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index.");
1956 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
1959 prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NEVER_NULL);
1960 RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
1961 RNA_def_property_struct_type(prop, "ToolSettings");
1962 RNA_def_property_ui_text(prop, "Tool Settings", "");
1965 prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NEVER_NULL);
1966 RNA_def_property_pointer_sdna(prop, NULL, "unit");
1967 RNA_def_property_struct_type(prop, "UnitSettings");
1968 RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
1971 prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NEVER_NULL);
1972 RNA_def_property_pointer_sdna(prop, NULL, "r");
1973 RNA_def_property_struct_type(prop, "SceneRenderData");
1974 RNA_def_property_ui_text(prop, "Render Data", "");
1977 prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
1978 RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
1979 RNA_def_property_struct_type(prop, "TimelineMarker");
1980 RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
1983 prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NEVER_NULL);
1984 RNA_def_property_pointer_sdna(prop, NULL, "gm");
1985 RNA_def_property_struct_type(prop, "SceneGameData");
1986 RNA_def_property_ui_text(prop, "Game Data", "");
1989 func= RNA_def_function(srna, "statistics", "ED_info_stats_string");
1990 prop= RNA_def_string(func, "statistics", "", 0, "Statistics", "");
1991 RNA_def_function_return(func, prop);
1993 rna_def_tool_settings(brna);
1994 rna_def_unit_settings(brna);
1995 rna_def_scene_render_data(brna);
1996 rna_def_scene_game_data(brna);
1997 rna_def_scene_render_layer(brna);
2000 RNA_api_scene(srna);