#include "DNA_scene_types.h"
-/*
+#ifdef WITH_FFMPEG
#include "BKE_writeffmpeg.h"
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
-*/
+#endif
#include "WM_types.h"
#ifdef RNA_RUNTIME
+#include "DNA_node_types.h"
+
#include "BKE_context.h"
#include "BKE_global.h"
+#include "BKE_node.h"
+
+#include "BLI_threads.h"
PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
{
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
}
-static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
+static int layer_set(int lay, const int *values)
{
- Scene *scene= (Scene*)ptr->data;
int i, tot= 0;
/* ensure we always have some layer selected */
tot++;
if(tot==0)
- return;
+ return lay;
for(i=0; i<20; i++) {
- if(values[i]) scene->lay |= (1<<i);
- else scene->lay &= ~(1<<i);
+ if(values[i]) lay |= (1<<i);
+ else lay &= ~(1<<i);
}
+
+ return lay;
+}
+
+static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
+{
+ Scene *scene= (Scene*)ptr->data;
+
+ scene->lay= layer_set(scene->lay, values);
}
static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
//update_for_newframe();
}
+static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ if(rd->mode & R_FIXED_THREADS)
+ return rd->threads;
+ else
+ return BLI_system_thread_count();
+}
+
+static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
+}
+
+static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ rd->imtype= value;
+ ffmpeg_verify_image_type(rd);
+}
+
+static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+ return rd->actlay;
+}
+
+static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+ rd->actlay= value;
+}
+
+static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ *min= 0;
+ *max= BLI_countlist(&rd->layers)-1;
+ *max= MAX2(0, *max);
+}
+
+static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
+{
+ Scene *scene= (Scene*)ptr->id.data;
+ SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+
+ BLI_strncpy(rl->name, value, sizeof(rl->name));
+
+ if(scene->nodetree) {
+ bNode *node;
+ int index= BLI_findindex(&scene->r.layers, rl);
+
+ for(node= scene->nodetree->nodes.first; node; node= node->next) {
+ if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
+ if(node->custom1==index)
+ BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
+ }
+ }
+ }
+}
+
+static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
+{
+ SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+ rl->lay= layer_set(rl->lay, values);
+}
+
+static void rna_SceneRenderLayer_zmask_layer_set(PointerRNA *ptr, const int *values)
+{
+ SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+ rl->lay_zmask= layer_set(rl->lay_zmask, values);
+}
+
+static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= (Scene*)ptr->id.data;
+
+ if(scene->nodetree)
+ ntreeCompositForceHidden(scene->nodetree, scene);
+}
+
#else
void rna_def_sculpt(BlenderRNA *brna)
rna_def_sculpt(brna);
}
+void rna_def_scene_render_layer(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
+ RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Name", "Render layer name.");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
+ RNA_def_property_struct_type(prop, "Material");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Group");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ /* layers */
+ prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
+ RNA_def_property_array(prop, 20);
+ RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
+
+ prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
+ RNA_def_property_array(prop, 20);
+ RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set");
+
+ /* layer options */
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
+ RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
+ RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
+ RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
+ RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
+ RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* passes */
+ prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
+ RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
+ RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
+ RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
+ RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
+ RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
+ RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
+ RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
+ RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
+ RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
+ RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
+ RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
+ RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
+ RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
+ RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
+ RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
+ RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
+ RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
+ RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+
+ prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
+ RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+}
+
void rna_def_scene_render_data(BlenderRNA *brna)
{
StructRNA *srna;
static EnumPropertyItem image_type_items[] = {
- {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
-#ifdef WITH_FFMPEG
- {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
+ {R_PNG, "PNG", 0, "PNG", ""},
+ {R_JPEG90, "JPEG", 0, "JPEG", ""},
+#ifdef WITH_OPENJPEG
+ {R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
+#endif
+ {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
+ {R_BMP, "BMP", 0, "BMP", ""},
+ {R_TARGA, "TARGA", 0, "Targa", ""},
+ {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
+ //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
+ {R_HAMX, "HAMX", 0, "HamX", ""},
+ {R_IRIS, "IRIS", 0, "Iris", ""},
+ {0, "", 0, NULL, NULL},
+#ifdef WITH_OPENEXR
+ {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
+ {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
#endif
+ {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
+ {R_CINEON, "CINEON", 0, "Cineon", ""},
+ {R_DPX, "DPX", 0, "DPX", ""},
+ {0, "", 0, NULL, NULL},
{R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
{R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
#ifdef _WIN32
#ifdef WITH_QUICKTIME
{R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""},
#endif
- {R_TARGA, "TARGA", 0, "Targa", ""},
- {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
- {R_PNG, "PNG", 0, "PNG", ""},
- //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
-//#ifdef WITH_OPENJPEG
- {R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
-//#endif
- {R_BMP, "BMP", 0, "BMP", ""},
- {R_JPEG90, "JPEG", 0, "JPEG", ""},
- {R_HAMX, "HAMX", 0, "HamX", ""},
- {R_IRIS, "IRIS", 0, "Iris", ""},
- {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
- {R_CINEON, "CINEON", 0, "Cineon", ""},
- {R_DPX, "DPX", 0, "DPX", ""},
#ifdef __sgi
{R_MOVIE, "MOVIE", 0, "Movie", ""},
#endif
-//#ifdef WITH_OPENEXR
- {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
- {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
-//#endif
- {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
+#ifdef WITH_FFMPEG
+ {R_H264, "H264", 0, "H.264", ""},
+ {R_XVID, "XVID", 0, "Xvid", ""},
+ // XXX broken
+#if 0
+#ifdef WITH_OGG
+ {R_THEORA, "THEORA", 0, "Ogg Theora", ""},
+#endif
+#endif
+ {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
+#endif
+ {0, "", 0, NULL, NULL},
+ {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
{0, NULL, 0, NULL, NULL}};
-//#ifdef WITH_OPENEXR
+#ifdef WITH_OPENEXR
static EnumPropertyItem exr_codec_items[] = {
{0, "NONE", 0, "None", ""},
{1, "PXR24", 0, "Pxr24 (lossy)", ""},
{3, "PIZ", 0, "PIZ (lossless)", ""},
{4, "RLE", 0, "RLE (lossless)", ""},
{0, NULL, 0, NULL, NULL}};
-//#endif
+#endif
-//#ifdef WITH_OPENJPEG
+#ifdef WITH_OPENJPEG
static EnumPropertyItem jp2_preset_items[] = {
{0, "NO_PRESET", 0, "No Preset", ""},
{1, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 2048x1080", ""},
{R_JPEG2K_12BIT, "16", 0, "16", ""},
{R_JPEG2K_16BIT, "32", 0, "32", ""},
{0, NULL, 0, NULL, NULL}};
-//#endif
+#endif
-/*
#ifdef WITH_FFMPEG
static EnumPropertyItem ffmpeg_format_items[] = {
{FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
{FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
{FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
- {FFMPEG_AVI, "AVI", 0, "Avi", ""},
+ {FFMPEG_AVI, "AVI", 0, "AVI", ""},
{FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
{FFMPEG_DV, "DV", 0, "DV", ""},
- {FFMPEG_H264, "H264", 0, "H264", ""},
- {FFMPEG_XVID, "XVID", 0, "XVid", ""},
- {FFMPEG_OGG, "OGG", 0, "OGG", ""},
+ {FFMPEG_H264, "H264", 0, "H.264", ""},
+ {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
+ // XXX broken
+#if 0
+#ifdef WITH_OGG
+ {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
+#endif
+#endif
{FFMPEG_FLV, "FLASH", 0, "Flash", ""},
{0, NULL, 0, NULL, NULL}};
{CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
{CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
{CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
- {CODEC_ID_H264, "H264", 0, "H264", ""},
- {CODEC_ID_XVID, "XVID", 0, "XVid", ""},
- {CODEC_ID_THEORA, "THEORA", 0, "OGG Theora", ""},
- {CODEC_ID_FLV1, "FLASH", 0, "FlashVideo1", ""},
+ {CODEC_ID_H264, "H264", 0, "H.264", ""},
+ {CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
+#ifdef WITH_OGG
+ {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
+#endif
+ {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem ffmpeg_audio_codec_items[] = {
{CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
{0, NULL, 0, NULL, NULL}};
#endif
-*/
srna= RNA_def_struct(brna, "SceneRenderData", NULL);
RNA_def_struct_sdna(srna, "RenderData");
RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-//#ifdef WITH_OPENEXR
+#ifdef WITH_OPENEXR
/* OpenEXR */
prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-//#endif
+#endif
-//#ifdef WITH_OPENJPEG
+#ifdef WITH_OPENJPEG
/* Jpeg 2000 */
prop= RNA_def_property(srna, "jpeg_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-//#endif
+#endif
#ifdef WITH_FFMPEG
/* FFMPEG Video*/
- /*
prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
RNA_def_property_enum_items(prop, ffmpeg_format_items);
RNA_def_property_enum_items(prop, ffmpeg_codec_items);
RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- */
prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
/* FFMPEG Audio*/
- /*
prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
- RNA_def_property_ui_text(prop, Codec", "FFMpeg codec to use");
+ RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- */
prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
RNA_def_property_ui_text(prop, "Edge Color", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "panorama", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PANORAMA);
- RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "threads");
RNA_def_property_range(prop, 1, 8);
+ RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "do_composite", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
- RNA_def_property_ui_text(prop, "Do Composite", "Process the render result through the compositing pipeline");
+ RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if a compositing nodes are enabled.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "do_sequence", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
- RNA_def_property_ui_text(prop, "Do Sequence", "Process the render (and composited) result through the video sequence editor pipeline");
+ RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
- RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, allows Full Sampling).");
+ RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
+ 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).");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
- 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");
+ 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.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "stamp", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_STAMP_INFO);
- RNA_def_property_ui_text(prop, "Stamp", "Embed metadata into the rendered image");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
+ RNA_def_property_struct_type(prop, "SceneRenderLayer");
+ RNA_def_property_ui_text(prop, "Render Layers", "");
+
+ prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
+ RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "actlay");
+ RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
+ RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
}
void RNA_def_scene(BlenderRNA *brna)
rna_def_tool_settings(brna);
rna_def_scene_render_data(brna);
+ rna_def_scene_render_layer(brna);
}
#endif