4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * Contributor(s): Blender Foundation (2008).
22 * ***** END GPL LICENSE BLOCK *****
27 #include "RNA_define.h"
28 #include "RNA_types.h"
30 #include "rna_internal.h"
32 #include "DNA_scene_types.h"
35 #include "BKE_writeffmpeg.h"
36 #include <libavcodec/avcodec.h>
37 #include <libavformat/avformat.h>
42 /* prop_mode needs to be accessible from transform operator */
43 EnumPropertyItem prop_mode_items[] ={
44 {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
45 {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
46 {PROP_ROOT, "ROOT", 0, "Root", ""},
47 {PROP_SHARP, "SHARP", 0, "Sharp", ""},
48 {PROP_LIN, "LINEAR", 0, "Linear", ""},
49 {PROP_CONST, "CONSTANT", 0, "Constant", ""},
50 {PROP_RANDOM, "RANDOM", 0, "Random", ""},
51 {0, NULL, 0, NULL, NULL}};
55 #include "DNA_node_types.h"
57 #include "BKE_context.h"
58 #include "BKE_global.h"
61 #include "BLI_threads.h"
63 PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
65 ListBaseIterator *internal= iter->internal;
67 /* we are actually iterating a Base list, so override get */
68 return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
71 static int layer_set(int lay, const int *values)
75 /* ensure we always have some layer selected */
84 if(values[i]) lay |= (1<<i);
91 static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
93 Scene *scene= (Scene*)ptr->data;
95 scene->lay= layer_set(scene->lay, values);
98 static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
100 Scene *data= (Scene*)ptr->data;
101 CLAMP(value, 1, data->r.efra);
105 static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
107 Scene *data= (Scene*)ptr->data;
108 CLAMP(value, data->r.sfra, MAXFRAME);
112 static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
114 //Scene *scene= ptr->id.data;
115 //update_for_newframe();
118 static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
120 RenderData *rd= (RenderData*)ptr->data;
122 if(rd->mode & R_FIXED_THREADS)
125 return BLI_system_thread_count();
128 static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
130 RenderData *rd= (RenderData*)ptr->data;
132 return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
135 static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
137 RenderData *rd= (RenderData*)ptr->data;
141 ffmpeg_verify_image_type(rd);
145 static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
147 RenderData *rd= (RenderData*)ptr->data;
151 static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
153 RenderData *rd= (RenderData*)ptr->data;
157 static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
159 RenderData *rd= (RenderData*)ptr->data;
162 *max= BLI_countlist(&rd->layers)-1;
166 static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
168 Scene *scene= (Scene*)ptr->id.data;
169 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
171 BLI_strncpy(rl->name, value, sizeof(rl->name));
173 if(scene->nodetree) {
175 int index= BLI_findindex(&scene->r.layers, rl);
177 for(node= scene->nodetree->nodes.first; node; node= node->next) {
178 if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
179 if(node->custom1==index)
180 BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
186 static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
188 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
189 rl->lay= layer_set(rl->lay, values);
192 static void rna_SceneRenderLayer_zmask_layer_set(PointerRNA *ptr, const int *values)
194 SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
195 rl->lay_zmask= layer_set(rl->lay_zmask, values);
198 static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
200 Scene *scene= (Scene*)ptr->id.data;
203 ntreeCompositForceHidden(scene->nodetree, scene);
208 void rna_def_sculpt(BlenderRNA *brna)
213 srna= RNA_def_struct(brna, "Sculpt", NULL);
214 RNA_def_struct_nested(brna, srna, "Scene");
215 RNA_def_struct_ui_text(srna, "Sculpt", "");
217 prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
218 RNA_def_property_struct_type(prop, "Brush");
219 RNA_def_property_ui_text(prop, "Brush", "");
221 prop= RNA_def_property(srna, "symmetry_x", PROP_BOOLEAN, PROP_NONE);
222 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_X);
223 RNA_def_property_ui_text(prop, "Symmetry X", "Mirror brush across the X axis.");
225 prop= RNA_def_property(srna, "symmetry_y", PROP_BOOLEAN, PROP_NONE);
226 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Y);
227 RNA_def_property_ui_text(prop, "Symmetry Y", "Mirror brush across the Y axis.");
229 prop= RNA_def_property(srna, "symmetry_z", PROP_BOOLEAN, PROP_NONE);
230 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Z);
231 RNA_def_property_ui_text(prop, "Symmetry Z", "Mirror brush across the Z axis.");
233 prop= RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
234 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_X);
235 RNA_def_property_ui_text(prop, "Lock X", "Disallow changes to the X axis of vertices.");
237 prop= RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
238 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Y);
239 RNA_def_property_ui_text(prop, "Lock Y", "Disallow changes to the Y axis of vertices.");
241 prop= RNA_def_property(srna, "lock_z", PROP_BOOLEAN, PROP_NONE);
242 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Z);
243 RNA_def_property_ui_text(prop, "Lock Z", "Disallow changes to the Z axis of vertices.");
245 prop= RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
246 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DRAW_BRUSH);
247 RNA_def_property_ui_text(prop, "Show Brush", "");
249 prop= RNA_def_property(srna, "partial_redraw", PROP_BOOLEAN, PROP_NONE);
250 RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DRAW_FAST);
251 RNA_def_property_ui_text(prop, "Partial Redraw", "Optimize sculpting by only refreshing modified faces.");
254 void rna_def_tool_settings(BlenderRNA *brna)
259 static EnumPropertyItem uv_select_mode_items[] = {
260 {UV_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
261 {UV_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
262 {UV_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
263 {UV_SELECT_ISLAND, "ISLAND", ICON_LINKEDSEL, "Island", "Island selection mode."},
264 {0, NULL, 0, NULL, NULL}};
266 static EnumPropertyItem mesh_select_mode_items[] = {
267 {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
268 {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
269 {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
270 {0, NULL, 0, NULL, NULL}};
272 static EnumPropertyItem snap_element_items[] = {
273 {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
274 {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
275 {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
276 {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
277 {0, NULL, 0, NULL, NULL}};
279 static EnumPropertyItem snap_mode_items[] = {
280 {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
281 {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
282 {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
283 {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
284 {0, NULL, 0, NULL, NULL}};
286 srna= RNA_def_struct(brna, "ToolSettings", NULL);
287 RNA_def_struct_ui_text(srna, "Tool Settings", "");
289 prop= RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
290 RNA_def_property_struct_type(prop, "Sculpt");
291 RNA_def_property_ui_text(prop, "Sculpt", "");
293 prop= RNA_def_property(srna, "vpaint", PROP_POINTER, PROP_NONE);
294 RNA_def_property_struct_type(prop, "VPaint");
295 RNA_def_property_ui_text(prop, "Vertex Paint", "");
297 prop= RNA_def_property(srna, "wpaint", PROP_POINTER, PROP_NONE);
298 RNA_def_property_struct_type(prop, "VPaint");
299 RNA_def_property_ui_text(prop, "Weight Paint", "");
302 prop= RNA_def_property(srna, "proportional_editing", PROP_BOOLEAN, PROP_NONE);
303 RNA_def_property_boolean_sdna(prop, NULL, "proportional", 0);
304 RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
306 prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
307 RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
308 RNA_def_property_enum_items(prop, prop_mode_items);
309 RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
311 prop= RNA_def_property(srna, "automerge_editing", PROP_BOOLEAN, PROP_NONE);
312 RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
313 RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location.");
315 prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
316 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
317 RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
318 RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
320 prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
321 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
322 RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
323 RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
325 prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
326 RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
327 RNA_def_property_enum_items(prop, snap_element_items);
328 RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
330 prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
331 RNA_def_property_enum_sdna(prop, NULL, "snap_target");
332 RNA_def_property_enum_items(prop, snap_mode_items);
333 RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
335 prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
336 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
337 RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
338 RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
341 prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
342 RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
343 RNA_def_property_enum_items(prop, uv_select_mode_items);
344 RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
346 prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
347 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
348 RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
349 RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
351 prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
352 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
353 RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
356 prop= RNA_def_property(srna, "mesh_selection_mode", PROP_ENUM, PROP_NONE);
357 RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
358 RNA_def_property_enum_items(prop, mesh_select_mode_items);
359 RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Mesh selection and display mode.");
361 prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_PERCENTAGE);
362 RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
363 RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
366 rna_def_sculpt(brna);
369 void rna_def_scene_render_layer(BlenderRNA *brna)
374 srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
375 RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
377 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
378 RNA_def_property_ui_text(prop, "Name", "Render layer name.");
379 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
380 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
381 RNA_def_struct_name_property(srna, prop);
383 prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
384 RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
385 RNA_def_property_struct_type(prop, "Material");
386 RNA_def_property_flag(prop, PROP_EDITABLE);
387 RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
388 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
390 prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
391 RNA_def_property_struct_type(prop, "Group");
392 RNA_def_property_flag(prop, PROP_EDITABLE);
393 RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
394 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
397 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
398 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
399 RNA_def_property_array(prop, 20);
400 RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
401 RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
403 prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_NONE);
404 RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
405 RNA_def_property_array(prop, 20);
406 RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
407 RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set");
410 prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
411 RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
412 RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
413 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
415 prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE);
416 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
417 RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
418 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
420 prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE);
421 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
422 RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
423 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
425 prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE);
426 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
427 RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
428 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
430 prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE);
431 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
432 RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
433 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
435 prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
436 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
437 RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
438 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
440 prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE);
441 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
442 RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
443 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
445 prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
446 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
447 RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
448 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
450 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
451 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
452 RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
453 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
455 prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE);
456 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
457 RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
458 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
461 prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
462 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
463 RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
464 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
466 prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE);
467 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
468 RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
469 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
471 prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE);
472 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
473 RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
474 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
476 prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
477 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
478 RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
479 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
481 prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
482 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
483 RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
484 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
486 prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
487 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
488 RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
489 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
491 prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
492 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
493 RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
494 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
496 prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
497 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
498 RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
499 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
501 prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
502 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
503 RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
504 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
506 prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
507 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
508 RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
509 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
511 prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
512 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
513 RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
514 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
516 prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
517 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
518 RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
519 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
521 prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
522 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
523 RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass.");
524 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
526 prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
527 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
528 RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass.");
529 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
531 prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
532 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
533 RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
534 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
536 prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
537 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
538 RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
539 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
541 prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
542 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
543 RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
544 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
546 prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
547 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
548 RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined.");
549 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
551 prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
552 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
553 RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined.");
554 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
557 void rna_def_scene_render_data(BlenderRNA *brna)
562 static EnumPropertyItem pixel_filter_items[] ={
563 {R_FILTER_BOX, "BOX", 0, "Box", ""},
564 {R_FILTER_TENT, "TENT", 0, "Tent", ""},
565 {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", ""},
566 {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", ""},
567 {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", ""},
568 {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", ""},
569 {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", ""},
570 {0, NULL, 0, NULL, NULL}};
572 static EnumPropertyItem alpha_mode_items[] ={
573 {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
574 {R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
575 {R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
576 {0, NULL, 0, NULL, NULL}};
578 static EnumPropertyItem color_mode_items[] ={
579 {R_PLANESBW, "BW", 0, "BW", "Images are saved with BW (grayscale) data"},
580 {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
581 {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
582 {0, NULL, 0, NULL, NULL}};
584 static EnumPropertyItem display_mode_items[] ={
585 {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
586 {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
587 {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
588 {0, NULL, 0, NULL, NULL}};
590 static EnumPropertyItem octree_resolution_items[] = {
591 {64, "OCTREE_RES_64", 0, "64", ""},
592 {128, "OCTREE_RES_128", 0, "128", ""},
593 {256, "OCTREE_RES_256", 0, "256", ""},
594 {512, "OCTREE_RES_512", 0, "512", ""},
595 {0, NULL, 0, NULL, NULL}};
597 static EnumPropertyItem fixed_oversample_items[] = {
598 {5, "OVERSAMPLE_5", 0, "5", ""},
599 {8, "OVERSAMPLE_8", 0, "8", ""},
600 {11, "OVERSAMPLE_11", 0, "11", ""},
601 {16, "OVERSAMPLE_16", 0, "16", ""},
602 {0, NULL, 0, NULL, NULL}};
604 static EnumPropertyItem field_order_items[] = {
605 {0, "FIELDS_EVENFIRST", 0, "Even", "Even Fields First"},
606 {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Odd", "Odd Fields First"},
607 {0, NULL, 0, NULL, NULL}};
609 static EnumPropertyItem threads_mode_items[] = {
610 {0, "THREADS_AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
611 {R_FIXED_THREADS, "THREADS_FIXED", 0, "Fixed", "Manually determine the number of threads"},
612 {0, NULL, 0, NULL, NULL}};
614 static EnumPropertyItem stamp_font_size_items[] = {
615 {1, "STAMP_FONT_TINY", 0, "Tiny", ""},
616 {2, "STAMP_FONT_SMALL", 0, "Small", ""},
617 {3, "STAMP_FONT_MEDIUM", 0, "Medium", ""},
618 {0, "STAMP_FONT_LARGE", 0, "Large", ""},
619 {4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
620 {0, NULL, 0, NULL, NULL}};
623 static EnumPropertyItem image_type_items[] = {
624 {R_PNG, "PNG", 0, "PNG", ""},
625 {R_JPEG90, "JPEG", 0, "JPEG", ""},
627 {R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
629 {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
630 {R_BMP, "BMP", 0, "BMP", ""},
631 {R_TARGA, "TARGA", 0, "Targa", ""},
632 {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
633 //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
634 {R_HAMX, "HAMX", 0, "HamX", ""},
635 {R_IRIS, "IRIS", 0, "Iris", ""},
636 {0, "", 0, NULL, NULL},
638 {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
639 {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
641 {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
642 {R_CINEON, "CINEON", 0, "Cineon", ""},
643 {R_DPX, "DPX", 0, "DPX", ""},
644 {0, "", 0, NULL, NULL},
645 {R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
646 {R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
648 {R_AVICODEC, "AVICODEC", 0, "AVI Codec", ""},
650 #ifdef WITH_QUICKTIME
651 {R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""},
654 {R_MOVIE, "MOVIE", 0, "Movie", ""},
657 {R_H264, "H264", 0, "H.264", ""},
658 {R_XVID, "XVID", 0, "Xvid", ""},
662 {R_THEORA, "THEORA", 0, "Ogg Theora", ""},
665 {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
667 {0, "", 0, NULL, NULL},
668 {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
669 {0, NULL, 0, NULL, NULL}};
672 static EnumPropertyItem exr_codec_items[] = {
673 {0, "NONE", 0, "None", ""},
674 {1, "PXR24", 0, "Pxr24 (lossy)", ""},
675 {2, "ZIP", 0, "ZIP (lossless)", ""},
676 {3, "PIZ", 0, "PIZ (lossless)", ""},
677 {4, "RLE", 0, "RLE (lossless)", ""},
678 {0, NULL, 0, NULL, NULL}};
682 static EnumPropertyItem jp2_preset_items[] = {
683 {0, "NO_PRESET", 0, "No Preset", ""},
684 {1, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 2048x1080", ""},
685 {2, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
686 {3, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 4096x2160", ""},
687 {4, "R_JPEG2K_CINE_PRESET", 0, "Cine-Scope 24fps 2048x858", ""},
688 {5, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
689 {6, "R_JPEG2K_CINE_PRESET", 0, "Cine-Flat 24fps 1998x1080", ""},
690 {7, "R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
691 {0, NULL, 0, NULL, NULL}};
693 static EnumPropertyItem jp2_depth_items[] = {
694 {0, "8", 0, "8", ""},
695 {R_JPEG2K_12BIT, "16", 0, "16", ""},
696 {R_JPEG2K_16BIT, "32", 0, "32", ""},
697 {0, NULL, 0, NULL, NULL}};
701 static EnumPropertyItem ffmpeg_format_items[] = {
702 {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
703 {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
704 {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
705 {FFMPEG_AVI, "AVI", 0, "AVI", ""},
706 {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
707 {FFMPEG_DV, "DV", 0, "DV", ""},
708 {FFMPEG_H264, "H264", 0, "H.264", ""},
709 {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
713 {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
716 {FFMPEG_FLV, "FLASH", 0, "Flash", ""},
717 {0, NULL, 0, NULL, NULL}};
719 static EnumPropertyItem ffmpeg_codec_items[] = {
720 {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
721 {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
722 {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
723 {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
724 {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
725 {CODEC_ID_H264, "H264", 0, "H.264", ""},
726 {CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
728 {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
730 {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
731 {0, NULL, 0, NULL, NULL}};
733 static EnumPropertyItem ffmpeg_audio_codec_items[] = {
734 {CODEC_ID_MP2, "MP2", 0, "MP2", ""},
735 {CODEC_ID_MP3, "MP3", 0, "MP3", ""},
736 {CODEC_ID_AC3, "AC3", 0, "AC3", ""},
737 {CODEC_ID_AAC, "AAC", 0, "AAC", ""},
738 {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
739 {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
740 {0, NULL, 0, NULL, NULL}};
743 srna= RNA_def_struct(brna, "SceneRenderData", NULL);
744 RNA_def_struct_sdna(srna, "RenderData");
745 RNA_def_struct_nested(brna, srna, "Scene");
746 RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
748 prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
749 RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
750 RNA_def_property_enum_items(prop, color_mode_items);
751 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");
753 prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
754 RNA_def_property_int_sdna(prop, NULL, "xsch");
755 RNA_def_property_range(prop, 4, 10000);
756 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image.");
757 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
759 prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
760 RNA_def_property_int_sdna(prop, NULL, "ysch");
761 RNA_def_property_range(prop, 4, 10000);
762 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image.");
763 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
765 prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
766 RNA_def_property_int_sdna(prop, NULL, "size");
767 RNA_def_property_ui_range(prop, 1, 100, 10, 1);
768 RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
770 prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
771 RNA_def_property_int_sdna(prop, NULL, "xparts");
772 RNA_def_property_range(prop, 1, 512);
773 RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering.");
774 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
776 prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
777 RNA_def_property_int_sdna(prop, NULL, "yparts");
778 RNA_def_property_range(prop, 1, 512);
779 RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering.");
780 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
782 prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
783 RNA_def_property_float_sdna(prop, NULL, "xasp");
784 RNA_def_property_range(prop, 1.0f, 200.0f);
785 RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
786 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
788 prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
789 RNA_def_property_float_sdna(prop, NULL, "yasp");
790 RNA_def_property_range(prop, 1.0f, 200.0f);
791 RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
792 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, NULL);
794 /* JPEG and AVI JPEG */
796 prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
797 RNA_def_property_int_sdna(prop, NULL, "quality");
798 RNA_def_property_range(prop, 1, 100);
799 RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
800 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
804 prop= RNA_def_property(srna, "tiff_bit", PROP_BOOLEAN, PROP_NONE);
805 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
806 RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
807 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
811 prop= RNA_def_property(srna, "cineon_log", PROP_BOOLEAN, PROP_NONE);
812 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
813 RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
814 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
816 prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
817 RNA_def_property_int_sdna(prop, NULL, "cineonblack");
818 RNA_def_property_range(prop, 0, 1024);
819 RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
820 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
822 prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
823 RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
824 RNA_def_property_range(prop, 0, 1024);
825 RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
826 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
828 prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
829 RNA_def_property_float_sdna(prop, NULL, "cineongamma");
830 RNA_def_property_range(prop, 0.0f, 10.0f);
831 RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
832 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
837 prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
838 RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
839 RNA_def_property_enum_items(prop, exr_codec_items);
840 RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
841 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
843 prop= RNA_def_property(srna, "exr_half", PROP_BOOLEAN, PROP_NONE);
844 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
845 RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel");
846 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
848 prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE);
849 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF);
850 RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int zbuffer)");
851 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
853 prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
854 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
855 RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
856 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
862 prop= RNA_def_property(srna, "jpeg_preset", PROP_ENUM, PROP_NONE);
863 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_preset");
864 RNA_def_property_enum_items(prop, jp2_preset_items);
865 RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
866 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
868 prop= RNA_def_property(srna, "jpeg_depth", PROP_ENUM, PROP_NONE);
869 RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
870 RNA_def_property_enum_items(prop, jp2_depth_items);
871 RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
872 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
874 prop= RNA_def_property(srna, "jpeg_ycc", PROP_BOOLEAN, PROP_NONE);
875 RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
876 RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
877 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
883 prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
884 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
885 RNA_def_property_enum_items(prop, ffmpeg_format_items);
886 RNA_def_property_ui_text(prop, "Format", "Output file format");
887 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
889 prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE);
890 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec");
891 RNA_def_property_enum_items(prop, ffmpeg_codec_items);
892 RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
893 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
895 prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
896 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
897 RNA_def_property_range(prop, 1, 14000);
898 RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate(kb/s)");
899 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
901 prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE);
902 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate");
903 RNA_def_property_range(prop, 0, 9000);
904 RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate(kb/s)");
905 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
907 prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE);
908 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate");
909 RNA_def_property_range(prop, 1, 14000);
910 RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate(kb/s)");
911 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
913 prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE);
914 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate");
915 RNA_def_property_range(prop, 0, 100000000);
916 RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
917 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
919 prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE);
920 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size");
921 RNA_def_property_range(prop, 0, 100);
922 RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
923 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
925 prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE);
926 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size");
927 RNA_def_property_range(prop, 0, 2000);
928 RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
929 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
931 prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE);
932 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size");
933 RNA_def_property_range(prop, 0, 16384);
934 RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
935 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
937 prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE);
938 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT);
939 RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary.");
940 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
944 prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
945 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
946 RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
947 RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
948 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
950 prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
951 RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
952 RNA_def_property_range(prop, 32, 384);
953 RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)");
954 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
956 prop= RNA_def_property(srna, "ffmpeg_multiplex_audio", PROP_BOOLEAN, PROP_NONE);
957 RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_MULTIPLEX_AUDIO);
958 RNA_def_property_ui_text(prop, "Multiplex Audio", "Interleave audio with the output video");
959 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
962 prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
963 RNA_def_property_int_sdna(prop, NULL, "frs_sec");
964 RNA_def_property_range(prop, 1, 120);
965 RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second.");
966 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
968 prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
969 RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
970 RNA_def_property_range(prop, 0.1f, 120.0f);
971 RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
972 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
974 prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
975 RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
976 RNA_def_property_range(prop, 0.0f, 2.0f);
977 RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding.");
978 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
980 prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE);
981 RNA_def_property_enum_sdna(prop, NULL, "filtertype");
982 RNA_def_property_enum_items(prop, pixel_filter_items);
983 RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples.");
984 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
986 prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
987 RNA_def_property_float_sdna(prop, NULL, "gauss");
988 RNA_def_property_range(prop, 0.5f, 1.5f);
989 RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples.");
990 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
992 prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
993 RNA_def_property_enum_sdna(prop, NULL, "alphamode");
994 RNA_def_property_enum_items(prop, alpha_mode_items);
995 RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels.");
996 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
998 prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
999 RNA_def_property_enum_sdna(prop, NULL, "ocres");
1000 RNA_def_property_enum_items(prop, octree_resolution_items);
1001 RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
1002 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1004 prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
1005 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
1006 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges.");
1007 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1009 prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
1010 RNA_def_property_enum_sdna(prop, NULL, "osa");
1011 RNA_def_property_enum_items(prop, fixed_oversample_items);
1012 RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel.");
1013 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1015 prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
1016 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
1017 RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output.");
1018 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1020 prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
1021 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1022 RNA_def_property_enum_items(prop, field_order_items);
1023 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");
1025 prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
1026 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
1027 RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
1028 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1030 prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
1031 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
1032 RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
1033 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1035 prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE);
1036 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
1037 RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering.");
1038 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1040 prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE);
1041 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
1042 RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering.");
1043 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1045 prop= RNA_def_property(srna, "render_sss", PROP_BOOLEAN, PROP_NONE);
1046 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
1047 RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering.");
1048 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1050 prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE);
1051 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
1052 RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects.");
1053 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1055 prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE);
1056 RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
1057 RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties.");
1058 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1060 prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
1061 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
1062 RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
1063 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1065 prop= RNA_def_property(srna, "edge_intensity", PROP_INT, PROP_NONE);
1066 RNA_def_property_int_sdna(prop, NULL, "edgeint");
1067 RNA_def_property_range(prop, 0, 255);
1068 RNA_def_property_ui_text(prop, "Edge Intensity", "Threshold for drawing outlines on geometry edges");
1069 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1071 prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
1072 RNA_def_property_float_sdna(prop, NULL, "edgeR");
1073 RNA_def_property_array(prop, 3);
1074 RNA_def_property_ui_text(prop, "Edge Color", "");
1075 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1077 prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
1078 RNA_def_property_int_sdna(prop, NULL, "threads");
1079 RNA_def_property_range(prop, 1, 8);
1080 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
1081 RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
1082 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1084 prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
1085 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
1086 RNA_def_property_enum_items(prop, threads_mode_items);
1087 RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
1089 prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
1090 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
1091 RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
1092 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1094 prop= RNA_def_property(srna, "border", PROP_BOOLEAN, PROP_NONE);
1095 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
1096 RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
1097 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1099 prop= RNA_def_property(srna, "crop_to_border", PROP_BOOLEAN, PROP_NONE);
1100 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
1101 RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
1102 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1104 prop= RNA_def_property(srna, "placeholders", PROP_BOOLEAN, PROP_NONE);
1105 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
1106 RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
1107 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1109 prop= RNA_def_property(srna, "no_overwrite", PROP_BOOLEAN, PROP_NONE);
1110 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
1111 RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering");
1112 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1114 prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
1115 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
1116 RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled.");
1117 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1119 prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
1120 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
1121 RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
1122 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1124 prop= RNA_def_property(srna, "color_management", PROP_BOOLEAN, PROP_NONE);
1125 RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
1126 RNA_def_property_ui_text(prop, "Color Management", "Use color profiles and gamma corrected imaging pipeline");
1127 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_MATERIAL|ND_SHADING, NULL);
1129 prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE);
1130 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
1131 RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
1132 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1134 prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
1135 RNA_def_property_enum_sdna(prop, NULL, "imtype");
1136 RNA_def_property_enum_items(prop, image_type_items);
1137 RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
1138 RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
1139 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1141 prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
1142 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
1143 RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");
1144 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1146 prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
1147 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
1148 RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
1149 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).");
1150 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1152 prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
1153 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
1154 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.");
1155 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1157 prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
1158 RNA_def_property_boolean_sdna(prop, NULL, "bufflag", R_BACKBUF);
1159 RNA_def_property_ui_text(prop, "Back Buffer", "Render backbuffer image");
1160 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1162 prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
1163 RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
1164 RNA_def_property_enum_items(prop, display_mode_items);
1165 RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
1167 prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
1168 RNA_def_property_string_sdna(prop, NULL, "pic");
1169 RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
1170 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1172 prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
1173 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
1174 RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
1175 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1177 prop= RNA_def_property(srna, "stamp_date", PROP_BOOLEAN, PROP_NONE);
1178 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
1179 RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
1180 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1182 prop= RNA_def_property(srna, "stamp_frame", PROP_BOOLEAN, PROP_NONE);
1183 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
1184 RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
1185 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1187 prop= RNA_def_property(srna, "stamp_camera", PROP_BOOLEAN, PROP_NONE);
1188 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
1189 RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
1190 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1192 prop= RNA_def_property(srna, "stamp_scene", PROP_BOOLEAN, PROP_NONE);
1193 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
1194 RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
1195 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1197 prop= RNA_def_property(srna, "stamp_note", PROP_BOOLEAN, PROP_NONE);
1198 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
1199 RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
1200 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1202 prop= RNA_def_property(srna, "stamp_marker", PROP_BOOLEAN, PROP_NONE);
1203 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
1204 RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
1205 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1207 prop= RNA_def_property(srna, "stamp_filename", PROP_BOOLEAN, PROP_NONE);
1208 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
1209 RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata");
1210 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1212 prop= RNA_def_property(srna, "stamp_sequence_strip", PROP_BOOLEAN, PROP_NONE);
1213 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
1214 RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
1215 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1217 prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
1218 RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
1219 RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
1220 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1222 prop= RNA_def_property(srna, "render_stamp", PROP_BOOLEAN, PROP_NONE);
1223 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
1224 RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
1225 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1227 prop= RNA_def_property(srna, "stamp_font_size", PROP_ENUM, PROP_NONE);
1228 RNA_def_property_enum_sdna(prop, NULL, "stamp_font_id");
1229 RNA_def_property_enum_items(prop, stamp_font_size_items);
1230 RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp text");
1231 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1233 prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
1234 RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
1235 RNA_def_property_array(prop, 4);
1236 RNA_def_property_range(prop,0.0,1.0);
1237 RNA_def_property_ui_text(prop, "Stamp Foreground", "Stamp text color");
1238 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1240 prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
1241 RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
1242 RNA_def_property_array(prop, 4);
1243 RNA_def_property_range(prop,0.0,1.0);
1244 RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text");
1245 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1247 prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
1248 RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
1249 RNA_def_property_struct_type(prop, "SceneRenderLayer");
1250 RNA_def_property_ui_text(prop, "Render Layers", "");
1252 prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
1253 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
1254 RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
1255 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1257 prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
1258 RNA_def_property_int_sdna(prop, NULL, "actlay");
1259 RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
1260 RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
1261 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1264 void RNA_def_scene(BlenderRNA *brna)
1269 srna= RNA_def_struct(brna, "Scene", "ID");
1270 RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
1271 RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
1272 RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
1274 prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
1275 RNA_def_property_flag(prop, PROP_EDITABLE);
1276 RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene.");
1278 prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
1279 RNA_def_property_flag(prop, PROP_EDITABLE);
1280 RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
1282 prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_VECTOR);
1283 RNA_def_property_float_sdna(prop, NULL, "cursor");
1284 RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
1285 RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
1287 prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
1288 RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
1289 RNA_def_property_struct_type(prop, "Object");
1290 RNA_def_property_ui_text(prop, "Objects", "");
1291 RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
1293 prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
1294 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
1295 RNA_def_property_array(prop, 20);
1296 RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
1297 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
1299 prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_NONE);
1300 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1301 RNA_def_property_int_sdna(prop, NULL, "r.cfra");
1302 RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
1303 RNA_def_property_ui_text(prop, "Current Frame", "");
1304 RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
1306 prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
1307 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1308 RNA_def_property_int_sdna(prop, NULL, "r.sfra");
1309 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
1310 RNA_def_property_ui_text(prop, "Start Frame", "");
1311 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1313 prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
1314 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1315 RNA_def_property_int_sdna(prop, NULL, "r.efra");
1316 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
1317 RNA_def_property_ui_text(prop, "End Frame", "");
1318 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1320 prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
1321 RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
1322 RNA_def_property_int_sdna(prop, NULL, "frame_step");
1323 RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
1324 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1326 prop= RNA_def_property(srna, "stamp_note", PROP_STRING, PROP_NONE);
1327 RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
1328 RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
1329 RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
1331 prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
1332 RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
1334 prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
1335 RNA_def_property_pointer_sdna(prop, NULL, "ed");
1336 RNA_def_property_struct_type(prop, "SequenceEditor");
1337 RNA_def_property_ui_text(prop, "Sequence Editor", "");
1339 prop= RNA_def_property(srna, "keyingsets", PROP_COLLECTION, PROP_NONE);
1340 RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
1341 RNA_def_property_struct_type(prop, "KeyingSet");
1342 RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene.");
1344 prop= RNA_def_property(srna, "active_keyingset", PROP_INT, PROP_NONE);
1345 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1346 RNA_def_property_ui_text(prop, "Active Keying Set", "Current Keying Set index.");
1348 prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
1349 RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
1350 RNA_def_property_struct_type(prop, "ToolSettings");
1351 RNA_def_property_ui_text(prop, "Tool Settings", "");
1353 prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE);
1354 RNA_def_property_pointer_sdna(prop, NULL, "r");
1355 RNA_def_property_struct_type(prop, "SceneRenderData");
1356 RNA_def_property_ui_text(prop, "Render Data", "");
1358 prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
1359 RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
1360 RNA_def_property_struct_type(prop, "TimelineMarker");
1361 RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
1363 rna_def_tool_settings(brna);
1364 rna_def_scene_render_data(brna);
1365 rna_def_scene_render_layer(brna);