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>
47 EnumPropertyItem snap_mode_items[] = {
48 {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
49 {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
50 {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
51 {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
52 {0, NULL, 0, NULL, NULL}};
54 EnumPropertyItem prop_mode_items[] ={
55 {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
56 {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
57 {PROP_ROOT, "ROOT", 0, "Root", ""},
58 {PROP_SHARP, "SHARP", 0, "Sharp", ""},
59 {PROP_LIN, "LINEAR", 0, "Linear", ""},
60 {PROP_CONST, "CONSTANT", 0, "Constant", ""},
61 {PROP_RANDOM, "RANDOM", 0, "Random", ""},
62 {0, NULL, 0, NULL, NULL}};
67 #include "DNA_anim_types.h"
68 #include "DNA_node_types.h"
69 #include "DNA_object_types.h"
71 #include "BKE_context.h"
72 #include "BKE_global.h"
73 #include "BKE_scene.h"
75 #include "BKE_pointcache.h"
77 #include "BLI_threads.h"
82 #include "RE_pipeline.h"
84 static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
86 ListBaseIterator *internal= iter->internal;
88 /* we are actually iterating a Base list, so override get */
89 return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
92 static PointerRNA rna_Scene_active_object_get(PointerRNA *ptr)
94 Scene *scene= (Scene*)ptr->data;
95 return rna_pointer_inherit_refine(ptr, &RNA_Object, scene->basact ? scene->basact->object : NULL);
98 static void rna_Scene_active_object_set(PointerRNA *ptr, PointerRNA value)
100 Scene *scene= (Scene*)ptr->data;
102 scene->basact= object_in_scene((Object*)value.data, scene);
108 static int layer_set(int lay, const int *values)
112 /* ensure we always have some layer selected */
120 for(i=0; i<20; i++) {
121 if(values[i]) lay |= (1<<i);
128 static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
130 Scene *scene= (Scene*)ptr->data;
132 scene->lay= layer_set(scene->lay, values);
135 static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
137 Scene *data= (Scene*)ptr->data;
138 CLAMP(value, 1, data->r.efra);
142 static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
144 Scene *data= (Scene*)ptr->data;
145 CLAMP(value, data->r.sfra, MAXFRAME);
149 static int rna_Scene_use_preview_range_get(PointerRNA *ptr)
151 Scene *data= (Scene*)ptr->data;
153 /* this is simply overloaded to assume that preview-range
154 * start frame cannot be less than 1 when on,
155 * so psfra=0 means 'off'
157 return (data->r.psfra != 0);
160 static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
162 Scene *data= (Scene*)ptr->data;
164 /* if enable, copy range from render-range, otherwise just clear */
166 data->r.psfra= data->r.sfra;
167 data->r.pefra= data->r.efra;
174 static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
176 Scene *data= (Scene*)ptr->data;
178 /* check if enabled already */
179 if (data->r.psfra == 0) {
180 /* set end of preview range to end frame, then clamp as per normal */
181 // TODO: or just refuse to set instead?
182 data->r.pefra= data->r.efra;
185 /* now set normally */
186 CLAMP(value, 1, data->r.pefra);
187 data->r.psfra= value;
190 static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
192 Scene *data= (Scene*)ptr->data;
194 /* check if enabled already */
195 if (data->r.psfra == 0) {
196 /* set start of preview range to start frame, then clamp as per normal */
197 // TODO: or just refuse to set instead?
198 data->r.psfra= data->r.sfra;
201 /* now set normally */
202 CLAMP(value, data->r.psfra, MAXFRAME);
203 data->r.pefra= value;
206 static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
208 //Scene *scene= ptr->id.data;
209 //ED_update_for_newframe(C);
212 static int rna_Scene_active_keying_set_editable(PointerRNA *ptr)
214 Scene *scene= (Scene *)ptr->data;
216 /* only editable if there are some Keying Sets to change to */
217 return (scene->keyingsets.first != NULL);
220 static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
222 Scene *scene= (Scene *)ptr->data;
223 return rna_pointer_inherit_refine(ptr, &RNA_KeyingSet, BLI_findlink(&scene->keyingsets, scene->active_keyingset-1));
226 static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
228 Scene *scene= (Scene *)ptr->data;
229 KeyingSet *ks= (KeyingSet*)value.data;
230 scene->active_keyingset= BLI_findindex(&scene->keyingsets, ks) + 1;
233 static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
235 Scene *scene= (Scene *)ptr->data;
236 return MAX2(scene->active_keyingset-1, 0);
239 static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
241 Scene *scene= (Scene *)ptr->data;
242 scene->active_keyingset= value+1;
245 static void rna_Scene_active_keying_set_index_range(PointerRNA *ptr, int *min, int *max)
247 Scene *scene= (Scene *)ptr->data;
250 *max= BLI_countlist(&scene->keyingsets)-1;
255 static char *rna_SceneRenderData_path(PointerRNA *ptr)
257 return BLI_sprintfN("render_data");
260 static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
262 RenderData *rd= (RenderData*)ptr->data;
264 if(rd->mode & R_FIXED_THREADS)
267 return BLI_system_thread_count();
270 static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
272 RenderData *rd= (RenderData*)ptr->data;
274 return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
277 static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
279 RenderData *rd= (RenderData*)ptr->data;
283 ffmpeg_verify_image_type(rd);
287 void rna_SceneRenderData_jpeg2k_preset_update(RenderData *rd)
289 rd->subimtype &= ~(R_JPEG2K_12BIT|R_JPEG2K_16BIT | R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS);
291 switch(rd->jp2_depth) {
293 case 12: rd->subimtype |= R_JPEG2K_12BIT; break;
294 case 16: rd->subimtype |= R_JPEG2K_16BIT; break;
297 switch(rd->jp2_preset) {
298 case 1: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
299 case 2: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
300 case 3: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
301 case 4: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
302 case 5: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
303 case 6: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
304 case 7: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
309 static void rna_SceneRenderData_jpeg2k_preset_set(PointerRNA *ptr, int value)
311 RenderData *rd= (RenderData*)ptr->data;
312 rd->jp2_preset= value;
313 rna_SceneRenderData_jpeg2k_preset_update(rd);
316 static void rna_SceneRenderData_jpeg2k_depth_set(PointerRNA *ptr, int value)
318 RenderData *rd= (RenderData*)ptr->data;
319 rd->jp2_depth= value;
320 rna_SceneRenderData_jpeg2k_preset_update(rd);
324 static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
326 RenderData *rd= (RenderData*)ptr->data;
330 static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
332 RenderData *rd= (RenderData*)ptr->data;
336 static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
338 RenderData *rd= (RenderData*)ptr->data;
341 *max= BLI_countlist(&rd->layers)-1;
345 static void rna_SceneRenderData_engine_set(PointerRNA *ptr, int value)
347 RenderData *rd= (RenderData*)ptr->data;
348 RenderEngineType *type= BLI_findlink(&R_engines, value);
351 BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
354 static EnumPropertyItem *rna_SceneRenderData_engine_itemf(bContext *C, PointerRNA *ptr, int *free)
356 RenderEngineType *type;
357 EnumPropertyItem *item= NULL;
358 EnumPropertyItem tmp = {0, "", 0, "", ""};
361 for(type=R_engines.first; type; type=type->next, a++) {
363 tmp.identifier= type->idname;
364 tmp.name= type->name;
365 RNA_enum_item_add(&item, &totitem, &tmp);
368 RNA_enum_item_end(&item, &totitem);
374 static int rna_SceneRenderData_engine_get(PointerRNA *ptr)
376 RenderData *rd= (RenderData*)ptr->data;
377 RenderEngineType *type;
380 for(type=R_engines.first; type; type=type->next, a++)
381 if(strcmp(type->idname, rd->engine) == 0)
387 static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
389 Scene *scene= (Scene*)ptr->id.data;
390 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
392 BLI_strncpy(rl->name, value, sizeof(rl->name));
394 if(scene->nodetree) {
396 int index= BLI_findindex(&scene->r.layers, rl);
398 for(node= scene->nodetree->nodes.first; node; node= node->next) {
399 if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
400 if(node->custom1==index)
401 BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
407 static int rna_SceneRenderData_multiple_engines_get(PointerRNA *ptr)
409 return (BLI_countlist(&R_engines) > 1);
412 static int rna_SceneRenderData_use_game_engine_get(PointerRNA *ptr)
414 RenderData *rd= (RenderData*)ptr->data;
415 RenderEngineType *type;
417 for(type=R_engines.first; type; type=type->next)
418 if(strcmp(type->idname, rd->engine) == 0)
419 return (type->flag & RE_GAME);
424 static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
426 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
427 rl->lay= layer_set(rl->lay, values);
430 static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
432 Scene *scene= (Scene*)ptr->id.data;
435 ntreeCompositForceHidden(scene->nodetree, scene);
438 static void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
440 Scene *scene= (Scene*)ptr->data;
442 scene->use_nodes= value;
443 if(scene->use_nodes && scene->nodetree==NULL)
444 ED_node_composit_default(scene);
447 static void rna_Physics_update(bContext *C, PointerRNA *ptr)
449 Scene *scene= (Scene*)ptr->id.data;
452 for(base = scene->base.first; base; base=base->next)
453 BKE_ptcache_object_reset(scene, base->object, PTCACHE_RESET_DEPSGRAPH);
457 static void rna_def_transform_orientation(BlenderRNA *brna)
462 int matrix_dimsize[]= {3, 3};
464 srna= RNA_def_struct(brna, "TransformOrientation", NULL);
466 prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
467 RNA_def_property_float_sdna(prop, NULL, "mat");
468 RNA_def_property_multi_array(prop, 2, matrix_dimsize);
470 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
471 RNA_def_property_string_sdna(prop, NULL, "name");
472 RNA_def_struct_name_property(srna, prop);
475 static void rna_def_tool_settings(BlenderRNA *brna)
480 static EnumPropertyItem uv_select_mode_items[] = {
481 {UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode."},
482 {UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode."},
483 {UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode."},
484 {UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode."},
485 {0, NULL, 0, NULL, NULL}};
487 static EnumPropertyItem mesh_select_mode_items[] = {
488 {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
489 {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
490 {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
491 {0, NULL, 0, NULL, NULL}};
493 static EnumPropertyItem snap_element_items[] = {
494 {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
495 {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
496 {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
497 {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
498 {0, NULL, 0, NULL, NULL}};
500 static EnumPropertyItem auto_key_items[] = {
501 {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
502 {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
503 {0, NULL, 0, NULL, NULL}};
505 static EnumPropertyItem proportional_editing_items[] = {
506 {PROP_EDIT_OFF, "DISABLED", 0, "Disable", ""},
507 {PROP_EDIT_ON, "ENABLED", 0, "Enable", ""},
508 {PROP_EDIT_CONNECTED, "CONNECTED", 0, "Connected", ""},
509 {0, NULL, 0, NULL, NULL}};
511 srna= RNA_def_struct(brna, "ToolSettings", NULL);
512 RNA_def_struct_ui_text(srna, "Tool Settings", "");
514 prop= RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
515 RNA_def_property_struct_type(prop, "Sculpt");
516 RNA_def_property_ui_text(prop, "Sculpt", "");
518 prop= RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
519 RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
520 RNA_def_property_ui_text(prop, "Vertex Paint", "");
522 prop= RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE);
523 RNA_def_property_pointer_sdna(prop, NULL, "wpaint");
524 RNA_def_property_ui_text(prop, "Weight Paint", "");
526 prop= RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE);
527 RNA_def_property_pointer_sdna(prop, NULL, "imapaint");
528 RNA_def_property_ui_text(prop, "Image Paint", "");
530 prop= RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
531 RNA_def_property_pointer_sdna(prop, NULL, "particle");
532 RNA_def_property_ui_text(prop, "Particle Edit", "");
535 prop= RNA_def_property(srna, "proportional_editing", PROP_ENUM, PROP_NONE);
536 RNA_def_property_enum_sdna(prop, NULL, "proportional");
537 RNA_def_property_enum_items(prop, proportional_editing_items);
538 RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
539 RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
541 prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
542 RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
543 RNA_def_property_enum_items(prop, prop_mode_items);
544 RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
545 RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
547 prop= RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
548 RNA_def_property_float_sdna(prop, NULL, "normalsize");
549 RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view.");
550 RNA_def_property_range(prop, 0.00001, 1000.0);
551 RNA_def_property_ui_range(prop, 0.01, 10.0, 0.1, 2);
552 RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
554 prop= RNA_def_property(srna, "automerge_editing", PROP_BOOLEAN, PROP_NONE);
555 RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
556 RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location.");
558 prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
559 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
560 RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
561 RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
563 prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
564 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
565 RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
566 RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
568 prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
569 RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
570 RNA_def_property_enum_items(prop, snap_element_items);
571 RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
573 prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
574 RNA_def_property_enum_sdna(prop, NULL, "snap_target");
575 RNA_def_property_enum_items(prop, snap_mode_items);
576 RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
578 prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
579 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
580 RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
581 RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
583 prop= RNA_def_property(srna, "snap_project", PROP_BOOLEAN, PROP_NONE);
584 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
585 RNA_def_property_ui_text(prop, "Project Individual Elements", "DOC_BROKEN");
586 RNA_def_property_ui_icon(prop, ICON_ROTATECOLLECTION, 0);
589 prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
590 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
591 RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
593 prop= RNA_def_property(srna, "autokey_mode", PROP_ENUM, PROP_NONE);
594 RNA_def_property_enum_sdna(prop, NULL, "autokey_mode");
595 RNA_def_property_enum_items(prop, auto_key_items);
596 RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
598 prop= RNA_def_property(srna, "record_with_nla", PROP_BOOLEAN, PROP_NONE);
599 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
600 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.");
603 prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
604 RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
605 RNA_def_property_enum_items(prop, uv_select_mode_items);
606 RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
608 prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
609 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
610 RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
611 RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
613 prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
614 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
615 RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
618 prop= RNA_def_property(srna, "mesh_selection_mode", PROP_ENUM, PROP_NONE);
619 RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
620 RNA_def_property_enum_items(prop, mesh_select_mode_items);
621 RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Mesh selection and display mode.");
623 prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);
624 RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
625 RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
629 static void rna_def_unit_settings(BlenderRNA *brna)
634 static EnumPropertyItem unit_systems[] = {
635 {USER_UNIT_NONE, "NONE", 0, "None", ""},
636 {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
637 {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
638 {0, NULL, 0, NULL, NULL}};
640 srna= RNA_def_struct(brna, "UnitSettings", NULL);
641 RNA_def_struct_ui_text(srna, "Unit Settings", "");
644 prop= RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
645 RNA_def_property_enum_items(prop, unit_systems);
646 RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display.");
647 RNA_def_property_update(prop, NC_WINDOW, NULL);
649 prop= RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
650 RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions.");
651 RNA_def_property_range(prop, 0.00001, 100000.0);
652 RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
653 RNA_def_property_update(prop, NC_WINDOW, NULL);
655 prop= RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
656 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT);
657 RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs.");
658 RNA_def_property_update(prop, NC_WINDOW, NULL);
661 void rna_def_render_layer_common(StructRNA *srna, int scene)
665 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
666 if(scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
667 else RNA_def_property_string_sdna(prop, NULL, "name");
668 RNA_def_property_ui_text(prop, "Name", "Render layer name.");
669 RNA_def_struct_name_property(srna, prop);
670 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
671 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
673 prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
674 RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
675 RNA_def_property_struct_type(prop, "Material");
676 RNA_def_property_flag(prop, PROP_EDITABLE);
677 RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
678 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
679 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
681 prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
682 RNA_def_property_pointer_sdna(prop, NULL, "light_override");
683 RNA_def_property_struct_type(prop, "Group");
684 RNA_def_property_flag(prop, PROP_EDITABLE);
685 RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
686 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
687 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
690 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
691 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
692 RNA_def_property_array(prop, 20);
693 RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
694 if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
695 else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
696 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
697 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
699 prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_LAYER);
700 RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
701 RNA_def_property_array(prop, 20);
702 RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
703 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
704 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
707 prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
708 RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
709 RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
710 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
711 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
713 prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE);
714 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
715 RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
716 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
717 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
719 prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE);
720 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
721 RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
722 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
723 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
725 prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE);
726 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
727 RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
728 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
729 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
731 prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE);
732 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
733 RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
734 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
735 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
737 prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
738 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
739 RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
740 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
741 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
743 prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE);
744 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
745 RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
746 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
747 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
749 prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
750 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
751 RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
752 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
753 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
755 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
756 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
757 RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
758 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
759 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
761 prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE);
762 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
763 RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
764 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
765 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
768 prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
769 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
770 RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
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_z", PROP_BOOLEAN, PROP_NONE);
775 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
776 RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
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_vector", PROP_BOOLEAN, PROP_NONE);
781 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
782 RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
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);
786 prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
787 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
788 RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
789 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
790 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
792 prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
793 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
794 RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
795 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
796 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
798 prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
799 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
800 RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
801 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
802 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
804 prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
805 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
806 RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
807 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
808 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
810 prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
811 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
812 RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
813 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
814 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
816 prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
817 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
818 RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
819 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
820 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
822 prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
823 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
824 RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
825 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
826 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
828 prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
829 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
830 RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
831 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
832 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
834 prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
835 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
836 RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
837 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
838 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
840 prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
841 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
842 RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass.");
843 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
844 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
846 prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
847 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
848 RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass.");
849 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
850 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
852 prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
853 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
854 RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
855 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
856 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
858 prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
859 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
860 RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
861 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
862 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
864 prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
865 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
866 RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
867 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
868 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
870 prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
871 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
872 RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined.");
873 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
874 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
876 prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
877 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
878 RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined.");
879 if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
880 else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
883 static void rna_def_scene_game_data(BlenderRNA *brna)
888 static EnumPropertyItem framing_types_items[] ={
889 {SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", "Show the entire viewport in the display window, using bar horizontally or vertically"},
890 {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", "Show the entire viewport in the display window, viewing more horizontally or vertically"},
891 {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
892 {0, NULL, 0, NULL, NULL}};
894 static EnumPropertyItem dome_modes_items[] ={
895 {DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
896 {DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""},
897 {DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
898 {DOME_ENVMAP, "ENVMAP", 0, "Cube Map", ""},
899 {DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""},
900 {0, NULL, 0, NULL, NULL}};
902 static EnumPropertyItem stereo_modes_items[] ={
903 // {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
904 {STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
905 {STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
906 {STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
907 {STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""},
908 {STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""},
909 {STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
910 // {STEREO_DOME, "DOME", 0, "Dome", ""},
911 {0, NULL, 0, NULL, NULL}};
913 static EnumPropertyItem stereo_items[] ={
914 {STEREO_NOSTEREO, "NONE", 0, "None", ""},
915 {STEREO_ENABLED, "STEREO", 0, "Stereo", ""},
916 {STEREO_DOME, "DOME", 0, "Dome", ""},
917 {0, NULL, 0, NULL, NULL}};
919 static EnumPropertyItem physics_engine_items[] = {
920 {WOPHY_NONE, "NONE", 0, "None", ""},
921 //{WOPHY_ENJI, "ENJI", 0, "Enji", ""},
922 //{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""},
923 //{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""},
924 //{WOPHY_ODE, "ODE", 0, "ODE", ""},
925 {WOPHY_BULLET, "BULLET", 0, "Bullet", ""},
926 {0, NULL, 0, NULL, NULL}};
928 static EnumPropertyItem material_items[] ={
929 {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials."},
930 {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials."},
931 {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders."},
932 {0, NULL, 0, NULL, NULL}};
934 srna= RNA_def_struct(brna, "SceneGameData", NULL);
935 RNA_def_struct_sdna(srna, "GameData");
936 RNA_def_struct_nested(brna, srna, "Scene");
937 RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablock.");
939 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
940 RNA_def_property_int_sdna(prop, NULL, "xplay");
941 RNA_def_property_range(prop, 4, 10000);
942 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen.");
943 RNA_def_property_update(prop, NC_SCENE, NULL);
945 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
946 RNA_def_property_int_sdna(prop, NULL, "yplay");
947 RNA_def_property_range(prop, 4, 10000);
948 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen.");
949 RNA_def_property_update(prop, NC_SCENE, NULL);
951 prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
952 RNA_def_property_int_sdna(prop, NULL, "depth");
953 RNA_def_property_range(prop, 8, 32);
954 RNA_def_property_ui_text(prop, "Bits", "Displays bit depth of full screen display.");
955 RNA_def_property_update(prop, NC_SCENE, NULL);
957 // Do we need it here ? (since we already have it in World
958 prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
959 RNA_def_property_int_sdna(prop, NULL, "freqplay");
960 RNA_def_property_range(prop, 4, 2000);
961 RNA_def_property_ui_text(prop, "Freq", "Displays clock frequency of fullscreen display.");
962 RNA_def_property_update(prop, NC_SCENE, NULL);
964 prop= RNA_def_property(srna, "fullscreen", PROP_BOOLEAN, PROP_NONE);
965 RNA_def_property_boolean_sdna(prop, NULL, "fullscreen", 1.0);
966 RNA_def_property_ui_text(prop, "Fullscreen", "Starts player in a new fullscreen display");
967 RNA_def_property_update(prop, NC_SCENE, NULL);
970 prop= RNA_def_property(srna, "framing_type", PROP_ENUM, PROP_NONE);
971 RNA_def_property_enum_sdna(prop, NULL, "framing.type");
972 RNA_def_property_enum_items(prop, framing_types_items);
973 RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want.");
974 RNA_def_property_update(prop, NC_SCENE, NULL);
976 prop= RNA_def_property(srna, "framing_color", PROP_FLOAT, PROP_COLOR);
977 RNA_def_property_float_sdna(prop, NULL, "framing.col");
978 RNA_def_property_array(prop, 3);
979 RNA_def_property_ui_text(prop, "", "");
980 RNA_def_property_update(prop, NC_SCENE, NULL);
983 prop= RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE);
984 RNA_def_property_enum_sdna(prop, NULL, "stereoflag");
985 RNA_def_property_enum_items(prop, stereo_items);
986 RNA_def_property_ui_text(prop, "Stereo Options", "");
987 RNA_def_property_update(prop, NC_SCENE, NULL);
989 prop= RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
990 RNA_def_property_enum_sdna(prop, NULL, "stereomode");
991 RNA_def_property_enum_items(prop, stereo_modes_items);
992 RNA_def_property_ui_text(prop, "Stereo Mode", "");
993 RNA_def_property_update(prop, NC_SCENE, NULL);
996 prop= RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
997 RNA_def_property_enum_sdna(prop, NULL, "dome.mode");
998 RNA_def_property_enum_items(prop, dome_modes_items);
999 RNA_def_property_ui_text(prop, "Dome Mode", "");
1000 RNA_def_property_update(prop, NC_SCENE, NULL);
1002 prop= RNA_def_property(srna, "dome_tesselation", PROP_INT, PROP_NONE);
1003 RNA_def_property_int_sdna(prop, NULL, "dome.res");
1004 RNA_def_property_ui_range(prop, 1, 8, 1, 1);
1005 RNA_def_property_ui_text(prop, "Tesselation", "Tesselation level - check the generated mesh in wireframe mode");
1006 RNA_def_property_update(prop, NC_SCENE, NULL);
1008 prop= RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP_NONE);
1009 RNA_def_property_float_sdna(prop, NULL, "dome.resbuf");
1010 RNA_def_property_ui_range(prop, 0.1, 1.0, 0.1, 0.1);
1011 RNA_def_property_ui_text(prop, "Buffer Resolution", "Buffer Resolution - decrease it to increase speed");
1012 RNA_def_property_update(prop, NC_SCENE, NULL);
1014 prop= RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE);
1015 RNA_def_property_int_sdna(prop, NULL, "dome.angle");
1016 RNA_def_property_ui_range(prop, 90, 250, 1, 1);
1017 RNA_def_property_ui_text(prop, "Angle", "Field of View of the Dome - it only works in mode Fisheye and Truncated");
1018 RNA_def_property_update(prop, NC_SCENE, NULL);
1020 prop= RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE);
1021 RNA_def_property_int_sdna(prop, NULL, "dome.tilt");
1022 RNA_def_property_ui_range(prop, -180, 180, 1, 1);
1023 RNA_def_property_ui_text(prop, "Tilt", "Camera rotation in horizontal axis");
1024 RNA_def_property_update(prop, NC_SCENE, NULL);
1026 prop= RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE);
1027 RNA_def_property_pointer_sdna(prop, NULL, "dome.warptext");
1028 RNA_def_property_struct_type(prop, "Text");
1029 RNA_def_property_flag(prop, PROP_EDITABLE);
1030 RNA_def_property_ui_text(prop, "Warp Data", "Custom Warp Mesh data file");
1031 RNA_def_property_update(prop, NC_SCENE, NULL);
1034 prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
1035 RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
1036 RNA_def_property_enum_items(prop, physics_engine_items);
1037 RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
1038 RNA_def_property_update(prop, NC_SCENE, NULL);
1040 prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
1041 RNA_def_property_float_sdna(prop, NULL, "gravity");
1042 RNA_def_property_range(prop, 0.0, 25.0);
1043 RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
1044 RNA_def_property_update(prop, NC_SCENE, NULL);
1046 prop= RNA_def_property(srna, "occlusion_culling_resolution", PROP_FLOAT, PROP_NONE);
1047 RNA_def_property_float_sdna(prop, NULL, "occlusionRes");
1048 RNA_def_property_range(prop, 128.0, 1024.0);
1049 RNA_def_property_ui_text(prop, "Occlusion Resolution", "The size of the occlusion buffer in pixel, use higher value for better precsion (slower)");
1050 RNA_def_property_update(prop, NC_SCENE, NULL);
1052 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
1053 RNA_def_property_int_sdna(prop, NULL, "ticrate");
1054 RNA_def_property_ui_range(prop, 1, 60, 1, 1);
1055 RNA_def_property_range(prop, 1, 250);
1056 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.");
1057 RNA_def_property_update(prop, NC_SCENE, NULL);
1059 prop= RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
1060 RNA_def_property_int_sdna(prop, NULL, "maxlogicstep");
1061 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
1062 RNA_def_property_range(prop, 1, 5);
1063 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");
1064 RNA_def_property_update(prop, NC_SCENE, NULL);
1066 prop= RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
1067 RNA_def_property_int_sdna(prop, NULL, "maxphystep");
1068 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
1069 RNA_def_property_range(prop, 1, 5);
1070 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");
1071 RNA_def_property_update(prop, NC_SCENE, NULL);
1073 prop= RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
1074 RNA_def_property_int_sdna(prop, NULL, "physubstep");
1075 RNA_def_property_ui_range(prop, 1, 5, 1, 1);
1076 RNA_def_property_range(prop, 1, 5);
1077 RNA_def_property_ui_text(prop, "Physics Sub Steps", "Sets the number of simulation substep per physic timestep, higher value give better physics precision");
1078 RNA_def_property_update(prop, NC_SCENE, NULL);
1081 prop= RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
1082 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 5)); //XXX mode hardcoded // WO_DBVT_CULLING
1083 RNA_def_property_ui_text(prop, "DBVT culling", "Use optimized Bullet DBVT tree for view frustrum and occlusion culling");
1084 RNA_def_property_update(prop, NC_SCENE, NULL);
1086 // not used // deprecated !!!!!!!!!!!!!
1087 prop= RNA_def_property(srna, "activity_culling", PROP_BOOLEAN, PROP_NONE);
1088 RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 3)); //XXX mode hardcoded
1089 RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is enabled");
1090 RNA_def_property_update(prop, NC_SCENE, NULL);
1092 // not used // deprecated !!!!!!!!!!!!!
1093 prop= RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
1094 RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
1095 RNA_def_property_range(prop, 0.0, 1000.0);
1096 RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled");
1097 RNA_def_property_update(prop, NC_SCENE, NULL);
1100 prop= RNA_def_property(srna, "all_frames", PROP_BOOLEAN, PROP_NONE);
1101 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
1102 RNA_def_property_ui_text(prop, "All Frames", "Render as many frames as possible, rather than respecting framerate.");
1103 RNA_def_property_update(prop, NC_SCENE, NULL);
1105 prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
1106 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS);
1107 RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs.");
1108 RNA_def_property_update(prop, NC_SCENE, NULL);
1110 prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
1111 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
1112 RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs.");
1113 RNA_def_property_update(prop, NC_SCENE, NULL);
1115 prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
1116 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
1117 RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions.");
1118 RNA_def_property_update(prop, NC_SCENE, NULL);
1120 prop= RNA_def_property(srna, "display_lists", PROP_BOOLEAN, PROP_NONE);
1121 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS);
1122 RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU.");
1123 RNA_def_property_update(prop, NC_SCENE, NULL);
1125 prop= RNA_def_property(srna, "deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
1126 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS);
1127 RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API.");
1128 RNA_def_property_update(prop, NC_SCENE, NULL);
1131 prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
1132 RNA_def_property_enum_sdna(prop, NULL, "matmode");
1133 RNA_def_property_enum_items(prop, material_items);
1134 RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering.");
1135 RNA_def_property_update(prop, NC_SCENE, NULL);
1137 prop= RNA_def_property(srna, "glsl_lights", PROP_BOOLEAN, PROP_NONE);
1138 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
1139 RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering.");
1140 RNA_def_property_update(prop, NC_SCENE, NULL);
1142 prop= RNA_def_property(srna, "glsl_shaders", PROP_BOOLEAN, PROP_NONE);
1143 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
1144 RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering.");
1145 RNA_def_property_update(prop, NC_SCENE, NULL);
1147 prop= RNA_def_property(srna, "glsl_shadows", PROP_BOOLEAN, PROP_NONE);
1148 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
1149 RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering.");
1150 RNA_def_property_update(prop, NC_SCENE, NULL);
1152 prop= RNA_def_property(srna, "glsl_ramps", PROP_BOOLEAN, PROP_NONE);
1153 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
1154 RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering.");
1155 RNA_def_property_update(prop, NC_SCENE, NULL);
1157 prop= RNA_def_property(srna, "glsl_nodes", PROP_BOOLEAN, PROP_NONE);
1158 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
1159 RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering.");
1160 RNA_def_property_update(prop, NC_SCENE, NULL);
1162 prop= RNA_def_property(srna, "glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
1163 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
1164 RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering.");
1165 RNA_def_property_update(prop, NC_SCENE, NULL);
1168 static void rna_def_scene_render_layer(BlenderRNA *brna)
1172 srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
1173 RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
1175 rna_def_render_layer_common(srna, 1);
1178 static void rna_def_scene_render_data(BlenderRNA *brna)
1183 static EnumPropertyItem pixel_filter_items[] ={
1184 {R_FILTER_BOX, "BOX", 0, "Box", ""},
1185 {R_FILTER_TENT, "TENT", 0, "Tent", ""},
1186 {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", ""},
1187 {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", ""},
1188 {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", ""},
1189 {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", ""},
1190 {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", ""},
1191 {0, NULL, 0, NULL, NULL}};
1193 static EnumPropertyItem alpha_mode_items[] ={
1194 {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
1195 {R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
1196 {R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
1197 {0, NULL, 0, NULL, NULL}};
1199 static EnumPropertyItem color_mode_items[] ={
1200 {R_PLANESBW, "BW", 0, "BW", "Images are saved with BW (grayscale) data"},
1201 {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
1202 {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
1203 {0, NULL, 0, NULL, NULL}};
1205 static EnumPropertyItem display_mode_items[] ={
1206 {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
1207 {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
1208 {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
1209 {0, NULL, 0, NULL, NULL}};
1212 static EnumPropertyItem bake_mode_items[] ={
1213 {RE_BAKE_ALL, "FULL", 0, "Full Render", ""},
1214 {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", ""},
1215 {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", ""},
1216 {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", ""},
1217 {RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", ""},
1218 {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", ""},
1219 {0, NULL, 0, NULL, NULL}};
1221 static EnumPropertyItem bake_normal_space_items[] ={
1222 {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", ""},
1223 {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", ""},
1224 {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", ""},
1225 {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
1226 {0, NULL, 0, NULL, NULL}};
1228 static EnumPropertyItem bake_aa_items[] ={
1229 {5, "AA_5", 0, "5", ""},
1230 {8, "AA_8", 0, "8", ""},
1231 {11, "AA_11", 0, "11", ""},
1232 {16, "AA_16", 0, "16", ""},
1233 {0, NULL, 0, NULL, NULL}};
1235 static EnumPropertyItem octree_resolution_items[] = {
1236 {64, "OCTREE_RES_64", 0, "64", ""},
1237 {128, "OCTREE_RES_128", 0, "128", ""},
1238 {256, "OCTREE_RES_256", 0, "256", ""},
1239 {512, "OCTREE_RES_512", 0, "512", ""},
1240 {0, NULL, 0, NULL, NULL}};
1242 static EnumPropertyItem raytrace_structure_items[] = {
1243 {R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", ""},
1244 {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure."},
1245 {R_RAYSTRUCTURE_BLIBVH, "BLIBVH", 0, "BLI BVH", "Use BLI K-Dop BVH.c"},
1246 {R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", ""},
1247 {R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", ""},
1248 {R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", ""},
1249 {0, NULL, 0, NULL, NULL}
1252 static EnumPropertyItem fixed_oversample_items[] = {
1253 {5, "OVERSAMPLE_5", 0, "5", ""},
1254 {8, "OVERSAMPLE_8", 0, "8", ""},
1255 {11, "OVERSAMPLE_11", 0, "11", ""},
1256 {16, "OVERSAMPLE_16", 0, "16", ""},
1257 {0, NULL, 0, NULL, NULL}};
1259 static EnumPropertyItem field_order_items[] = {
1260 {0, "FIELDS_EVENFIRST", 0, "Even", "Even Fields First"},
1261 {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Odd", "Odd Fields First"},
1262 {0, NULL, 0, NULL, NULL}};
1264 static EnumPropertyItem threads_mode_items[] = {
1265 {0, "THREADS_AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
1266 {R_FIXED_THREADS, "THREADS_FIXED", 0, "Fixed", "Manually determine the number of threads"},
1267 {0, NULL, 0, NULL, NULL}};
1269 static EnumPropertyItem stamp_font_size_items[] = {
1270 {1, "STAMP_FONT_TINY", 0, "Tiny", ""},
1271 {2, "STAMP_FONT_SMALL", 0, "Small", ""},
1272 {3, "STAMP_FONT_MEDIUM", 0, "Medium", ""},
1273 {0, "STAMP_FONT_LARGE", 0, "Large", ""},
1274 {4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
1275 {0, NULL, 0, NULL, NULL}};
1277 static EnumPropertyItem image_type_items[] = {
1278 {0, "", 0, "Image", NULL},
1279 {R_PNG, "PNG", ICON_FILE_IMAGE, "PNG", ""},
1280 {R_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", ""},
1281 #ifdef WITH_OPENJPEG
1282 {R_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", ""},
1284 {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", ""},
1285 {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", ""},
1286 {R_RAWTGA, "RAWTARGA", ICON_FILE_IMAGE, "Targa Raw", ""},
1287 //{R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", ""}, // XXX not yet implemented
1288 {R_HAMX, "HAMX", ICON_FILE_IMAGE, "HamX", ""},
1289 {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", ""},
1290 {0, "", 0, " ", NULL},
1292 {R_OPENEXR, "OPENEXR", ICON_FILE_IMAGE, "OpenEXR", ""},
1293 {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", ""},
1295 {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", ""}, // XXX only with G.have_libtiff
1296 {R_RADHDR, "RADHDR", ICON_FILE_IMAGE, "Radiance HDR", ""},
1297 {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", ""},
1298 {R_DPX, "DPX", ICON_FILE_IMAGE, "DPX", ""},
1299 {0, "", 0, "Movie", NULL},
1300 {R_AVIRAW, "AVIRAW", ICON_FILE_MOVIE, "AVI Raw", ""},
1301 {R_AVIJPEG, "AVIJPEG", ICON_FILE_MOVIE, "AVI JPEG", ""},
1303 {R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", ""},
1305 #ifdef WITH_QUICKTIME
1306 {R_QUICKTIME, "QUICKTIME", ICON_FILE_MOVIE, "QuickTime", ""},
1309 {R_MOVIE, "MOVIE", ICON_FILE_MOVIE, "Movie", ""},
1312 {R_H264, "H264", ICON_FILE_MOVIE, "H.264", ""},
1313 {R_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", ""},
1317 {R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", ""},
1320 {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "FFMpeg", ""},
1322 {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", ""},
1323 {0, NULL, 0, NULL, NULL}};
1326 static EnumPropertyItem exr_codec_items[] = {
1327 {0, "NONE", 0, "None", ""},
1328 {1, "PXR24", 0, "Pxr24 (lossy)", ""},
1329 {2, "ZIP", 0, "ZIP (lossless)", ""},
1330 {3, "PIZ", 0, "PIZ (lossless)", ""},
1331 {4, "RLE", 0, "RLE (lossless)", ""},
1332 {0, NULL, 0, NULL, NULL}};
1335 #ifdef WITH_OPENJPEG
1336 static EnumPropertyItem jp2_preset_items[] = {
1337 {0, "NO_PRESET", 0, "No Preset", ""},
1338 {1, "CINE_24FPS", 0, "Cinema 24fps 2048x1080", ""},
1339 {2, "CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
1340 {3, "CINE_24FPS_4K", 0, "Cinema 24fps 4096x2160", ""},
1341 {4, "CINE_SCOPE_48FPS", 0, "Cine-Scope 24fps 2048x858", ""},
1342 {5, "CINE_SCOPE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
1343 {6, "CINE_FLAT_24FPS", 0, "Cine-Flat 24fps 1998x1080", ""},
1344 {7, "CINE_FLAT_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
1345 {0, NULL, 0, NULL, NULL}};
1347 static EnumPropertyItem jp2_depth_items[] = {
1348 {8, "8", 0, "8", "8 bit color channels"},
1349 {12, "12", 0, "12", "12 bit color channels"},
1350 {16, "16", 0, "16", "16 bit color channels"},
1351 {0, NULL, 0, NULL, NULL}};
1355 static EnumPropertyItem ffmpeg_format_items[] = {
1356 {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
1357 {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
1358 {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
1359 {FFMPEG_AVI, "AVI", 0, "AVI", ""},
1360 {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
1361 {FFMPEG_DV, "DV", 0, "DV", ""},
1362 {FFMPEG_H264, "H264", 0, "H.264", ""},
1363 {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
1367 {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
1370 {FFMPEG_FLV, "FLASH", 0, "Flash", ""},
1371 {0, NULL, 0, NULL, NULL}};
1373 static EnumPropertyItem ffmpeg_codec_items[] = {
1374 {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
1375 {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
1376 {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
1377 {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
1378 {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
1379 {CODEC_ID_H264, "H264", 0, "H.264", ""},
1380 {CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
1382 {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
1384 {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
1385 {0, NULL, 0, NULL, NULL}};
1387 static EnumPropertyItem ffmpeg_audio_codec_items[] = {
1388 {CODEC_ID_MP2, "MP2", 0, "MP2", ""},
1389 {CODEC_ID_MP3, "MP3", 0, "MP3", ""},
1390 {CODEC_ID_AC3, "AC3", 0, "AC3", ""},
1391 {CODEC_ID_AAC, "AAC", 0, "AAC", ""},
1392 {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
1393 {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
1394 {0, NULL, 0, NULL, NULL}};
1397 static EnumPropertyItem engine_items[] = {
1398 {0, "BLENDER_RENDER", 0, "Blender Render", ""},
1399 {0, NULL, 0, NULL, NULL}};
1401 srna= RNA_def_struct(brna, "SceneRenderData", NULL);
1402 RNA_def_struct_sdna(srna, "RenderData");
1403 RNA_def_struct_nested(brna, srna, "Scene");
1404 RNA_def_struct_path_func(srna, "rna_SceneRenderData_path");
1405 RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
1407 prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
1408 RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
1409 RNA_def_property_enum_items(prop, color_mode_items);
1410 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");
1411 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1413 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
1414 RNA_def_property_int_sdna(prop, NULL, "xsch");
1415 RNA_def_property_range(prop, 4, 10000);
1416 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image.");
1417 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1419 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
1420 RNA_def_property_int_sdna(prop, NULL, "ysch");
1421 RNA_def_property_range(prop, 4, 10000);
1422 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image.");
1423 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1425 prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
1426 RNA_def_property_int_sdna(prop, NULL, "size");
1427 RNA_def_property_ui_range(prop, 1, 100, 10, 1);
1428 RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
1429 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1431 prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
1432 RNA_def_property_int_sdna(prop, NULL, "xparts");
1433 RNA_def_property_range(prop, 1, 512);
1434 RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering.");
1435 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1437 prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
1438 RNA_def_property_int_sdna(prop, NULL, "yparts");
1439 RNA_def_property_range(prop, 1, 512);
1440 RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering.");
1441 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1443 prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
1444 RNA_def_property_float_sdna(prop, NULL, "xasp");
1445 RNA_def_property_range(prop, 1.0f, 200.0f);
1446 RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
1447 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1449 prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
1450 RNA_def_property_float_sdna(prop, NULL, "yasp");
1451 RNA_def_property_range(prop, 1.0f, 200.0f);
1452 RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
1453 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);
1455 /* JPEG and AVI JPEG */
1457 prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
1458 RNA_def_property_int_sdna(prop, NULL, "quality");
1459 RNA_def_property_range(prop, 1, 100);
1460 RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
1461 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1465 prop= RNA_def_property(srna, "tiff_bit", PROP_BOOLEAN, PROP_NONE);
1466 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
1467 RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
1468 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1470 /* Cineon and DPX */
1472 prop= RNA_def_property(srna, "cineon_log", PROP_BOOLEAN, PROP_NONE);
1473 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
1474 RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
1475 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1477 prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
1478 RNA_def_property_int_sdna(prop, NULL, "cineonblack");
1479 RNA_def_property_range(prop, 0, 1024);
1480 RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
1481 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1483 prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
1484 RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
1485 RNA_def_property_range(prop, 0, 1024);
1486 RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
1487 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1489 prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
1490 RNA_def_property_float_sdna(prop, NULL, "cineongamma");
1491 RNA_def_property_range(prop, 0.0f, 10.0f);
1492 RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
1493 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1498 prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
1499 RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
1500 RNA_def_property_enum_items(prop, exr_codec_items);
1501 RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
1502 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1504 prop= RNA_def_property(srna, "exr_half", PROP_BOOLEAN, PROP_NONE);
1505 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
1506 RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel");
1507 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1509 prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE);
1510 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF);
1511 RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int zbuffer)");
1512 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1514 prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
1515 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
1516 RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
1517 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1520 #ifdef WITH_OPENJPEG
1523 prop= RNA_def_property(srna, "jpeg2k_preset", PROP_ENUM, PROP_NONE);
1524 RNA_def_property_enum_sdna(prop, NULL, "jp2_preset");
1525 RNA_def_property_enum_items(prop, jp2_preset_items);
1526 RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_jpeg2k_preset_set", NULL);
1527 RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
1528 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1530 prop= RNA_def_property(srna, "jpeg2k_depth", PROP_ENUM, PROP_NONE);
1531 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
1532 RNA_def_property_enum_items(prop, jp2_depth_items);
1533 RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_jpeg2k_depth_set", NULL);
1534 RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
1535 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1537 prop= RNA_def_property(srna, "jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
1538 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
1539 RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
1540 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1546 prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
1547 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
1548 RNA_def_property_enum_items(prop, ffmpeg_format_items);
1549 RNA_def_property_ui_text(prop, "Format", "Output file format");
1550 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1552 prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE);
1553 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec");
1554 RNA_def_property_enum_items(prop, ffmpeg_codec_items);
1555 RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
1556 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1558 prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
1559 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
1560 RNA_def_property_range(prop, 1, 14000);
1561 RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate(kb/s)");
1562 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1564 prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE);
1565 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate");
1566 RNA_def_property_range(prop, 0, 9000);
1567 RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate(kb/s)");
1568 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1570 prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE);
1571 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate");
1572 RNA_def_property_range(prop, 1, 14000);
1573 RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate(kb/s)");
1574 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1576 prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE);
1577 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate");
1578 RNA_def_property_range(prop, 0, 100000000);
1579 RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
1580 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1582 prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE);
1583 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size");
1584 RNA_def_property_range(prop, 0, 100);
1585 RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
1586 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1588 prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE);
1589 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size");
1590 RNA_def_property_range(prop, 0, 2000);
1591 RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
1592 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1594 prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE);
1595 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size");
1596 RNA_def_property_range(prop, 0, 16384);
1597 RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
1598 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1600 prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE);
1601 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT);
1602 RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary.");
1603 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1607 prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
1608 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
1609 RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
1610 RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
1611 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1613 prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
1614 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
1615 RNA_def_property_range(prop, 32, 384);
1616 RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)");
1617 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1619 prop= RNA_def_property(srna, "ffmpeg_multiplex_audio", PROP_BOOLEAN, PROP_NONE);
1620 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_MULTIPLEX_AUDIO);
1621 RNA_def_property_ui_text(prop, "Multiplex Audio", "Interleave audio with the output video");
1622 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1624 prop= RNA_def_property(srna, "ffmpeg_audio_mixrate", PROP_INT, PROP_NONE);
1625 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_mixrate");
1626 RNA_def_property_range(prop, 8000, 192000);
1627 RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
1628 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1630 prop= RNA_def_property(srna, "ffmpeg_audio_volume", PROP_FLOAT, PROP_NONE);
1631 RNA_def_property_float_sdna(prop, NULL, "ffcodecdata.audio_volume");
1632 RNA_def_property_range(prop, 0.0f, 1.0f);
1633 RNA_def_property_ui_text(prop, "Volume", "Audio volume");
1634 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1638 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
1639 RNA_def_property_int_sdna(prop, NULL, "frs_sec");
1640 RNA_def_property_range(prop, 1, 120);
1641 RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second.");
1642 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1644 prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
1645 RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
1646 RNA_def_property_range(prop, 0.1f, 120.0f);
1647 RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
1648 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1650 prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
1651 RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
1652 RNA_def_property_range(prop, 0.0f, 2.0f);
1653 RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding.");
1654 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1656 prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE);
1657 RNA_def_property_enum_sdna(prop, NULL, "filtertype");
1658 RNA_def_property_enum_items(prop, pixel_filter_items);
1659 RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples.");
1660 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1662 prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
1663 RNA_def_property_float_sdna(prop, NULL, "gauss");
1664 RNA_def_property_range(prop, 0.5f, 1.5f);
1665 RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples.");
1666 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1668 prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
1669 RNA_def_property_enum_sdna(prop, NULL, "alphamode");
1670 RNA_def_property_enum_items(prop, alpha_mode_items);
1671 RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels.");
1672 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1674 prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
1675 RNA_def_property_enum_sdna(prop, NULL, "ocres");
1676 RNA_def_property_enum_items(prop, octree_resolution_items);
1677 RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
1678 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1680 prop= RNA_def_property(srna, "raytrace_structure", PROP_ENUM, PROP_NONE);
1681 RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure");
1682 RNA_def_property_enum_items(prop, raytrace_structure_items);
1683 RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure.");
1684 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1686 prop= RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
1687 RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
1688 RNA_def_property_ui_text(prop, "Use Instances", "Instance support leads to effective memory reduction when using duplicates.");
1689 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1691 prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
1692 RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
1693 RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed.");
1694 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1696 prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
1697 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
1698 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges.");
1699 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1701 prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
1702 RNA_def_property_enum_sdna(prop, NULL, "osa");
1703 RNA_def_property_enum_items(prop, fixed_oversample_items);
1704 RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel.");
1705 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1707 prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
1708 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
1709 RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output.");
1710 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1712 prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
1713 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1714 RNA_def_property_enum_items(prop, field_order_items);
1715 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");
1716 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1718 prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
1719 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
1720 RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
1721 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1723 prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
1724 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
1725 RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
1726 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1728 prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE);
1729 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
1730 RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering.");
1731 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1733 prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE);
1734 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
1735 RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering.");
1736 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1738 prop= RNA_def_property(srna, "render_sss", PROP_BOOLEAN, PROP_NONE);
1739 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
1740 RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering.");
1741 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1743 prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE);
1744 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
1745 RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects.");
1746 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1748 prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE);
1749 RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
1750 RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties.");
1751 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1753 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
1754 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
1755 RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
1756 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1758 prop= RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
1759 RNA_def_property_int_sdna(prop, NULL, "edgeint");
1760 RNA_def_property_range(prop, 0, 255);
1761 RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
1762 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1764 prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
1765 RNA_def_property_float_sdna(prop, NULL, "edgeR");
1766 RNA_def_property_array(prop, 3);
1767 RNA_def_property_ui_text(prop, "Edge Color", "");
1768 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1770 prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
1771 RNA_def_property_int_sdna(prop, NULL, "threads");
1772 RNA_def_property_range(prop, 1, 8);
1773 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
1774 RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
1775 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1777 prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
1778 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1779 RNA_def_property_enum_items(prop, threads_mode_items);
1780 RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
1781 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1783 prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
1784 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
1785 RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
1786 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1788 prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
1789 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
1790 RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
1791 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1793 prop= RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
1794 RNA_def_property_float_sdna(prop, NULL, "border.xmin");
1795 RNA_def_property_range(prop, 0.0f, 1.0f);
1796 RNA_def_property_ui_text(prop, "Border Minimum X", "Sets minimum X value to for the render border.");
1797 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1799 prop= RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
1800 RNA_def_property_float_sdna(prop, NULL, "border.ymin");
1801 RNA_def_property_range(prop, 0.0f, 1.0f);
1802 RNA_def_property_ui_text(prop, "Border Minimum Y", "Sets minimum Y value for the render border");
1803 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1805 prop= RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
1806 RNA_def_property_float_sdna(prop, NULL, "border.xmax");
1807 RNA_def_property_range(prop, 0.0f, 1.0f);
1808 RNA_def_property_ui_text(prop, "Border Maximum X", "Sets maximum X value for the render border");
1809 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1811 prop= RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
1812 RNA_def_property_float_sdna(prop, NULL, "border.ymax");
1813 RNA_def_property_range(prop, 0.0f, 1.0f);
1814 RNA_def_property_ui_text(prop, "Border Maximum Y", "Sets maximum Y value for the render border");
1815 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1817 prop= RNA_def_property(srna, "crop_to_border", PROP_BOOLEAN, PROP_NONE);
1818 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
1819 RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
1820 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1822 prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
1823 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
1824 RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
1825 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1827 prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
1828 RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
1829 RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering.");
1830 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1832 prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
1833 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
1834 RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled.");
1835 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1837 prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
1838 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
1839 RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
1840 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1842 prop= RNA_def_property(srna, "color_management", PROP_BOOLEAN, PROP_NONE);
1843 RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
1844 RNA_def_property_ui_text(prop, "Color Management", "Use color profiles and gamma corrected imaging pipeline");
1845 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_MATERIAL|ND_SHADING, NULL);
1847 prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE);
1848 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
1849 RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
1850 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1852 prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
1853 RNA_def_property_enum_sdna(prop, NULL, "imtype");
1854 RNA_def_property_enum_items(prop, image_type_items);
1855 RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
1856 RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
1857 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1859 prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
1860 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1861 RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");
1862 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1864 prop= RNA_def_property(srna, "free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
1865 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1866 RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory.");
1867 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1869 prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
1870 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
1871 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
1872 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).");
1873 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1875 prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
1876 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
1877 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.");
1878 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1880 prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
1881 RNA_def_property_boolean_sdna(prop, NULL, "bufflag", R_BACKBUF);
1882 RNA_def_property_ui_text(prop, "Back Buffer", "Render backbuffer image");
1883 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1885 prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
1886 RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
1887 RNA_def_property_enum_items(prop, display_mode_items);
1888 RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
1889 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1891 prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
1892 RNA_def_property_string_sdna(prop, NULL, "pic");
1893 RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
1894 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1898 prop= RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
1899 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
1900 RNA_def_property_enum_items(prop, bake_mode_items);
1901 RNA_def_property_ui_text(prop, "Bake Mode", "");
1903 prop= RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
1904 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
1905 RNA_def_property_enum_items(prop, bake_normal_space_items);
1906 RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
1908 prop= RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
1909 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
1910 RNA_def_property_enum_items(prop, bake_aa_items);
1911 RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
1913 prop= RNA_def_property(srna, "bake_active", PROP_BOOLEAN, PROP_NONE);
1914 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
1915 RNA_def_property_ui_text(prop, "Selected to Active", "Bake shading on the surface of selected objects to the active object");
1917 prop= RNA_def_property(srna, "bake_normalized", PROP_BOOLEAN, PROP_NONE);
1918 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
1919 RNA_def_property_ui_text(prop, "Normalized", "");
1920 //"Bake ambient occlusion normalized, without taking into acount material settings"
1921 //"Normalized displacement value to fit the 'Dist' range"
1922 // XXX: Need 1 tooltip here...
1924 prop= RNA_def_property(srna, "bake_clear", PROP_BOOLEAN, PROP_NONE);
1925 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
1926 RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
1928 prop= RNA_def_property(srna, "bake_enable_aa", PROP_BOOLEAN, PROP_NONE);
1929 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
1930 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
1932 prop= RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
1933 RNA_def_property_int_sdna(prop, NULL, "bake_filter");
1934 RNA_def_property_range(prop, 0, 32);
1935 RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter");
1937 prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
1938 RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
1939 RNA_def_property_range(prop, 0.0, 1000.0);
1940 RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units");
1942 prop= RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
1943 RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
1944 RNA_def_property_range(prop, 0.0, 1000.0);
1945 RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)");
1949 prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
1950 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
1951 RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
1952 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1954 prop= RNA_def_property(srna, "stamp_date", PROP_BOOLEAN, PROP_NONE);
1955 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
1956 RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
1957 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1959 prop= RNA_def_property(srna, "stamp_frame", PROP_BOOLEAN, PROP_NONE);
1960 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
1961 RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
1962 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1964 prop= RNA_def_property(srna, "stamp_camera", PROP_BOOLEAN, PROP_NONE);
1965 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
1966 RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
1967 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1969 prop= RNA_def_property(srna, "stamp_scene", PROP_BOOLEAN, PROP_NONE);
1970 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
1971 RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
1972 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1974 prop= RNA_def_property(srna, "stamp_note", PROP_BOOLEAN, PROP_NONE);
1975 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
1976 RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
1977 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1979 prop= RNA_def_property(srna, "stamp_marker", PROP_BOOLEAN, PROP_NONE);
1980 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
1981 RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
1982 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1984 prop= RNA_def_property(srna, "stamp_filename", PROP_BOOLEAN, PROP_NONE);
1985 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
1986 RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata");
1987 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1989 prop= RNA_def_property(srna, "stamp_sequence_strip", PROP_BOOLEAN, PROP_NONE);
1990 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
1991 RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
1992 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1994 prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
1995 RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
1996 RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
1997 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1999 prop= RNA_def_property(srna, "render_stamp", PROP_BOOLEAN, PROP_NONE);
2000 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
2001 RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
2002 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2004 prop= RNA_def_property(srna, "stamp_font_size", PROP_ENUM, PROP_NONE);
2005 RNA_def_property_enum_sdna(prop, NULL, "stamp_font_id");
2006 RNA_def_property_enum_items(prop, stamp_font_size_items);
2007 RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp text");
2008 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2010 prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
2011 RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
2012 RNA_def_property_array(prop, 4);
2013 RNA_def_property_range(prop,0.0,1.0);
2014 RNA_def_property_ui_text(prop, "Stamp Foreground", "Stamp text color");
2015 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2017 prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
2018 RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
2019 RNA_def_property_array(prop, 4);
2020 RNA_def_property_range(prop,0.0,1.0);
2021 RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text");
2022 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2026 prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
2027 RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
2028 RNA_def_property_struct_type(prop, "SceneRenderLayer");
2029 RNA_def_property_ui_text(prop, "Render Layers", "");
2031 prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
2032 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
2033 RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
2034 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2036 prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
2037 RNA_def_property_int_sdna(prop, NULL, "actlay");
2038 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
2039 RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
2040 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2043 prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
2044 RNA_def_property_enum_items(prop, engine_items);
2045 RNA_def_property_enum_funcs(prop, "rna_SceneRenderData_engine_get", "rna_SceneRenderData_engine_set", "rna_SceneRenderData_engine_itemf");
2046 RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering.");
2047 RNA_def_property_update(prop, NC_WINDOW, NULL);
2049 prop= RNA_def_property(srna, "multiple_engines", PROP_BOOLEAN, PROP_NONE);
2050 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_multiple_engines_get", NULL);
2051 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
2052 RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available.");
2054 prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
2055 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_use_game_engine_get", NULL);
2056 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
2057 RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine.");
2060 void RNA_def_scene(BlenderRNA *brna)
2066 static EnumPropertyItem audio_distance_model_items[] = {
2067 {0, "NONE", 0, "None", "No distance attenuation."},
2068 {1, "INVERSE", 0, "Inverse", "Inverse distance model."},
2069 {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping."},
2070 {3, "LINEAR", 0, "Linear", "Linear distance model."},
2071 {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping."},
2072 {5, "EXPONENT", 0, "Exponent", "Exponent distance model."},
2073 {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping."},
2074 {0, NULL, 0, NULL, NULL}};
2076 /* Struct definition */
2077 srna= RNA_def_struct(brna, "Scene", "ID");
2078 RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
2079 RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
2080 RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
2082 /* Global Settings */
2083 prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
2084 RNA_def_property_flag(prop, PROP_EDITABLE);
2085 RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene.");
2087 prop= RNA_def_property(srna, "active_object", PROP_POINTER, PROP_NONE);
2088 RNA_def_property_struct_type(prop, "Object");
2089 RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL);
2090 RNA_def_property_flag(prop, PROP_EDITABLE);
2091 RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform.");
2094 prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
2095 RNA_def_property_flag(prop, PROP_EDITABLE);
2096 RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
2097 RNA_def_property_update(prop, NC_WORLD, NULL);
2099 prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
2100 RNA_def_property_float_sdna(prop, NULL, "cursor");
2101 RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
2102 RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
2103 RNA_def_property_update(prop, NC_WINDOW, NULL);
2106 prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
2107 RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
2108 RNA_def_property_struct_type(prop, "Object");
2109 RNA_def_property_ui_text(prop, "Objects", "");
2110 RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
2113 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
2114 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
2115 RNA_def_property_array(prop, 20);
2116 RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
2117 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
2120 /* Frame Range Stuff */
2121 prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
2122 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
2123 RNA_def_property_int_sdna(prop, NULL, "r.cfra");
2124 RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
2125 RNA_def_property_ui_text(prop, "Current Frame", "");
2126 RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
2128 prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
2129 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
2130 RNA_def_property_int_sdna(prop, NULL, "r.sfra");
2131 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
2132 RNA_def_property_range(prop, MINFRAME, MAXFRAME);
2133 RNA_def_property_ui_text(prop, "Start Frame", "");
2134 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2136 prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
2137 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
2138 RNA_def_property_int_sdna(prop, NULL, "r.efra");
2139 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
2140 RNA_def_property_range(prop, MINFRAME, MAXFRAME);
2141 RNA_def_property_ui_text(prop, "End Frame", "");
2142 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2144 prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
2145 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
2146 RNA_def_property_int_sdna(prop, NULL, "frame_step");
2147 RNA_def_property_range(prop, 0, MAXFRAME);
2148 RNA_def_property_ui_range(prop, 0, 100, 1, 0);
2149 RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
2150 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2152 /* Preview Range (frame-range for UI playback) */
2153 prop=RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE); /* use_preview_range is not really a separate setting in SDNA */
2154 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
2155 RNA_def_property_boolean_funcs(prop, "rna_Scene_use_preview_range_get", "rna_Scene_use_preview_range_set");
2156 RNA_def_property_ui_text(prop, "Use Preview Range", "");
2157 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2159 prop= RNA_def_property(srna, "preview_range_start_frame", PROP_INT, PROP_TIME);
2160 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
2161 RNA_def_property_int_sdna(prop, NULL, "r.psfra");
2162 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
2163 RNA_def_property_ui_text(prop, "Preview Range Start Frame", "");
2164 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2166 prop= RNA_def_property(srna, "preview_range_end_frame", PROP_INT, PROP_TIME);
2167 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
2168 RNA_def_property_int_sdna(prop, NULL, "r.pefra");
2169 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
2170 RNA_def_property_ui_text(prop, "Preview Range End Frame", "");
2171 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2174 prop= RNA_def_property(srna, "stamp_note", PROP_STRING, PROP_NONE);
2175 RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
2176 RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
2177 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2179 /* Animation Data (for Scene) */
2180 rna_def_animdata_common(srna);
2182 /* Nodes (Compositing) */
2183 prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
2184 RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
2186 prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
2187 RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
2188 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set");
2189 RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree.");
2190 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
2193 prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
2194 RNA_def_property_pointer_sdna(prop, NULL, "ed");
2195 RNA_def_property_struct_type(prop, "SequenceEditor");
2196 RNA_def_property_ui_text(prop, "Sequence Editor", "");
2199 prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
2200 RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
2201 RNA_def_property_struct_type(prop, "KeyingSet");
2202 RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene.");
2203 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
2205 prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
2206 RNA_def_property_struct_type(prop, "KeyingSet");
2207 RNA_def_property_flag(prop, PROP_EDITABLE);
2208 RNA_def_property_editable_func(prop, "rna_Scene_active_keying_set_editable");
2209 RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL);
2210 RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
2211 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
2213 prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE);
2214 RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
2215 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");
2216 RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index.");
2217 RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
2220 prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
2221 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2222 RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
2223 RNA_def_property_struct_type(prop, "ToolSettings");
2224 RNA_def_property_ui_text(prop, "Tool Settings", "");
2227 prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE);
2228 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2229 RNA_def_property_pointer_sdna(prop, NULL, "unit");
2230 RNA_def_property_struct_type(prop, "UnitSettings");
2231 RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
2233 /* Physics Settings */
2234 prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
2235 RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity");
2236 RNA_def_property_array(prop, 3);
2237 RNA_def_property_range(prop, -200.0f, 200.0f);
2238 RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction");
2239 RNA_def_property_update(prop, 0, "rna_Physics_update");
2241 prop= RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE);
2242 RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY);
2243 RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics.");
2244 RNA_def_property_update(prop, 0, "rna_Physics_update");
2247 prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE);
2248 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2249 RNA_def_property_pointer_sdna(prop, NULL, "r");
2250 RNA_def_property_struct_type(prop, "SceneRenderData");
2251 RNA_def_property_ui_text(prop, "Render Data", "");
2254 prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
2255 RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
2256 RNA_def_property_struct_type(prop, "TimelineMarker");
2257 RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
2259 /* Audio Settings */
2260 prop= RNA_def_property(srna, "mute_audio", PROP_BOOLEAN, PROP_NONE);
2261 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_MUTE);
2262 RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted.");
2263 RNA_def_property_update(prop, NC_SCENE, NULL);
2265 prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
2266 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
2267 RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio from Sequence Editor.");
2268 RNA_def_property_update(prop, NC_SCENE, NULL);
2270 prop= RNA_def_property(srna, "scrub_audio", PROP_BOOLEAN, PROP_NONE);
2271 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB);
2272 RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing.");
2273 RNA_def_property_update(prop, NC_SCENE, NULL);
2275 prop= RNA_def_property(srna, "speed_of_sound", PROP_FLOAT, PROP_NONE);
2276 RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound");
2277 RNA_def_property_range(prop, 0.01f, FLT_MAX);
2278 RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for doppler effect calculation.");
2279 RNA_def_property_update(prop, NC_SCENE, NULL);
2281 prop= RNA_def_property(srna, "doppler_factor", PROP_FLOAT, PROP_NONE);
2282 RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor");
2283 RNA_def_property_range(prop, 0.0, FLT_MAX);
2284 RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for doppler effect calculation.");
2285 RNA_def_property_update(prop, NC_SCENE, NULL);
2287 prop= RNA_def_property(srna, "distance_model", PROP_ENUM, PROP_NONE);
2288 RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model");
2289 RNA_def_property_enum_items(prop, audio_distance_model_items);
2290 RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation.");
2291 RNA_def_property_update(prop, NC_SCENE, NULL);
2294 prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NONE);
2295 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2296 RNA_def_property_pointer_sdna(prop, NULL, "gm");
2297 RNA_def_property_struct_type(prop, "SceneGameData");
2298 RNA_def_property_ui_text(prop, "Game Data", "");
2301 func= RNA_def_function(srna, "statistics", "ED_info_stats_string");
2302 prop= RNA_def_string(func, "statistics", "", 0, "Statistics", "");
2303 RNA_def_function_return(func, prop);
2306 prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
2307 RNA_def_property_pointer_sdna(prop, NULL, "gpd");
2308 RNA_def_property_flag(prop, PROP_EDITABLE);
2309 RNA_def_property_struct_type(prop, "GreasePencil");
2310 RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
2312 /* Transform Orientations */
2313 prop= RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE);
2314 RNA_def_property_collection_sdna(prop, NULL, "transform_spaces", NULL);
2315 RNA_def_property_struct_type(prop, "TransformOrientation");
2316 RNA_def_property_ui_text(prop, "Transform Orientations", "");
2319 rna_def_tool_settings(brna);
2320 rna_def_unit_settings(brna);
2321 rna_def_scene_render_data(brna);
2322 rna_def_scene_game_data(brna);
2323 rna_def_scene_render_layer(brna);
2324 rna_def_transform_orientation(brna);
2327 RNA_api_scene(srna);