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"
35 /* Include for Bake Options */
36 #include "RE_pipeline.h"
39 #include "BKE_writeffmpeg.h"
40 #include <libavcodec/avcodec.h>
41 #include <libavformat/avformat.h>
46 /* prop_mode needs to be accessible from transform operator */
47 EnumPropertyItem prop_mode_items[] ={
48 {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
49 {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
50 {PROP_ROOT, "ROOT", 0, "Root", ""},
51 {PROP_SHARP, "SHARP", 0, "Sharp", ""},
52 {PROP_LIN, "LINEAR", 0, "Linear", ""},
53 {PROP_CONST, "CONSTANT", 0, "Constant", ""},
54 {PROP_RANDOM, "RANDOM", 0, "Random", ""},
55 {0, NULL, 0, NULL, NULL}};
59 #include "DNA_anim_types.h"
60 #include "DNA_node_types.h"
62 #include "BKE_context.h"
63 #include "BKE_global.h"
66 #include "BLI_threads.h"
71 #include "RE_pipeline.h"
73 static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
75 ListBaseIterator *internal= iter->internal;
77 /* we are actually iterating a Base list, so override get */
78 return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
81 static int layer_set(int lay, const int *values)
85 /* ensure we always have some layer selected */
94 if(values[i]) lay |= (1<<i);
101 static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
103 Scene *scene= (Scene*)ptr->data;
105 scene->lay= layer_set(scene->lay, values);
108 static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
110 Scene *data= (Scene*)ptr->data;
111 CLAMP(value, 1, data->r.efra);
115 static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
117 Scene *data= (Scene*)ptr->data;
118 CLAMP(value, data->r.sfra, MAXFRAME);
122 static int rna_Scene_use_preview_range_get(PointerRNA *ptr)
124 Scene *data= (Scene*)ptr->data;
126 /* this is simply overloaded to assume that preview-range
127 * start frame cannot be less than 1 when on,
128 * so psfra=0 means 'off'
130 return (data->r.psfra != 0);
133 static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
135 Scene *data= (Scene*)ptr->data;
137 /* if enable, copy range from render-range, otherwise just clear */
139 data->r.psfra= data->r.sfra;
140 data->r.pefra= data->r.efra;
147 static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
149 Scene *data= (Scene*)ptr->data;
151 /* check if enabled already */
152 if (data->r.psfra == 0) {
153 /* set end of preview range to end frame, then clamp as per normal */
154 // TODO: or just refuse to set instead?
155 data->r.pefra= data->r.efra;
158 /* now set normally */
159 CLAMP(value, 1, data->r.pefra);
160 data->r.psfra= value;
163 static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
165 Scene *data= (Scene*)ptr->data;
167 /* check if enabled already */
168 if (data->r.psfra == 0) {
169 /* set start of preview range to start frame, then clamp as per normal */
170 // TODO: or just refuse to set instead?
171 data->r.psfra= data->r.sfra;
174 /* now set normally */
175 CLAMP(value, data->r.psfra, MAXFRAME);
176 data->r.pefra= value;
179 static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
181 //Scene *scene= ptr->id.data;
182 //ED_update_for_newframe(C);
185 static int rna_Scene_active_keying_set_editable(PointerRNA *ptr)
187 Scene *scene= (Scene *)ptr->data;
189 /* only editable if there are some Keying Sets to change to */
190 return (scene->keyingsets.first != NULL);
193 static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
195 Scene *scene= (Scene *)ptr->data;
196 return rna_pointer_inherit_refine(ptr, &RNA_KeyingSet, BLI_findlink(&scene->keyingsets, scene->active_keyingset-1));
199 static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
201 Scene *scene= (Scene *)ptr->data;
202 KeyingSet *ks= (KeyingSet*)value.data;
203 scene->active_keyingset= BLI_findindex(&scene->keyingsets, ks) + 1;
206 static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
208 Scene *scene= (Scene *)ptr->data;
209 return MAX2(scene->active_keyingset-1, 0);
212 static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
214 Scene *scene= (Scene *)ptr->data;
215 scene->active_keyingset= value+1;
218 static void rna_Scene_active_keying_set_index_range(PointerRNA *ptr, int *min, int *max)
220 Scene *scene= (Scene *)ptr->data;
223 *max= BLI_countlist(&scene->keyingsets)-1;
228 static char *rna_SceneRenderData_path(PointerRNA *ptr)
230 return BLI_sprintfN("render_data");
233 static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
235 RenderData *rd= (RenderData*)ptr->data;
237 if(rd->mode & R_FIXED_THREADS)
240 return BLI_system_thread_count();
243 static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
245 RenderData *rd= (RenderData*)ptr->data;
247 return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
250 static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
252 RenderData *rd= (RenderData*)ptr->data;
256 ffmpeg_verify_image_type(rd);
260 static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
262 RenderData *rd= (RenderData*)ptr->data;
266 static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
268 RenderData *rd= (RenderData*)ptr->data;
272 static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
274 RenderData *rd= (RenderData*)ptr->data;
277 *max= BLI_countlist(&rd->layers)-1;
281 static void rna_SceneRenderData_engine_set(PointerRNA *ptr, int value)
283 RenderData *rd= (RenderData*)ptr->data;
284 RenderEngineType *type= BLI_findlink(&R_engines, value);
287 BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
290 static EnumPropertyItem *rna_SceneRenderData_engine_itemf(bContext *C, PointerRNA *ptr, int *free)
292 RenderEngineType *type;
293 EnumPropertyItem *item= NULL;
294 EnumPropertyItem tmp = {0, "", 0, "", ""};
297 for(type=R_engines.first; type; type=type->next, a++) {
299 tmp.identifier= type->idname;
300 tmp.name= type->name;
301 RNA_enum_item_add(&item, &totitem, &tmp);
304 RNA_enum_item_end(&item, &totitem);
310 static int rna_SceneRenderData_engine_get(PointerRNA *ptr)
312 RenderData *rd= (RenderData*)ptr->data;
313 RenderEngineType *type;
316 for(type=R_engines.first; type; type=type->next, a++)
317 if(strcmp(type->idname, rd->engine) == 0)
323 static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
325 Scene *scene= (Scene*)ptr->id.data;
326 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
328 BLI_strncpy(rl->name, value, sizeof(rl->name));
330 if(scene->nodetree) {
332 int index= BLI_findindex(&scene->r.layers, rl);
334 for(node= scene->nodetree->nodes.first; node; node= node->next) {
335 if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
336 if(node->custom1==index)
337 BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
343 static int rna_SceneRenderData_multiple_engines_get(PointerRNA *ptr)
345 return (BLI_countlist(&R_engines) > 1);
348 static int rna_SceneRenderData_use_game_engine_get(PointerRNA *ptr)
350 RenderData *rd= (RenderData*)ptr->data;
351 RenderEngineType *type;
353 for(type=R_engines.first; type; type=type->next)
354 if(strcmp(type->idname, rd->engine) == 0)
355 return (type->flag & RE_GAME);
360 static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
362 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
363 rl->lay= layer_set(rl->lay, values);
366 static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
368 Scene *scene= (Scene*)ptr->id.data;
371 ntreeCompositForceHidden(scene->nodetree, scene);
374 static void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
376 Scene *scene= (Scene*)ptr->data;
378 scene->use_nodes= value;
379 if(scene->use_nodes && scene->nodetree==NULL)
380 ED_node_composit_default(scene);
385 static void rna_def_tool_settings(BlenderRNA *brna)
390 static EnumPropertyItem uv_select_mode_items[] = {
391 {UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode."},
392 {UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode."},
393 {UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode."},
394 {UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode."},
395 {0, NULL, 0, NULL, NULL}};
397 static EnumPropertyItem mesh_select_mode_items[] = {
398 {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
399 {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
400 {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
401 {0, NULL, 0, NULL, NULL}};
403 static EnumPropertyItem snap_element_items[] = {
404 {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
405 {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
406 {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
407 {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
408 {0, NULL, 0, NULL, NULL}};
410 static EnumPropertyItem snap_mode_items[] = {
411 {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
412 {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
413 {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
414 {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
415 {0, NULL, 0, NULL, NULL}};
417 static EnumPropertyItem auto_key_items[] = {
418 {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
419 {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
420 {0, NULL, 0, NULL, NULL}};
422 srna= RNA_def_struct(brna, "ToolSettings", NULL);
423 RNA_def_struct_ui_text(srna, "Tool Settings", "");
425 prop= RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
426 RNA_def_property_struct_type(prop, "Sculpt");
427 RNA_def_property_ui_text(prop, "Sculpt", "");
429 prop= RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
430 RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
431 RNA_def_property_ui_text(prop, "Vertex Paint", "");
433 prop= RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE);
434 RNA_def_property_pointer_sdna(prop, NULL, "wpaint");
435 RNA_def_property_ui_text(prop, "Weight Paint", "");
437 prop= RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE);
438 RNA_def_property_pointer_sdna(prop, NULL, "imapaint");
439 RNA_def_property_ui_text(prop, "Image Paint", "");
441 prop= RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
442 RNA_def_property_pointer_sdna(prop, NULL, "particle");
443 RNA_def_property_ui_text(prop, "Particle Edit", "");
446 prop= RNA_def_property(srna, "proportional_editing", PROP_BOOLEAN, PROP_NONE);
447 RNA_def_property_boolean_sdna(prop, NULL, "proportional", 0);
448 RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
450 prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
451 RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
452 RNA_def_property_enum_items(prop, prop_mode_items);
453 RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
455 prop= RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
456 RNA_def_property_float_sdna(prop, NULL, "normalsize");
457 RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view.");
458 RNA_def_property_range(prop, 0.00001, 1000.0);
459 RNA_def_property_ui_range(prop, 0.01, 10.0, 0.1, 2);
460 RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
462 prop= RNA_def_property(srna, "automerge_editing", PROP_BOOLEAN, PROP_NONE);
463 RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
464 RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location.");
466 prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
467 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
468 RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
469 RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
471 prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
472 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
473 RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
474 RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
476 prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
477 RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
478 RNA_def_property_enum_items(prop, snap_element_items);
479 RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
481 prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
482 RNA_def_property_enum_sdna(prop, NULL, "snap_target");
483 RNA_def_property_enum_items(prop, snap_mode_items);
484 RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
486 prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
487 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
488 RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
489 RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
492 prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
493 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
494 RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
496 prop= RNA_def_property(srna, "autokey_mode", PROP_ENUM, PROP_NONE);
497 RNA_def_property_enum_sdna(prop, NULL, "autokey_mode");
498 RNA_def_property_enum_items(prop, auto_key_items);
499 RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
501 prop= RNA_def_property(srna, "record_with_nla", PROP_BOOLEAN, PROP_NONE);
502 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
503 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.");
506 prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
507 RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
508 RNA_def_property_enum_items(prop, uv_select_mode_items);
509 RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
511 prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
512 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
513 RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
514 RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
516 prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
517 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
518 RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
521 prop= RNA_def_property(srna, "mesh_selection_mode", PROP_ENUM, PROP_NONE);
522 RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
523 RNA_def_property_enum_items(prop, mesh_select_mode_items);
524 RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Mesh selection and display mode.");
526 prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_PERCENTAGE);
527 RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
528 RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
532 static void rna_def_unit_settings(BlenderRNA *brna)
537 static EnumPropertyItem unit_systems[] = {
538 {USER_UNIT_NONE, "NONE", 0, "None", ""},
539 {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
540 {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
541 {0, NULL, 0, NULL, NULL}};
543 srna= RNA_def_struct(brna, "UnitSettings", NULL);
544 RNA_def_struct_ui_text(srna, "Unit Settings", "");
547 prop= RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
548 RNA_def_property_enum_items(prop, unit_systems);
549 RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display.");
550 RNA_def_property_update(prop, NC_WINDOW, NULL);
552 prop= RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
553 RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions.");
554 RNA_def_property_range(prop, 0.00001, 100000.0);
555 RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
556 RNA_def_property_update(prop, NC_WINDOW, NULL);
558 prop= RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
559 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT);
560 RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs.");
561 RNA_def_property_update(prop, NC_WINDOW, NULL);
565 void rna_def_render_layer_common(StructRNA *srna, int scene)
569 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
570 if(scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
571 else RNA_def_property_string_sdna(prop, NULL, "name");
572 RNA_def_property_ui_text(prop, "Name", "Render layer name.");
573 RNA_def_struct_name_property(srna, prop);
574 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
575 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
577 prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
578 RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
579 RNA_def_property_struct_type(prop, "Material");
580 RNA_def_property_flag(prop, PROP_EDITABLE);
581 RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
582 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
583 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
585 prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
586 RNA_def_property_pointer_sdna(prop, NULL, "light_override");
587 RNA_def_property_struct_type(prop, "Group");
588 RNA_def_property_flag(prop, PROP_EDITABLE);
589 RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
590 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
591 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
594 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
595 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
596 RNA_def_property_array(prop, 20);
597 RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
598 if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
599 else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
600 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
601 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
603 prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_LAYER);
604 RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
605 RNA_def_property_array(prop, 20);
606 RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
607 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
608 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
611 prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
612 RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
613 RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
614 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
615 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
617 prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE);
618 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
619 RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
620 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
621 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
623 prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE);
624 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
625 RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
626 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
627 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
629 prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE);
630 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
631 RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
632 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
633 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
635 prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE);
636 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
637 RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
638 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
639 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
641 prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
642 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
643 RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
644 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
645 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
647 prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE);
648 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
649 RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
650 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
651 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
653 prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
654 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
655 RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
656 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
657 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
659 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
660 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
661 RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
662 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
663 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
665 prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE);
666 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
667 RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
668 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
669 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
672 prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
673 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
674 RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
675 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
676 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
678 prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE);
679 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
680 RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
681 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
682 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
684 prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE);
685 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
686 RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
687 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
688 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
690 prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
691 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
692 RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
693 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
694 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
696 prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
697 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
698 RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
699 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
700 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
702 prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
703 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
704 RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
705 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
706 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
708 prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
709 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
710 RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
711 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
712 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
714 prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
715 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
716 RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
717 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
718 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
720 prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
721 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
722 RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
723 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
724 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
726 prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
727 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
728 RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
729 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
730 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
732 prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
733 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
734 RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
735 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
736 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
738 prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
739 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
740 RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
741 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
742 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
744 prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
745 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
746 RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass.");
747 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
748 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
750 prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
751 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
752 RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass.");
753 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
754 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
756 prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
757 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
758 RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
759 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
760 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
762 prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
763 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
764 RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
765 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
766 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
768 prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
769 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
770 RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
771 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
772 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
774 prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
775 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
776 RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined.");
777 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
778 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
780 prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
781 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
782 RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined.");
783 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
784 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
787 static void rna_def_scene_game_data(BlenderRNA *brna)
792 static EnumPropertyItem framing_types_items[] ={
793 {SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", "Show the entire viewport in the display window, using bar horizontally or vertically"},
794 {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", "Show the entire viewport in the display window, viewing more horizontally or vertically"},
795 {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
796 {0, NULL, 0, NULL, NULL}};
798 static EnumPropertyItem dome_modes_items[] ={
799 {DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
800 {DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""},
801 {DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
802 {DOME_ENVMAP, "ENVMAP", 0, "Cube Map", ""},
803 {DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""},
804 {0, NULL, 0, NULL, NULL}};
806 static EnumPropertyItem stereo_modes_items[] ={
807 // {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
808 {STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
809 {STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
810 {STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
811 {STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""},
812 {STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""},
813 {STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
814 // {STEREO_DOME, "DOME", 0, "Dome", ""},
815 {0, NULL, 0, NULL, NULL}};
817 static EnumPropertyItem stereo_items[] ={
818 {STEREO_NOSTEREO, "NONE", 0, "None", ""},
819 {STEREO_ENABLED, "STEREO", 0, "Stereo", ""},
820 {STEREO_DOME, "DOME", 0, "Dome", ""},
821 {0, NULL, 0, NULL, NULL}};
823 static EnumPropertyItem physics_engine_items[] = {
824 {WOPHY_NONE, "NONE", 0, "None", ""},
825 //{WOPHY_ENJI, "ENJI", 0, "Enji", ""},
826 //{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""},
827 //{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""},
828 //{WOPHY_ODE, "ODE", 0, "ODE", ""},
829 {WOPHY_BULLET, "BULLET", 0, "Bullet", ""},
830 {0, NULL, 0, NULL, NULL}};
832 static EnumPropertyItem material_items[] ={
833 {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials."},
834 {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials."},
835 {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders."},
836 {0, NULL, 0, NULL, NULL}};
838 srna= RNA_def_struct(brna, "SceneGameData", NULL);
839 RNA_def_struct_sdna(srna, "GameData");
840 RNA_def_struct_nested(brna, srna, "Scene");
841 RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablock.");
843 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
844 RNA_def_property_int_sdna(prop, NULL, "xplay");
845 RNA_def_property_range(prop, 4, 10000);
846 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen.");
847 RNA_def_property_update(prop, NC_SCENE, NULL);
849 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
850 RNA_def_property_int_sdna(prop, NULL, "yplay");
851 RNA_def_property_range(prop, 4, 10000);
852 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen.");
853 RNA_def_property_update(prop, NC_SCENE, NULL);
855 prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
856 RNA_def_property_int_sdna(prop, NULL, "depth");
857 RNA_def_property_range(prop, 8, 32);
858 RNA_def_property_ui_text(prop, "Bits", "Displays bit depth of full screen display.");
859 RNA_def_property_update(prop, NC_SCENE, NULL);
861 // Do we need it here ? (since we already have it in World
862 prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
863 RNA_def_property_int_sdna(prop, NULL, "freqplay");
864 RNA_def_property_range(prop, 4, 2000);
865 RNA_def_property_ui_text(prop, "Freq", "Displays clock frequency of fullscreen display.");
866 RNA_def_property_update(prop, NC_SCENE, NULL);
868 prop= RNA_def_property(srna, "fullscreen", PROP_BOOLEAN, PROP_NONE);
869 RNA_def_property_boolean_sdna(prop, NULL, "fullscreen", 1.0);
870 RNA_def_property_ui_text(prop, "Fullscreen", "Starts player in a new fullscreen display");
871 RNA_def_property_update(prop, NC_SCENE, NULL);
874 prop= RNA_def_property(srna, "framing_type", PROP_ENUM, PROP_NONE);
875 RNA_def_property_enum_sdna(prop, NULL, "framing.type");
876 RNA_def_property_enum_items(prop, framing_types_items);
877 RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want.");
878 RNA_def_property_update(prop, NC_SCENE, NULL);
880 prop= RNA_def_property(srna, "framing_color", PROP_FLOAT, PROP_COLOR);
881 RNA_def_property_float_sdna(prop, NULL, "framing.col");
882 RNA_def_property_array(prop, 3);
883 RNA_def_property_ui_text(prop, "", "");
884 RNA_def_property_update(prop, NC_SCENE, NULL);
887 prop= RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE);
888 RNA_def_property_enum_sdna(prop, NULL, "stereoflag");
889 RNA_def_property_enum_items(prop, stereo_items);
890 RNA_def_property_ui_text(prop, "Stereo Options", "");
891 RNA_def_property_update(prop, NC_SCENE, NULL);
893 prop= RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
894 RNA_def_property_enum_sdna(prop, NULL, "stereomode");
895 RNA_def_property_enum_items(prop, stereo_modes_items);
896 RNA_def_property_ui_text(prop, "Stereo Mode", "");
897 RNA_def_property_update(prop, NC_SCENE, NULL);
900 prop= RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
901 RNA_def_property_enum_sdna(prop, NULL, "dome.mode");
902 RNA_def_property_enum_items(prop, dome_modes_items);
903 RNA_def_property_ui_text(prop, "Dome Mode", "");
904 RNA_def_property_update(prop, NC_SCENE, NULL);
906 prop= RNA_def_property(srna, "dome_tesselation", PROP_INT, PROP_NONE);
907 RNA_def_property_int_sdna(prop, NULL, "dome.res");
908 RNA_def_property_ui_range(prop, 1, 8, 1, 1);
909 RNA_def_property_ui_text(prop, "Tesselation", "Tesselation level - check the generated mesh in wireframe mode");
910 RNA_def_property_update(prop, NC_SCENE, NULL);
912 prop= RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP_NONE);
913 RNA_def_property_float_sdna(prop, NULL, "dome.resbuf");
914 RNA_def_property_ui_range(prop, 0.1, 1.0, 0.1, 0.1);
915 RNA_def_property_ui_text(prop, "Buffer Resolution", "Buffer Resolution - decrease it to increase speed");
916 RNA_def_property_update(prop, NC_SCENE, NULL);
918 prop= RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE);
919 RNA_def_property_int_sdna(prop, NULL, "dome.angle");
920 RNA_def_property_ui_range(prop, 90, 250, 1, 1);
921 RNA_def_property_ui_text(prop, "Angle", "Field of View of the Dome - it only works in mode Fisheye and Truncated");
922 RNA_def_property_update(prop, NC_SCENE, NULL);
924 prop= RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE);
925 RNA_def_property_int_sdna(prop, NULL, "dome.tilt");
926 RNA_def_property_ui_range(prop, -180, 180, 1, 1);
927 RNA_def_property_ui_text(prop, "Tilt", "Camera rotation in horizontal axis");
928 RNA_def_property_update(prop, NC_SCENE, NULL);
930 prop= RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE);
931 RNA_def_property_pointer_sdna(prop, NULL, "dome.warptext");
932 RNA_def_property_struct_type(prop, "Text");
933 RNA_def_property_flag(prop, PROP_EDITABLE);
934 RNA_def_property_ui_text(prop, "Warp Data", "Custom Warp Mesh data file");
935 RNA_def_property_update(prop, NC_SCENE, NULL);
938 prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
939 RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
940 RNA_def_property_enum_items(prop, physics_engine_items);
941 RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
942 RNA_def_property_update(prop, NC_SCENE, NULL);
944 prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
945 RNA_def_property_float_sdna(prop, NULL, "gravity");
946 RNA_def_property_range(prop, 0.0, 25.0);
947 RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
948 RNA_def_property_update(prop, NC_SCENE, NULL);
950 prop= RNA_def_property(srna, "occlusion_culling_resolution", PROP_FLOAT, PROP_NONE);
951 RNA_def_property_float_sdna(prop, NULL, "occlusionRes");
952 RNA_def_property_range(prop, 128.0, 1024.0);
953 RNA_def_property_ui_text(prop, "Occlusion Resolution", "The size of the occlusion buffer in pixel, use higher value for better precsion (slower)");
954 RNA_def_property_update(prop, NC_SCENE, NULL);
956 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
957 RNA_def_property_int_sdna(prop, NULL, "ticrate");
958 RNA_def_property_ui_range(prop, 1, 60, 1, 1);
959 RNA_def_property_range(prop, 1, 250);
960 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.");
961 RNA_def_property_update(prop, NC_SCENE, NULL);
963 prop= RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
964 RNA_def_property_int_sdna(prop, NULL, "maxlogicstep");
965 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
966 RNA_def_property_range(prop, 1, 5);
967 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");
968 RNA_def_property_update(prop, NC_SCENE, NULL);
970 prop= RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
971 RNA_def_property_int_sdna(prop, NULL, "maxphystep");
972 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
973 RNA_def_property_range(prop, 1, 5);
974 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");
975 RNA_def_property_update(prop, NC_SCENE, NULL);
977 prop= RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
978 RNA_def_property_int_sdna(prop, NULL, "physubstep");
979 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
980 RNA_def_property_range(prop, 1, 5);
981 RNA_def_property_ui_text(prop, "Physics Sub Steps", "Sets the number of simulation substep per physic timestep, higher value give better physics precision");
982 RNA_def_property_update(prop, NC_SCENE, NULL);
985 prop= RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
986 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 5)); //XXX mode hardcoded // WO_DBVT_CULLING
987 RNA_def_property_ui_text(prop, "DBVT culling", "Use optimized Bullet DBVT tree for view frustrum and occlusion culling");
988 RNA_def_property_update(prop, NC_SCENE, NULL);
990 // not used // deprecated !!!!!!!!!!!!!
991 prop= RNA_def_property(srna, "activity_culling", PROP_BOOLEAN, PROP_NONE);
992 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 3)); //XXX mode hardcoded
993 RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is enabled");
994 RNA_def_property_update(prop, NC_SCENE, NULL);
996 // not used // deprecated !!!!!!!!!!!!!
997 prop= RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
998 RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
999 RNA_def_property_range(prop, 0.0, 1000.0);
1000 RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled");
1001 RNA_def_property_update(prop, NC_SCENE, NULL);
1004 prop= RNA_def_property(srna, "all_frames", PROP_BOOLEAN, PROP_NONE);
1005 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
1006 RNA_def_property_ui_text(prop, "All Frames", "Render as many frames as possible, rather than respecting framerate.");
1007 RNA_def_property_update(prop, NC_SCENE, NULL);
1009 prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
1010 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS);
1011 RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs.");
1012 RNA_def_property_update(prop, NC_SCENE, NULL);
1014 prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
1015 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
1016 RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs.");
1017 RNA_def_property_update(prop, NC_SCENE, NULL);
1019 prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
1020 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
1021 RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions.");
1022 RNA_def_property_update(prop, NC_SCENE, NULL);
1024 prop= RNA_def_property(srna, "display_lists", PROP_BOOLEAN, PROP_NONE);
1025 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS);
1026 RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU.");
1027 RNA_def_property_update(prop, NC_SCENE, NULL);
1029 prop= RNA_def_property(srna, "deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
1030 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS);
1031 RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API.");
1032 RNA_def_property_update(prop, NC_SCENE, NULL);
1035 prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
1036 RNA_def_property_enum_sdna(prop, NULL, "matmode");
1037 RNA_def_property_enum_items(prop, material_items);
1038 RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering.");
1039 RNA_def_property_update(prop, NC_SCENE, NULL);
1041 prop= RNA_def_property(srna, "glsl_lights", PROP_BOOLEAN, PROP_NONE);
1042 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
1043 RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering.");
1044 RNA_def_property_update(prop, NC_SCENE, NULL);
1046 prop= RNA_def_property(srna, "glsl_shaders", PROP_BOOLEAN, PROP_NONE);
1047 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
1048 RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering.");
1049 RNA_def_property_update(prop, NC_SCENE, NULL);
1051 prop= RNA_def_property(srna, "glsl_shadows", PROP_BOOLEAN, PROP_NONE);
1052 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
1053 RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering.");
1054 RNA_def_property_update(prop, NC_SCENE, NULL);
1056 prop= RNA_def_property(srna, "glsl_ramps", PROP_BOOLEAN, PROP_NONE);
1057 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
1058 RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering.");
1059 RNA_def_property_update(prop, NC_SCENE, NULL);
1061 prop= RNA_def_property(srna, "glsl_nodes", PROP_BOOLEAN, PROP_NONE);
1062 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
1063 RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering.");
1064 RNA_def_property_update(prop, NC_SCENE, NULL);
1066 prop= RNA_def_property(srna, "glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
1067 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
1068 RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering.");
1069 RNA_def_property_update(prop, NC_SCENE, NULL);
1072 static void rna_def_scene_render_layer(BlenderRNA *brna)
1076 srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
1077 RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
1079 rna_def_render_layer_common(srna, 1);
1082 static void rna_def_scene_render_data(BlenderRNA *brna)
1087 static EnumPropertyItem pixel_filter_items[] ={
1088 {R_FILTER_BOX, "BOX", 0, "Box", ""},
1089 {R_FILTER_TENT, "TENT", 0, "Tent", ""},
1090 {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", ""},
1091 {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", ""},
1092 {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", ""},
1093 {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", ""},
1094 {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", ""},
1095 {0, NULL, 0, NULL, NULL}};
1097 static EnumPropertyItem alpha_mode_items[] ={
1098 {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
1099 {R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
1100 {R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
1101 {0, NULL, 0, NULL, NULL}};
1103 static EnumPropertyItem color_mode_items[] ={
1104 {R_PLANESBW, "BW", 0, "BW", "Images are saved with BW (grayscale) data"},
1105 {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
1106 {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
1107 {0, NULL, 0, NULL, NULL}};
1109 static EnumPropertyItem display_mode_items[] ={
1110 {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
1111 {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
1112 {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
1113 {0, NULL, 0, NULL, NULL}};
1116 static EnumPropertyItem bake_mode_items[] ={
1117 {RE_BAKE_ALL, "FULL", 0, "Full Render", ""},
1118 {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", ""},
1119 {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", ""},
1120 {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", ""},
1121 {RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", ""},
1122 {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", ""},
1123 {0, NULL, 0, NULL, NULL}};
1125 static EnumPropertyItem bake_normal_space_items[] ={
1126 {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", ""},
1127 {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", ""},
1128 {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", ""},
1129 {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
1130 {0, NULL, 0, NULL, NULL}};
1132 static EnumPropertyItem bake_aa_items[] ={
1133 {5, "AA_5", 0, "5", ""},
1134 {8, "AA_8", 0, "8", ""},
1135 {11, "AA_11", 0, "11", ""},
1136 {16, "AA_16", 0, "16", ""},
1137 {0, NULL, 0, NULL, NULL}};
1139 static EnumPropertyItem octree_resolution_items[] = {
1140 {64, "OCTREE_RES_64", 0, "64", ""},
1141 {128, "OCTREE_RES_128", 0, "128", ""},
1142 {256, "OCTREE_RES_256", 0, "256", ""},
1143 {512, "OCTREE_RES_512", 0, "512", ""},
1144 {0, NULL, 0, NULL, NULL}};
1146 static EnumPropertyItem fixed_oversample_items[] = {
1147 {5, "OVERSAMPLE_5", 0, "5", ""},
1148 {8, "OVERSAMPLE_8", 0, "8", ""},
1149 {11, "OVERSAMPLE_11", 0, "11", ""},
1150 {16, "OVERSAMPLE_16", 0, "16", ""},
1151 {0, NULL, 0, NULL, NULL}};
1153 static EnumPropertyItem field_order_items[] = {
1154 {0, "FIELDS_EVENFIRST", 0, "Even", "Even Fields First"},
1155 {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Odd", "Odd Fields First"},
1156 {0, NULL, 0, NULL, NULL}};
1158 static EnumPropertyItem threads_mode_items[] = {
1159 {0, "THREADS_AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
1160 {R_FIXED_THREADS, "THREADS_FIXED", 0, "Fixed", "Manually determine the number of threads"},
1161 {0, NULL, 0, NULL, NULL}};
1163 static EnumPropertyItem stamp_font_size_items[] = {
1164 {1, "STAMP_FONT_TINY", 0, "Tiny", ""},
1165 {2, "STAMP_FONT_SMALL", 0, "Small", ""},
1166 {3, "STAMP_FONT_MEDIUM", 0, "Medium", ""},
1167 {0, "STAMP_FONT_LARGE", 0, "Large", ""},
1168 {4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
1169 {0, NULL, 0, NULL, NULL}};
1171 static EnumPropertyItem image_type_items[] = {
1172 {0, "", 0, "Image", NULL},
1173 {R_PNG, "PNG", 0, "PNG", ""},
1174 {R_JPEG90, "JPEG", 0, "JPEG", ""},
1175 #ifdef WITH_OPENJPEG
1176 {R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
1178 {R_BMP, "BMP", 0, "BMP", ""},
1179 {R_TARGA, "TARGA", 0, "Targa", ""},
1180 {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
1181 //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
1182 {R_HAMX, "HAMX", 0, "HamX", ""},
1183 {R_IRIS, "IRIS", 0, "Iris", ""},
1184 {0, "", 0, " ", NULL},
1186 {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
1187 {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
1189 {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
1190 {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
1191 {R_CINEON, "CINEON", 0, "Cineon", ""},
1192 {R_DPX, "DPX", 0, "DPX", ""},
1193 {0, "", 0, "Movie", NULL},
1194 {R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
1195 {R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
1197 {R_AVICODEC, "AVICODEC", 0, "AVI Codec", ""},
1199 #ifdef WITH_QUICKTIME
1200 {R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""},
1203 {R_MOVIE, "MOVIE", 0, "Movie", ""},
1206 {R_H264, "H264", 0, "H.264", ""},
1207 {R_XVID, "XVID", 0, "Xvid", ""},
1211 {R_THEORA, "THEORA", 0, "Ogg Theora", ""},
1214 {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
1216 {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
1217 {0, NULL, 0, NULL, NULL}};
1220 static EnumPropertyItem exr_codec_items[] = {
1221 {0, "NONE", 0, "None", ""},
1222 {1, "PXR24", 0, "Pxr24 (lossy)", ""},
1223 {2, "ZIP", 0, "ZIP (lossless)", ""},
1224 {3, "PIZ", 0, "PIZ (lossless)", ""},
1225 {4, "RLE", 0, "RLE (lossless)", ""},
1226 {0, NULL, 0, NULL, NULL}};
1229 #ifdef WITH_OPENJPEG
1230 static EnumPropertyItem jp2_preset_items[] = {
1231 {0, "NO_PRESET", 0, "No Preset", ""},
1232 {1, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 2048x1080", ""},
1233 {2, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
1234 {3, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 4096x2160", ""},
1235 {4, "R_JPEG2K_CINE_PRESET", 0, "Cine-Scope 24fps 2048x858", ""},
1236 {5, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
1237 {6, "R_JPEG2K_CINE_PRESET", 0, "Cine-Flat 24fps 1998x1080", ""},
1238 {7, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
1239 {0, NULL, 0, NULL, NULL}};
1241 static EnumPropertyItem jp2_depth_items[] = {
1242 {0, "8", 0, "8", ""},
1243 {R_JPEG2K_12BIT, "16", 0, "16", ""},
1244 {R_JPEG2K_16BIT, "32", 0, "32", ""},
1245 {0, NULL, 0, NULL, NULL}};
1249 static EnumPropertyItem ffmpeg_format_items[] = {
1250 {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
1251 {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
1252 {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
1253 {FFMPEG_AVI, "AVI", 0, "AVI", ""},
1254 {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
1255 {FFMPEG_DV, "DV", 0, "DV", ""},
1256 {FFMPEG_H264, "H264", 0, "H.264", ""},
1257 {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
1261 {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
1264 {FFMPEG_FLV, "FLASH", 0, "Flash", ""},
1265 {0, NULL, 0, NULL, NULL}};
1267 static EnumPropertyItem ffmpeg_codec_items[] = {
1268 {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
1269 {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
1270 {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
1271 {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
1272 {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
1273 {CODEC_ID_H264, "H264", 0, "H.264", ""},
1274 {CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
1276 {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
1278 {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
1279 {0, NULL, 0, NULL, NULL}};
1281 static EnumPropertyItem ffmpeg_audio_codec_items[] = {
1282 {CODEC_ID_MP2, "MP2", 0, "MP2", ""},
1283 {CODEC_ID_MP3, "MP3", 0, "MP3", ""},
1284 {CODEC_ID_AC3, "AC3", 0, "AC3", ""},
1285 {CODEC_ID_AAC, "AAC", 0, "AAC", ""},
1286 {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
1287 {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
1288 {0, NULL, 0, NULL, NULL}};
1291 static EnumPropertyItem engine_items[] = {
1292 {0, "BLENDER_RENDER", 0, "Blender Render", ""},
1293 {0, NULL, 0, NULL, NULL}};
1295 srna= RNA_def_struct(brna, "SceneRenderData", NULL);
1296 RNA_def_struct_sdna(srna, "RenderData");
1297 RNA_def_struct_nested(brna, srna, "Scene");
1298 RNA_def_struct_path_func(srna, "rna_SceneRenderData_path");
1299 RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
1301 prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
1302 RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
1303 RNA_def_property_enum_items(prop, color_mode_items);
1304 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");
1305 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1307 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
1308 RNA_def_property_int_sdna(prop, NULL, "xsch");
1309 RNA_def_property_range(prop, 4, 10000);
1310 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image.");
1311 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1313 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
1314 RNA_def_property_int_sdna(prop, NULL, "ysch");
1315 RNA_def_property_range(prop, 4, 10000);
1316 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image.");
1317 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1319 prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
1320 RNA_def_property_int_sdna(prop, NULL, "size");
1321 RNA_def_property_ui_range(prop, 1, 100, 10, 1);
1322 RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
1323 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1325 prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
1326 RNA_def_property_int_sdna(prop, NULL, "xparts");
1327 RNA_def_property_range(prop, 1, 512);
1328 RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering.");
1329 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1331 prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
1332 RNA_def_property_int_sdna(prop, NULL, "yparts");
1333 RNA_def_property_range(prop, 1, 512);
1334 RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering.");
1335 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1337 prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
1338 RNA_def_property_float_sdna(prop, NULL, "xasp");
1339 RNA_def_property_range(prop, 1.0f, 200.0f);
1340 RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
1341 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1343 prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
1344 RNA_def_property_float_sdna(prop, NULL, "yasp");
1345 RNA_def_property_range(prop, 1.0f, 200.0f);
1346 RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
1347 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1349 /* JPEG and AVI JPEG */
1351 prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
1352 RNA_def_property_int_sdna(prop, NULL, "quality");
1353 RNA_def_property_range(prop, 1, 100);
1354 RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
1355 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1359 prop= RNA_def_property(srna, "tiff_bit", PROP_BOOLEAN, PROP_NONE);
1360 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
1361 RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
1362 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1364 /* Cineon and DPX */
1366 prop= RNA_def_property(srna, "cineon_log", PROP_BOOLEAN, PROP_NONE);
1367 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
1368 RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
1369 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1371 prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
1372 RNA_def_property_int_sdna(prop, NULL, "cineonblack");
1373 RNA_def_property_range(prop, 0, 1024);
1374 RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
1375 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1377 prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
1378 RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
1379 RNA_def_property_range(prop, 0, 1024);
1380 RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
1381 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1383 prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
1384 RNA_def_property_float_sdna(prop, NULL, "cineongamma");
1385 RNA_def_property_range(prop, 0.0f, 10.0f);
1386 RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
1387 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1392 prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
1393 RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
1394 RNA_def_property_enum_items(prop, exr_codec_items);
1395 RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
1396 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1398 prop= RNA_def_property(srna, "exr_half", PROP_BOOLEAN, PROP_NONE);
1399 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
1400 RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel");
1401 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1403 prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE);
1404 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF);
1405 RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int zbuffer)");
1406 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1408 prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
1409 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
1410 RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
1411 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1414 #ifdef WITH_OPENJPEG
1417 prop= RNA_def_property(srna, "jpeg_preset", PROP_ENUM, PROP_NONE);
1418 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_preset");
1419 RNA_def_property_enum_items(prop, jp2_preset_items);
1420 RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
1421 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1423 prop= RNA_def_property(srna, "jpeg_depth", PROP_ENUM, PROP_NONE);
1424 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
1425 RNA_def_property_enum_items(prop, jp2_depth_items);
1426 RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
1427 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1429 prop= RNA_def_property(srna, "jpeg_ycc", PROP_BOOLEAN, PROP_NONE);
1430 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
1431 RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
1432 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1438 prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
1439 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
1440 RNA_def_property_enum_items(prop, ffmpeg_format_items);
1441 RNA_def_property_ui_text(prop, "Format", "Output file format");
1442 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1444 prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE);
1445 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec");
1446 RNA_def_property_enum_items(prop, ffmpeg_codec_items);
1447 RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
1448 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1450 prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
1451 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
1452 RNA_def_property_range(prop, 1, 14000);
1453 RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate(kb/s)");
1454 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1456 prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE);
1457 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate");
1458 RNA_def_property_range(prop, 0, 9000);
1459 RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate(kb/s)");
1460 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1462 prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE);
1463 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate");
1464 RNA_def_property_range(prop, 1, 14000);
1465 RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate(kb/s)");
1466 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1468 prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE);
1469 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate");
1470 RNA_def_property_range(prop, 0, 100000000);
1471 RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
1472 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1474 prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE);
1475 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size");
1476 RNA_def_property_range(prop, 0, 100);
1477 RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
1478 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1480 prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE);
1481 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size");
1482 RNA_def_property_range(prop, 0, 2000);
1483 RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
1484 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1486 prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE);
1487 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size");
1488 RNA_def_property_range(prop, 0, 16384);
1489 RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
1490 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1492 prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE);
1493 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT);
1494 RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary.");
1495 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1499 prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
1500 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
1501 RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
1502 RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
1503 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1505 prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
1506 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
1507 RNA_def_property_range(prop, 32, 384);
1508 RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)");
1509 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1511 prop= RNA_def_property(srna, "ffmpeg_multiplex_audio", PROP_BOOLEAN, PROP_NONE);
1512 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_MULTIPLEX_AUDIO);
1513 RNA_def_property_ui_text(prop, "Multiplex Audio", "Interleave audio with the output video");
1514 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1516 prop= RNA_def_property(srna, "ffmpeg_audio_mixrate", PROP_INT, PROP_NONE);
1517 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_mixrate");
1518 RNA_def_property_range(prop, 8000, 192000);
1519 RNA_def_property_ui_text(prop, "Sample", "Audio samplerate(samples/s)");
1520 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1522 prop= RNA_def_property(srna, "ffmpeg_audio_volume", PROP_FLOAT, PROP_NONE);
1523 RNA_def_property_float_sdna(prop, NULL, "ffcodecdata.audio_volume");
1524 RNA_def_property_range(prop, 0.0f, 1.0f);
1525 RNA_def_property_ui_text(prop, "Volume", "Audio volume");
1526 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1530 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
1531 RNA_def_property_int_sdna(prop, NULL, "frs_sec");
1532 RNA_def_property_range(prop, 1, 120);
1533 RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second.");
1534 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1536 prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
1537 RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
1538 RNA_def_property_range(prop, 0.1f, 120.0f);
1539 RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
1540 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1542 prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
1543 RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
1544 RNA_def_property_range(prop, 0.0f, 2.0f);
1545 RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding.");
1546 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1548 prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE);
1549 RNA_def_property_enum_sdna(prop, NULL, "filtertype");
1550 RNA_def_property_enum_items(prop, pixel_filter_items);
1551 RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples.");
1552 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1554 prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
1555 RNA_def_property_float_sdna(prop, NULL, "gauss");
1556 RNA_def_property_range(prop, 0.5f, 1.5f);
1557 RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples.");
1558 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1560 prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
1561 RNA_def_property_enum_sdna(prop, NULL, "alphamode");
1562 RNA_def_property_enum_items(prop, alpha_mode_items);
1563 RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels.");
1564 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1566 prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
1567 RNA_def_property_enum_sdna(prop, NULL, "ocres");
1568 RNA_def_property_enum_items(prop, octree_resolution_items);
1569 RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
1570 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1572 prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
1573 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
1574 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges.");
1575 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1577 prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
1578 RNA_def_property_enum_sdna(prop, NULL, "osa");
1579 RNA_def_property_enum_items(prop, fixed_oversample_items);
1580 RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel.");
1581 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1583 prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
1584 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
1585 RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output.");
1586 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1588 prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
1589 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1590 RNA_def_property_enum_items(prop, field_order_items);
1591 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");
1592 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1594 prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
1595 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
1596 RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
1597 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1599 prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
1600 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
1601 RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
1602 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1604 prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE);
1605 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
1606 RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering.");
1607 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1609 prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE);
1610 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
1611 RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering.");
1612 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1614 prop= RNA_def_property(srna, "render_sss", PROP_BOOLEAN, PROP_NONE);
1615 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
1616 RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering.");
1617 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1619 prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE);
1620 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
1621 RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects.");
1622 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1624 prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE);
1625 RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
1626 RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties.");
1627 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1629 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
1630 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
1631 RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
1632 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1634 prop= RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
1635 RNA_def_property_int_sdna(prop, NULL, "edgeint");
1636 RNA_def_property_range(prop, 0, 255);
1637 RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
1638 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1640 prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
1641 RNA_def_property_float_sdna(prop, NULL, "edgeR");
1642 RNA_def_property_array(prop, 3);
1643 RNA_def_property_ui_text(prop, "Edge Color", "");
1644 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1646 prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
1647 RNA_def_property_int_sdna(prop, NULL, "threads");
1648 RNA_def_property_range(prop, 1, 8);
1649 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
1650 RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
1651 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1653 prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
1654 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1655 RNA_def_property_enum_items(prop, threads_mode_items);
1656 RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
1657 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1659 prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
1660 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
1661 RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
1662 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1664 prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
1665 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
1666 RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
1667 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1669 prop= RNA_def_property(srna, "crop_to_border", PROP_BOOLEAN, PROP_NONE);
1670 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
1671 RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
1672 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1674 prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
1675 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
1676 RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
1677 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1679 prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
1680 RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
1681 RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering.");
1682 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1684 prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
1685 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
1686 RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled.");
1687 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1689 prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
1690 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
1691 RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
1692 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1694 prop= RNA_def_property(srna, "color_management", PROP_BOOLEAN, PROP_NONE);
1695 RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
1696 RNA_def_property_ui_text(prop, "Color Management", "Use color profiles and gamma corrected imaging pipeline");
1697 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_MATERIAL|ND_SHADING, NULL);
1699 prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE);
1700 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
1701 RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
1702 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1704 prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
1705 RNA_def_property_enum_sdna(prop, NULL, "imtype");
1706 RNA_def_property_enum_items(prop, image_type_items);
1707 RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
1708 RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
1709 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1711 prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
1712 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1713 RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");
1714 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1716 prop= RNA_def_property(srna, "free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
1717 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1718 RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory.");
1719 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1721 prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
1722 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
1723 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
1724 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).");
1725 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1727 prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
1728 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
1729 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.");
1730 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1732 prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
1733 RNA_def_property_boolean_sdna(prop, NULL, "bufflag", R_BACKBUF);
1734 RNA_def_property_ui_text(prop, "Back Buffer", "Render backbuffer image");
1735 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1737 prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
1738 RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
1739 RNA_def_property_enum_items(prop, display_mode_items);
1740 RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
1741 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1743 prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
1744 RNA_def_property_string_sdna(prop, NULL, "pic");
1745 RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
1746 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1750 prop= RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
1751 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
1752 RNA_def_property_enum_items(prop, bake_mode_items);
1753 RNA_def_property_ui_text(prop, "Bake Mode", "");
1755 prop= RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
1756 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
1757 RNA_def_property_enum_items(prop, bake_normal_space_items);
1758 RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
1760 prop= RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
1761 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
1762 RNA_def_property_enum_items(prop, bake_aa_items);
1763 RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
1765 prop= RNA_def_property(srna, "bake_active", PROP_BOOLEAN, PROP_NONE);
1766 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
1767 RNA_def_property_ui_text(prop, "Selected to Active", "Bake shading on the surface of selected objects to the active object");
1769 prop= RNA_def_property(srna, "bake_normalized", PROP_BOOLEAN, PROP_NONE);
1770 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
1771 RNA_def_property_ui_text(prop, "Normalized", "");
1772 //"Bake ambient occlusion normalized, without taking into acount material settings"
1773 //"Normalized displacement value to fit the 'Dist' range"
1774 // XXX: Need 1 tooltip here...
1776 prop= RNA_def_property(srna, "bake_clear", PROP_BOOLEAN, PROP_NONE);
1777 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
1778 RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
1780 prop= RNA_def_property(srna, "bake_enable_aa", PROP_BOOLEAN, PROP_NONE);
1781 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
1782 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
1784 prop= RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
1785 RNA_def_property_int_sdna(prop, NULL, "bake_filter");
1786 RNA_def_property_range(prop, 0, 32);
1787 RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter");
1789 prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
1790 RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
1791 RNA_def_property_range(prop, 0.0, 1000.0);
1792 RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units");
1794 prop= RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
1795 RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
1796 RNA_def_property_range(prop, 0.0, 1000.0);
1797 RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)");
1801 prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
1802 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
1803 RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
1804 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1806 prop= RNA_def_property(srna, "stamp_date", PROP_BOOLEAN, PROP_NONE);
1807 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
1808 RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
1809 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1811 prop= RNA_def_property(srna, "stamp_frame", PROP_BOOLEAN, PROP_NONE);
1812 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
1813 RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
1814 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1816 prop= RNA_def_property(srna, "stamp_camera", PROP_BOOLEAN, PROP_NONE);
1817 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
1818 RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
1819 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1821 prop= RNA_def_property(srna, "stamp_scene", PROP_BOOLEAN, PROP_NONE);
1822 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
1823 RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
1824 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1826 prop= RNA_def_property(srna, "stamp_note", PROP_BOOLEAN, PROP_NONE);
1827 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
1828 RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
1829 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1831 prop= RNA_def_property(srna, "stamp_marker", PROP_BOOLEAN, PROP_NONE);
1832 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
1833 RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
1834 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1836 prop= RNA_def_property(srna, "stamp_filename", PROP_BOOLEAN, PROP_NONE);
1837 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
1838 RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata");
1839 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1841 prop= RNA_def_property(srna, "stamp_sequence_strip", PROP_BOOLEAN, PROP_NONE);
1842 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
1843 RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
1844 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1846 prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
1847 RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
1848 RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
1849 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1851 prop= RNA_def_property(srna, "render_stamp", PROP_BOOLEAN, PROP_NONE);
1852 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
1853 RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
1854 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1856 prop= RNA_def_property(srna, "stamp_font_size", PROP_ENUM, PROP_NONE);
1857 RNA_def_property_enum_sdna(prop, NULL, "stamp_font_id");
1858 RNA_def_property_enum_items(prop, stamp_font_size_items);
1859 RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp text");
1860 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1862 prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
1863 RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
1864 RNA_def_property_array(prop, 4);
1865 RNA_def_property_range(prop,0.0,1.0);
1866 RNA_def_property_ui_text(prop, "Stamp Foreground", "Stamp text color");
1867 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1869 prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
1870 RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
1871 RNA_def_property_array(prop, 4);
1872 RNA_def_property_range(prop,0.0,1.0);
1873 RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text");
1874 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1878 prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
1879 RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
1880 RNA_def_property_struct_type(prop, "SceneRenderLayer");
1881 RNA_def_property_ui_text(prop, "Render Layers", "");
1883 prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
1884 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
1885 RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
1886 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1888 prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
1889 RNA_def_property_int_sdna(prop, NULL, "actlay");
1890 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
1891 RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
1892 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1895 prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
1896 RNA_def_property_enum_items(prop, engine_items);
1897 RNA_def_property_enum_funcs(prop, "rna_SceneRenderData_engine_get", "rna_SceneRenderData_engine_set", "rna_SceneRenderData_engine_itemf");
1898 RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering.");
1899 RNA_def_property_update(prop, NC_WINDOW, NULL);
1901 prop= RNA_def_property(srna, "multiple_engines", PROP_BOOLEAN, PROP_NONE);
1902 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_multiple_engines_get", NULL);
1903 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1904 RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available.");
1906 prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
1907 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_use_game_engine_get", NULL);
1908 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1909 RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine.");
1912 void RNA_def_scene(BlenderRNA *brna)
1918 /* Struct definition */
1919 srna= RNA_def_struct(brna, "Scene", "ID");
1920 RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
1921 RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
1922 RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
1924 /* Global Settings */
1925 prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
1926 RNA_def_property_flag(prop, PROP_EDITABLE);
1927 RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene.");
1929 prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
1930 RNA_def_property_flag(prop, PROP_EDITABLE);
1931 RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
1932 RNA_def_property_update(prop, NC_WORLD, NULL);
1934 prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
1935 RNA_def_property_float_sdna(prop, NULL, "cursor");
1936 RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
1937 RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
1938 RNA_def_property_update(prop, NC_WINDOW, NULL);
1941 prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
1942 RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
1943 RNA_def_property_struct_type(prop, "Object");
1944 RNA_def_property_ui_text(prop, "Objects", "");
1945 RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
1948 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
1949 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
1950 RNA_def_property_array(prop, 20);
1951 RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
1952 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
1955 /* Frame Range Stuff */
1956 prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
1957 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1958 RNA_def_property_int_sdna(prop, NULL, "r.cfra");
1959 RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
1960 RNA_def_property_ui_text(prop, "Current Frame", "");
1961 RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
1963 prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
1964 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1965 RNA_def_property_int_sdna(prop, NULL, "r.sfra");
1966 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
1967 RNA_def_property_ui_text(prop, "Start Frame", "");
1968 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1970 prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
1971 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1972 RNA_def_property_int_sdna(prop, NULL, "r.efra");
1973 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
1974 RNA_def_property_ui_text(prop, "End Frame", "");
1975 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1977 prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
1978 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1979 RNA_def_property_int_sdna(prop, NULL, "frame_step");
1980 RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
1981 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1983 /* Preview Range (frame-range for UI playback) */
1984 prop=RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE); /* use_preview_range is not really a separate setting in SDNA */
1985 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1986 RNA_def_property_boolean_funcs(prop, "rna_Scene_use_preview_range_get", "rna_Scene_use_preview_range_set");
1987 RNA_def_property_ui_text(prop, "Use Preview Range", "");
1988 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1990 prop= RNA_def_property(srna, "preview_range_start_frame", PROP_INT, PROP_TIME);
1991 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1992 RNA_def_property_int_sdna(prop, NULL, "r.psfra");
1993 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
1994 RNA_def_property_ui_text(prop, "Preview Range Start Frame", "");
1995 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1997 prop= RNA_def_property(srna, "preview_range_end_frame", PROP_INT, PROP_TIME);
1998 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1999 RNA_def_property_int_sdna(prop, NULL, "r.pefra");
2000 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
2001 RNA_def_property_ui_text(prop, "Preview Range End Frame", "");
2002 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2005 prop= RNA_def_property(srna, "stamp_note", PROP_STRING, PROP_NONE);
2006 RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
2007 RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
2008 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2010 /* Nodes (Compositing) */
2011 prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
2012 RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
2014 prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
2015 RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
2016 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set");
2017 RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree.");
2018 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2021 prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
2022 RNA_def_property_pointer_sdna(prop, NULL, "ed");
2023 RNA_def_property_struct_type(prop, "SequenceEditor");
2024 RNA_def_property_ui_text(prop, "Sequence Editor", "");
2027 prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
2028 RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
2029 RNA_def_property_struct_type(prop, "KeyingSet");
2030 RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene.");
2031 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
2033 prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
2034 RNA_def_property_struct_type(prop, "KeyingSet");
2035 RNA_def_property_flag(prop, PROP_EDITABLE);
2036 RNA_def_property_editable_func(prop, "rna_Scene_active_keying_set_editable");
2037 RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL);
2038 RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
2039 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
2041 prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE);
2042 RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
2043 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");
2044 RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index.");
2045 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
2048 prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
2049 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2050 RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
2051 RNA_def_property_struct_type(prop, "ToolSettings");
2052 RNA_def_property_ui_text(prop, "Tool Settings", "");
2055 prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE);
2056 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2057 RNA_def_property_pointer_sdna(prop, NULL, "unit");
2058 RNA_def_property_struct_type(prop, "UnitSettings");
2059 RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
2062 prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE);
2063 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2064 RNA_def_property_pointer_sdna(prop, NULL, "r");
2065 RNA_def_property_struct_type(prop, "SceneRenderData");
2066 RNA_def_property_ui_text(prop, "Render Data", "");
2069 prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
2070 RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
2071 RNA_def_property_struct_type(prop, "TimelineMarker");
2072 RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
2074 /* Audio Settings */
2075 prop= RNA_def_property(srna, "mute_audio", PROP_BOOLEAN, PROP_NONE);
2076 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_MUTE);
2077 RNA_def_property_ui_text(prop, "Mute Audio", "Play back of audio from Sequence Editor will be muted.");
2078 RNA_def_property_update(prop, NC_SCENE, NULL);
2080 prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
2081 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
2082 RNA_def_property_ui_text(prop, "Sync Audio", "Play back and sync with audio from Sequence Editor.");
2083 RNA_def_property_update(prop, NC_SCENE, NULL);
2085 prop= RNA_def_property(srna, "scrub_audio", PROP_BOOLEAN, PROP_NONE);
2086 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB);
2087 RNA_def_property_ui_text(prop, "Scrub Audio", "Play audio from Sequence Editor while scrubbing.");
2088 RNA_def_property_update(prop, NC_SCENE, NULL);
2091 prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NONE);
2092 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2093 RNA_def_property_pointer_sdna(prop, NULL, "gm");
2094 RNA_def_property_struct_type(prop, "SceneGameData");
2095 RNA_def_property_ui_text(prop, "Game Data", "");
2098 func= RNA_def_function(srna, "statistics", "ED_info_stats_string");
2099 prop= RNA_def_string(func, "statistics", "", 0, "Statistics", "");
2100 RNA_def_function_return(func, prop);
2103 prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
2104 RNA_def_property_pointer_sdna(prop, NULL, "gpd");
2105 RNA_def_property_flag(prop, PROP_EDITABLE);
2106 RNA_def_property_struct_type(prop, "GreasePencil");
2107 RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
2110 rna_def_tool_settings(brna);
2111 rna_def_unit_settings(brna);
2112 rna_def_scene_render_data(brna);
2113 rna_def_scene_game_data(brna);
2114 rna_def_scene_render_layer(brna);
2117 RNA_api_scene(srna);