Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 1,280 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Scene *scene = (Scene *) ptr->id.data; | Scene *scene = (Scene *) ptr->id.data; | ||||
| RenderData *rd = &scene->r; | RenderData *rd = &scene->r; | ||||
| BKE_ffmpeg_codec_settings_verify(rd); | BKE_ffmpeg_codec_settings_verify(rd); | ||||
| } | } | ||||
| #endif | #endif | ||||
| static int rna_RenderSettings_active_layer_index_get(PointerRNA *ptr) | |||||
| { | |||||
| RenderData *rd = (RenderData *)ptr->data; | |||||
| return rd->actlay; | |||||
| } | |||||
| static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value) | |||||
| { | |||||
| RenderData *rd = (RenderData *)ptr->data; | |||||
| int num_layers = BLI_listbase_count(&rd->layers); | |||||
| rd->actlay = min_ff(value, num_layers - 1); | |||||
| } | |||||
| static void rna_RenderSettings_active_layer_index_range( | |||||
| PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | |||||
| { | |||||
| RenderData *rd = (RenderData *)ptr->data; | |||||
| *min = 0; | |||||
| *max = max_ii(0, BLI_listbase_count(&rd->layers) - 1); | |||||
| } | |||||
| static PointerRNA rna_RenderSettings_active_layer_get(PointerRNA *ptr) | |||||
| { | |||||
| RenderData *rd = (RenderData *)ptr->data; | |||||
| SceneRenderLayer *srl = BLI_findlink(&rd->layers, rd->actlay); | |||||
| return rna_pointer_inherit_refine(ptr, &RNA_SceneRenderLayer, srl); | |||||
| } | |||||
| static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA value) | |||||
| { | |||||
| RenderData *rd = (RenderData *)ptr->data; | |||||
| SceneRenderLayer *srl = (SceneRenderLayer *)value.data; | |||||
| const int index = BLI_findindex(&rd->layers, srl); | |||||
| if (index != -1) rd->actlay = index; | |||||
| } | |||||
| static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), const char *name) | |||||
| { | |||||
| Scene *scene = (Scene *)id; | |||||
| SceneRenderLayer *srl = BKE_scene_add_render_layer(scene, name); | |||||
| DEG_id_tag_update(&scene->id, 0); | |||||
| WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| return srl; | |||||
| } | |||||
| static void rna_RenderLayer_remove( | |||||
| ID *id, RenderData *UNUSED(rd), Main *bmain, ReportList *reports, PointerRNA *srl_ptr) | |||||
| { | |||||
| SceneRenderLayer *srl = srl_ptr->data; | |||||
| Scene *scene = (Scene *)id; | |||||
| if (!BKE_scene_remove_render_layer(bmain, scene, srl)) { | |||||
| BKE_reportf(reports, RPT_ERROR, "Render layer '%s' could not be removed from scene '%s'", | |||||
| srl->name, scene->id.name + 2); | |||||
| return; | |||||
| } | |||||
| RNA_POINTER_INVALIDATE(srl_ptr); | |||||
| DEG_id_tag_update(&scene->id, 0); | |||||
| WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| } | |||||
| static int rna_RenderSettings_active_view_index_get(PointerRNA *ptr) | static int rna_RenderSettings_active_view_index_get(PointerRNA *ptr) | ||||
| { | { | ||||
| RenderData *rd = (RenderData *)ptr->data; | RenderData *rd = (RenderData *)ptr->data; | ||||
| return rd->actview; | return rd->actview; | ||||
| } | } | ||||
| static void rna_RenderSettings_active_view_index_set(PointerRNA *ptr, int value) | static void rna_RenderSettings_active_view_index_set(PointerRNA *ptr, int value) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | static void rna_RenderSettings_views_format_set(PointerRNA *ptr, int value) | ||||
| { | { | ||||
| /* make sure the actview is visible */ | /* make sure the actview is visible */ | ||||
| if (rd->actview > 1) rd->actview = 1; | if (rd->actview > 1) rd->actview = 1; | ||||
| } | } | ||||
| rd->views_format = value; | rd->views_format = value; | ||||
| } | } | ||||
| static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->id.data; | Scene *scene = (Scene *)ptr->id.data; | ||||
| DEG_id_tag_update(&scene->id, 0); | DEG_id_tag_update(&scene->id, 0); | ||||
| } | } | ||||
| static void rna_Scene_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_Scene_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| Scene *sc = (Scene *)ptr->id.data; | Scene *sc = (Scene *)ptr->id.data; | ||||
| rna_Scene_glsl_update(bmain, scene, ptr); | rna_Scene_glsl_update(bmain, scene, ptr); | ||||
| WM_main_add_notifier(NC_WORLD | ND_WORLD, &sc->id); | WM_main_add_notifier(NC_WORLD | ND_WORLD, &sc->id); | ||||
| } | } | ||||
| static void rna_Scene_freestyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | void rna_Scene_freestyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->id.data; | Scene *scene = (Scene *)ptr->id.data; | ||||
| DEG_id_tag_update(&scene->id, 0); | DEG_id_tag_update(&scene->id, 0); | ||||
| } | } | ||||
| static void rna_Scene_use_view_map_cache_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | void rna_Scene_use_view_map_cache_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| #ifdef WITH_FREESTYLE | #ifdef WITH_FREESTYLE | ||||
| FRS_free_view_map_cache(); | FRS_free_view_map_cache(); | ||||
| #endif | #endif | ||||
| } | } | ||||
| static IDProperty *rna_SceneRenderLayer_idprops(PointerRNA *ptr, bool create) | void rna_SceneLayer_name_set(PointerRNA *ptr, const char *value) | ||||
| { | |||||
| SceneRenderLayer *srl = (SceneRenderLayer *)ptr->data; | |||||
| if (create && !srl->prop) { | |||||
| IDPropertyTemplate val = {0}; | |||||
| srl->prop = IDP_New(IDP_GROUP, &val, "SceneRenderLayer ID properties"); | |||||
| } | |||||
| return srl->prop; | |||||
| } | |||||
| static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value) | |||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->id.data; | Scene *scene = (Scene *)ptr->id.data; | ||||
| SceneRenderLayer *rl = (SceneRenderLayer *)ptr->data; | SceneLayer *scene_layer = (SceneLayer *)ptr->data; | ||||
| char oldname[sizeof(rl->name)]; | char oldname[sizeof(scene_layer->name)]; | ||||
| BLI_strncpy(oldname, rl->name, sizeof(rl->name)); | BLI_strncpy(oldname, scene_layer->name, sizeof(scene_layer->name)); | ||||
| BLI_strncpy_utf8(rl->name, value, sizeof(rl->name)); | BLI_strncpy_utf8(scene_layer->name, value, sizeof(scene_layer->name)); | ||||
| BLI_uniquename(&scene->r.layers, rl, DATA_("RenderLayer"), '.', offsetof(SceneRenderLayer, name), sizeof(rl->name)); | BLI_uniquename(&scene->render_layers, scene_layer, DATA_("RenderLayer"), '.', offsetof(SceneLayer, name), sizeof(scene_layer->name)); | ||||
| if (scene->nodetree) { | if (scene->nodetree) { | ||||
| bNode *node; | bNode *node; | ||||
| int index = BLI_findindex(&scene->r.layers, rl); | int index = BLI_findindex(&scene->render_layers, scene_layer); | ||||
| for (node = scene->nodetree->nodes.first; node; node = node->next) { | for (node = scene->nodetree->nodes.first; node; node = node->next) { | ||||
| if (node->type == CMP_NODE_R_LAYERS && node->id == NULL) { | if (node->type == CMP_NODE_R_LAYERS && node->id == NULL) { | ||||
| if (node->custom1 == index) | if (node->custom1 == index) | ||||
| BLI_strncpy(node->name, rl->name, NODE_MAXSTR); | BLI_strncpy(node->name, scene_layer->name, NODE_MAXSTR); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* fix all the animation data which may link to this */ | /* fix all the animation data which may link to this */ | ||||
| BKE_animdata_fix_paths_rename_all(NULL, "render.layers", oldname, rl->name); | BKE_animdata_fix_paths_rename_all(NULL, "render.layers", oldname, scene_layer->name); | ||||
| } | |||||
| static char *rna_SceneRenderLayer_path(PointerRNA *ptr) | |||||
| { | |||||
| SceneRenderLayer *srl = (SceneRenderLayer *)ptr->data; | |||||
| char name_esc[sizeof(srl->name) * 2]; | |||||
| BLI_strescape(name_esc, srl->name, sizeof(name_esc)); | |||||
| return BLI_sprintfN("render.layers[\"%s\"]", name_esc); | |||||
| } | } | ||||
| static void rna_SceneRenderView_name_set(PointerRNA *ptr, const char *value) | static void rna_SceneRenderView_name_set(PointerRNA *ptr, const char *value) | ||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->id.data; | Scene *scene = (Scene *)ptr->id.data; | ||||
| SceneRenderView *rv = (SceneRenderView *)ptr->data; | SceneRenderView *rv = (SceneRenderView *)ptr->data; | ||||
| BLI_strncpy_utf8(rv->name, value, sizeof(rv->name)); | BLI_strncpy_utf8(rv->name, value, sizeof(rv->name)); | ||||
| BLI_uniquename(&scene->r.views, rv, DATA_("RenderView"), '.', offsetof(SceneRenderView, name), sizeof(rv->name)); | BLI_uniquename(&scene->r.views, rv, DATA_("RenderView"), '.', offsetof(SceneRenderView, name), sizeof(rv->name)); | ||||
| } | } | ||||
| static char *rna_SceneRenderView_path(PointerRNA *ptr) | void rna_SceneLayer_pass_update(Main *bmain, Scene *activescene, PointerRNA *ptr) | ||||
| { | |||||
| SceneRenderView *srv = (SceneRenderView *)ptr->data; | |||||
| return BLI_sprintfN("render.views[\"%s\"]", srv->name); | |||||
| } | |||||
| static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values) | |||||
| { | |||||
| SceneRenderLayer *rl = (SceneRenderLayer *)ptr->data; | |||||
| rl->lay = ED_view3d_scene_layer_set(rl->lay, values, NULL); | |||||
| } | |||||
| static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, PointerRNA *ptr) | |||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->id.data; | Scene *scene = (Scene *)ptr->id.data; | ||||
| if (scene->nodetree) | if (scene->nodetree) | ||||
| ntreeCompositUpdateRLayers(scene->nodetree); | ntreeCompositUpdateRLayers(scene->nodetree); | ||||
| rna_Scene_glsl_update(bmain, activescene, ptr); | rna_Scene_glsl_update(bmain, activescene, ptr); | ||||
| } | } | ||||
| static void rna_SceneRenderLayer_update_render_passes(ID *id) | static char *rna_SceneRenderView_path(PointerRNA *ptr) | ||||
| { | { | ||||
| Scene *scene = (Scene *)id; | SceneRenderView *srv = (SceneRenderView *)ptr->data; | ||||
| if (scene->nodetree) | return BLI_sprintfN("render.views[\"%s\"]", srv->name); | ||||
| ntreeCompositUpdateRLayers(scene->nodetree); | |||||
| } | } | ||||
| static void rna_Scene_use_nodes_update(bContext *C, PointerRNA *ptr) | static void rna_Scene_use_nodes_update(bContext *C, PointerRNA *ptr) | ||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->data; | Scene *scene = (Scene *)ptr->data; | ||||
| if (scene->use_nodes && scene->nodetree == NULL) | if (scene->use_nodes && scene->nodetree == NULL) | ||||
| ED_node_composit_default(C, scene); | ED_node_composit_default(C, scene); | ||||
| ▲ Show 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | ||||
| BKE_sequencer_preprocessed_cache_cleanup(); | BKE_sequencer_preprocessed_cache_cleanup(); | ||||
| } | } | ||||
| static char *rna_ToolSettings_path(PointerRNA *UNUSED(ptr)) | static char *rna_ToolSettings_path(PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| return BLI_strdup("tool_settings"); | return BLI_strdup("tool_settings"); | ||||
| } | } | ||||
| static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr) | PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr) | ||||
| { | { | ||||
| FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data; | FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data; | ||||
| return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineStyle, lineset->linestyle); | return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineStyle, lineset->linestyle); | ||||
| } | } | ||||
| static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value) | void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value) | ||||
| { | { | ||||
| FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data; | FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data; | ||||
| if (lineset->linestyle) | if (lineset->linestyle) | ||||
| id_us_min(&lineset->linestyle->id); | id_us_min(&lineset->linestyle->id); | ||||
| lineset->linestyle = (FreestyleLineStyle *)value.data; | lineset->linestyle = (FreestyleLineStyle *)value.data; | ||||
| id_us_plus(&lineset->linestyle->id); | id_us_plus(&lineset->linestyle->id); | ||||
| } | } | ||||
| static FreestyleLineSet *rna_FreestyleSettings_lineset_add( | FreestyleLineSet *rna_FreestyleSettings_lineset_add( | ||||
| ID *id, FreestyleSettings *config, Main *bmain, const char *name) | ID *id, FreestyleSettings *config, Main *bmain, const char *name) | ||||
| { | { | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| FreestyleLineSet *lineset = BKE_freestyle_lineset_add(bmain, (FreestyleConfig *)config, name); | FreestyleLineSet *lineset = BKE_freestyle_lineset_add(bmain, (FreestyleConfig *)config, name); | ||||
| DEG_id_tag_update(&scene->id, 0); | DEG_id_tag_update(&scene->id, 0); | ||||
| WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| return lineset; | return lineset; | ||||
| } | } | ||||
| static void rna_FreestyleSettings_lineset_remove( | void rna_FreestyleSettings_lineset_remove( | ||||
| ID *id, FreestyleSettings *config, ReportList *reports, PointerRNA *lineset_ptr) | ID *id, FreestyleSettings *config, ReportList *reports, PointerRNA *lineset_ptr) | ||||
| { | { | ||||
| FreestyleLineSet *lineset = lineset_ptr->data; | FreestyleLineSet *lineset = lineset_ptr->data; | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| if (!BKE_freestyle_lineset_delete((FreestyleConfig *)config, lineset)) { | if (!BKE_freestyle_lineset_delete((FreestyleConfig *)config, lineset)) { | ||||
| BKE_reportf(reports, RPT_ERROR, "Line set '%s' could not be removed", lineset->name); | BKE_reportf(reports, RPT_ERROR, "Line set '%s' could not be removed", lineset->name); | ||||
| return; | return; | ||||
| } | } | ||||
| RNA_POINTER_INVALIDATE(lineset_ptr); | RNA_POINTER_INVALIDATE(lineset_ptr); | ||||
| DEG_id_tag_update(&scene->id, 0); | DEG_id_tag_update(&scene->id, 0); | ||||
| WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| } | } | ||||
| static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr) | PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr) | ||||
| { | { | ||||
| FreestyleConfig *config = (FreestyleConfig *)ptr->data; | FreestyleConfig *config = (FreestyleConfig *)ptr->data; | ||||
| FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config); | FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config); | ||||
| return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset); | return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset); | ||||
| } | } | ||||
| static void rna_FreestyleSettings_active_lineset_index_range( | void rna_FreestyleSettings_active_lineset_index_range( | ||||
| PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | ||||
| { | { | ||||
| FreestyleConfig *config = (FreestyleConfig *)ptr->data; | FreestyleConfig *config = (FreestyleConfig *)ptr->data; | ||||
| *min = 0; | *min = 0; | ||||
| *max = max_ii(0, BLI_listbase_count(&config->linesets) - 1); | *max = max_ii(0, BLI_listbase_count(&config->linesets) - 1); | ||||
| } | } | ||||
| static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr) | int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr) | ||||
| { | { | ||||
| FreestyleConfig *config = (FreestyleConfig *)ptr->data; | FreestyleConfig *config = (FreestyleConfig *)ptr->data; | ||||
| return BKE_freestyle_lineset_get_active_index(config); | return BKE_freestyle_lineset_get_active_index(config); | ||||
| } | } | ||||
| static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value) | void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value) | ||||
| { | { | ||||
| FreestyleConfig *config = (FreestyleConfig *)ptr->data; | FreestyleConfig *config = (FreestyleConfig *)ptr->data; | ||||
| BKE_freestyle_lineset_set_active_index(config, value); | BKE_freestyle_lineset_set_active_index(config, value); | ||||
| } | } | ||||
| static FreestyleModuleConfig *rna_FreestyleSettings_module_add(ID *id, FreestyleSettings *config) | FreestyleModuleConfig *rna_FreestyleSettings_module_add(ID *id, FreestyleSettings *config) | ||||
| { | { | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| FreestyleModuleConfig *module = BKE_freestyle_module_add((FreestyleConfig *)config); | FreestyleModuleConfig *module = BKE_freestyle_module_add((FreestyleConfig *)config); | ||||
| DEG_id_tag_update(&scene->id, 0); | DEG_id_tag_update(&scene->id, 0); | ||||
| WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| return module; | return module; | ||||
| } | } | ||||
| static void rna_FreestyleSettings_module_remove( | void rna_FreestyleSettings_module_remove( | ||||
| ID *id, FreestyleSettings *config, ReportList *reports, PointerRNA *module_ptr) | ID *id, FreestyleSettings *config, ReportList *reports, PointerRNA *module_ptr) | ||||
| { | { | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| FreestyleModuleConfig *module = module_ptr->data; | FreestyleModuleConfig *module = module_ptr->data; | ||||
| if (!BKE_freestyle_module_delete((FreestyleConfig *)config, module)) { | if (!BKE_freestyle_module_delete((FreestyleConfig *)config, module)) { | ||||
| if (module->script) | if (module->script) | ||||
| BKE_reportf(reports, RPT_ERROR, "Style module '%s' could not be removed", module->script->id.name + 2); | BKE_reportf(reports, RPT_ERROR, "Style module '%s' could not be removed", module->script->id.name + 2); | ||||
| ▲ Show 20 Lines • Show All 1,281 Lines • ▼ Show 20 Lines | static void rna_def_unit_settings(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, NC_WINDOW, NULL); | RNA_def_property_update(prop, NC_WINDOW, NULL); | ||||
| } | } | ||||
| void rna_def_render_layer_common(StructRNA *srna, int scene) | void rna_def_render_layer_common(StructRNA *srna, int scene) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | ||||
| if (scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set"); | if (scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneLayer_name_set"); | ||||
| else RNA_def_property_string_sdna(prop, NULL, "name"); | else RNA_def_property_string_sdna(prop, NULL, "name"); | ||||
| RNA_def_property_ui_text(prop, "Name", "Render layer name"); | RNA_def_property_ui_text(prop, "Name", "Render layer name"); | ||||
| RNA_def_struct_name_property(srna, prop); | RNA_def_struct_name_property(srna, prop); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| 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"); | |||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | |||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| prop = RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "light_override"); | |||||
| 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"); | |||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | |||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| /* layers */ | |||||
| prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER); | |||||
| 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"); | |||||
| if (scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set"); | |||||
| else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set"); | |||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | |||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| /* this seems to be too much trouble with depsgraph updates/etc. currently (20140423) */ | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| prop = RNA_def_property(srna, "layers_zmask", PROP_BOOLEAN, PROP_LAYER); | |||||
| 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 for solid faces"); | |||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | |||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| prop = RNA_def_property(srna, "layers_exclude", PROP_BOOLEAN, PROP_LAYER); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "lay_exclude", 1); | |||||
| RNA_def_property_array(prop, 20); | |||||
| RNA_def_property_ui_text(prop, "Exclude Layers", "Exclude scene layers from having any influence"); | |||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | |||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| if (scene) { | if (scene) { | ||||
| prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED); | |||||
| RNA_def_property_ui_text(prop, "Samples", "Override number of render samples for this render layer, " | |||||
| "0 will use the scene setting"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "pass_alpha_threshold", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "pass_alpha_threshold", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_ui_text(prop, "Alpha Threshold", | RNA_def_property_ui_text(prop, "Alpha Threshold", | ||||
| "Z, Index, normal, UV and vector passes are only affected by surfaces with " | "Z, Index, normal, UV and vector passes are only affected by surfaces with " | ||||
| "alpha transparency equal to or higher than this threshold"); | "alpha transparency equal to or higher than this threshold"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| } | } | ||||
| /* layer options */ | /* layer options */ | ||||
| prop = RNA_def_property(srna, "use", 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"); | |||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | |||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK); | 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_ui_text(prop, "Zmask", "Only render what's in front of the solid z values"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK); | RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK); | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | void rna_def_render_layer_common(StructRNA *srna, int scene) | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND); | RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND); | ||||
| RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer"); | RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_FRS); | |||||
| RNA_def_property_ui_text(prop, "Freestyle", "Render stylized strokes in this Layer"); | |||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); | |||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| /* passes */ | /* passes */ | ||||
| prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED); | 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_ui_text(prop, "Combined", "Deliver full combined RGBA buffer"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z); | 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_ui_text(prop, "Z", "Deliver Z values pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR); | 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_ui_text(prop, "Vector", "Deliver speed vector pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL); | ||||
| RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass"); | RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV); | 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_ui_text(prop, "UV", "Deliver texture UV pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST); | 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_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0)"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB); | 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_ui_text(prop, "Object Index", "Deliver object index pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA); | ||||
| RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass"); | RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA); | 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_ui_text(prop, "Color", "Deliver shade-less color pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE); | ||||
| RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass"); | RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC); | ||||
| RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass"); | RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW); | ||||
| RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass"); | RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO); | ||||
| RNA_def_property_ui_text(prop, "AO", "Deliver AO pass"); | RNA_def_property_ui_text(prop, "AO", "Deliver AO pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT); | ||||
| RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass"); | RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT); | ||||
| RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass"); | RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT); | ||||
| RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass"); | RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONMENT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONMENT); | ||||
| RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass"); | RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT); | ||||
| RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pass"); | RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC); | 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_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW); | 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_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO); | 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_ui_text(prop, "AO Exclude", "Exclude AO pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT); | RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT); | ||||
| RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined"); | RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT); | RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT); | ||||
| RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined"); | RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT); | RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT); | ||||
| RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined"); | RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT); | RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT); | ||||
| RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined"); | RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT); | ||||
| RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined"); | RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_DIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_DIRECT); | ||||
| RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass"); | RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_INDIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_INDIRECT); | ||||
| RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indirect pass"); | RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indirect pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_COLOR); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_COLOR); | ||||
| RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color pass"); | RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_DIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_DIRECT); | ||||
| RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct pass"); | RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_INDIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_INDIRECT); | ||||
| RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indirect pass"); | RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indirect pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_COLOR); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_COLOR); | ||||
| RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pass"); | RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_DIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_DIRECT); | ||||
| RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmission direct pass"); | RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmission direct pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_INDIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_INDIRECT); | ||||
| RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmission indirect pass"); | RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmission indirect pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_COLOR); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_COLOR); | ||||
| RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmission color pass"); | RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmission color pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_subsurface_direct", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_subsurface_direct", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_DIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_DIRECT); | ||||
| RNA_def_property_ui_text(prop, "Subsurface Direct", "Deliver subsurface direct pass"); | RNA_def_property_ui_text(prop, "Subsurface Direct", "Deliver subsurface direct pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_subsurface_indirect", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_subsurface_indirect", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_INDIRECT); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_INDIRECT); | ||||
| RNA_def_property_ui_text(prop, "Subsurface Indirect", "Deliver subsurface indirect pass"); | RNA_def_property_ui_text(prop, "Subsurface Indirect", "Deliver subsurface indirect pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "use_pass_subsurface_color", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pass_subsurface_color", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_COLOR); | RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_COLOR); | ||||
| RNA_def_property_ui_text(prop, "Subsurface Color", "Deliver subsurface color pass"); | RNA_def_property_ui_text(prop, "Subsurface Color", "Deliver subsurface color pass"); | ||||
| if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); | if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneLayer_pass_update"); | ||||
| else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| } | } | ||||
| static void rna_def_freestyle_modules(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_freestyle_modules(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| ▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| func = RNA_def_function(srna, "remove", "rna_FreestyleSettings_lineset_remove"); | func = RNA_def_function(srna, "remove", "rna_FreestyleSettings_lineset_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a line set from scene render layer Freestyle settings"); | RNA_def_function_ui_description(func, "Remove a line set from scene render layer Freestyle settings"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "lineset", "FreestyleLineSet", "", "Line set to remove"); | parm = RNA_def_pointer(func, "lineset", "FreestyleLineSet", "", "Line set to remove"); | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| } | } | ||||
| static void rna_def_freestyle_settings(BlenderRNA *brna) | void rna_def_freestyle_settings(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem edge_type_negation_items[] = { | static const EnumPropertyItem edge_type_negation_items[] = { | ||||
| {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given edge type conditions"}, | {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given edge type conditions"}, | ||||
| {FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive", | {FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive", | ||||
| "Select feature edges not satisfying the given edge type conditions"}, | "Select feature edges not satisfying the given edge type conditions"}, | ||||
| ▲ Show 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | void rna_def_freestyle_settings(BlenderRNA *brna) | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1); | RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1); | ||||
| RNA_def_property_ui_text(prop, "Use", "Enable or disable this style module during stroke rendering"); | RNA_def_property_ui_text(prop, "Use", "Enable or disable this style module during stroke rendering"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); | ||||
| /* FreestyleSettings */ | /* FreestyleSettings */ | ||||
| srna = RNA_def_struct(brna, "FreestyleSettings", NULL); | srna = RNA_def_struct(brna, "FreestyleSettings", NULL); | ||||
| RNA_def_struct_sdna(srna, "FreestyleConfig"); | RNA_def_struct_sdna(srna, "FreestyleConfig"); | ||||
| RNA_def_struct_nested(brna, srna, "SceneRenderLayer"); | RNA_def_struct_nested(brna, srna, "SceneLayer"); | ||||
| RNA_def_struct_ui_text(srna, "Freestyle Settings", "Freestyle settings for a SceneRenderLayer data-block"); | RNA_def_struct_ui_text(srna, "Freestyle Settings", "Freestyle settings for a SceneLayer data-block"); | ||||
| prop = RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE); | ||||
| RNA_def_property_collection_sdna(prop, NULL, "modules", NULL); | RNA_def_property_collection_sdna(prop, NULL, "modules", NULL); | ||||
| RNA_def_property_struct_type(prop, "FreestyleModuleSettings"); | RNA_def_property_struct_type(prop, "FreestyleModuleSettings"); | ||||
| RNA_def_property_ui_text(prop, "Style Modules", "A list of style modules (to be applied from top to bottom)"); | RNA_def_property_ui_text(prop, "Style Modules", "A list of style modules (to be applied from top to bottom)"); | ||||
| rna_def_freestyle_modules(brna, prop); | rna_def_freestyle_modules(brna, prop); | ||||
| prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 1,009 Lines • ▼ Show 20 Lines | static void rna_def_scene_layers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| func = RNA_def_function(srna, "remove", "rna_SceneLayer_remove"); | func = RNA_def_function(srna, "remove", "rna_SceneLayer_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a render layer"); | RNA_def_function_ui_description(func, "Remove a render layer"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "layer", "SceneLayer", "", "Render layer to remove"); | parm = RNA_def_pointer(func, "layer", "SceneLayer", "", "Render layer to remove"); | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| } | } | ||||
| /* TODO LAYERS: legacy SceneRenderLayers, to be removed */ | |||||
| static void rna_def_scene_render_layer(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| FunctionRNA *func; | |||||
| srna = RNA_def_struct(brna, "SceneRenderLayer", NULL); | |||||
| RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer"); | |||||
| RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS); | |||||
| RNA_def_struct_path_func(srna, "rna_SceneRenderLayer_path"); | |||||
| RNA_def_struct_idprops_func(srna, "rna_SceneRenderLayer_idprops"); | |||||
| rna_def_render_layer_common(srna, 1); | |||||
| func = RNA_def_function(srna, "update_render_passes", "rna_SceneRenderLayer_update_render_passes"); | |||||
| RNA_def_function_ui_description(func, "Requery the enabled render passes from the render engine"); | |||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF); | |||||
| /* Freestyle */ | |||||
| rna_def_freestyle_settings(brna); | |||||
| prop = RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig"); | |||||
| RNA_def_property_struct_type(prop, "FreestyleSettings"); | |||||
| RNA_def_property_ui_text(prop, "Freestyle Settings", ""); | |||||
| } | |||||
| /* Render Layers */ | |||||
| static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| FunctionRNA *func; | |||||
| PropertyRNA *parm; | |||||
| RNA_def_property_srna(cprop, "RenderLayers"); | |||||
| srna = RNA_def_struct(brna, "RenderLayers", NULL); | |||||
| RNA_def_struct_sdna(srna, "RenderData"); | |||||
| RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render layers"); | |||||
| prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); | |||||
| RNA_def_property_int_sdna(prop, NULL, "actlay"); | |||||
| RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", | |||||
| "rna_RenderSettings_active_layer_index_set", | |||||
| "rna_RenderSettings_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, "rna_Scene_glsl_update"); | |||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_struct_type(prop, "SceneRenderLayer"); | |||||
| RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get", | |||||
| "rna_RenderSettings_active_layer_set", NULL, NULL); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL); | |||||
| RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | |||||
| func = RNA_def_function(srna, "new", "rna_RenderLayer_new"); | |||||
| RNA_def_function_ui_description(func, "Add a render layer to scene"); | |||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID); | |||||
| parm = RNA_def_string(func, "name", "RenderLayer", 0, "", "New name for the render layer (not unique)"); | |||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | |||||
| parm = RNA_def_pointer(func, "result", "SceneRenderLayer", "", "Newly created render layer"); | |||||
| RNA_def_function_return(func, parm); | |||||
| func = RNA_def_function(srna, "remove", "rna_RenderLayer_remove"); | |||||
| RNA_def_function_ui_description(func, "Remove a render layer"); | |||||
| RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS | FUNC_USE_SELF_ID); | |||||
| parm = RNA_def_pointer(func, "layer", "SceneRenderLayer", "", "Render layer to remove"); | |||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | |||||
| RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | |||||
| } | |||||
| /* Render Views - MultiView */ | /* Render Views - MultiView */ | ||||
| static void rna_def_scene_render_view(BlenderRNA *brna) | static void rna_def_scene_render_view(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SceneRenderView", NULL); | srna = RNA_def_struct(brna, "SceneRenderView", NULL); | ||||
| RNA_def_struct_ui_text(srna, "Scene Render View", "Render viewpoint for 3D stereo and multiview rendering"); | RNA_def_struct_ui_text(srna, "Scene Render View", "Render viewpoint for 3D stereo and multiview rendering"); | ||||
| ▲ Show 20 Lines • Show All 1,349 Lines • ▼ Show 20 Lines | #if 0 /* UNUSED, see R_SEQ_GL_REND comment */ | ||||
| RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view"); | RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view"); | ||||
| #endif | #endif | ||||
| prop = RNA_def_property(srna, "use_sequencer_gl_textured_solid", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_sequencer_gl_textured_solid", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_SOLID_TEX); | RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_SOLID_TEX); | ||||
| RNA_def_property_ui_text(prop, "Textured Solid", "Draw face-assigned textures in solid draw method"); | RNA_def_property_ui_text(prop, "Textured Solid", "Draw face-assigned textures in solid draw method"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update"); | RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update"); | ||||
| /* layers */ | |||||
| 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", ""); | |||||
| rna_def_render_layers(brna, prop); | |||||
| prop = RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER); | 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_ui_text(prop, "Single Layer", "Only render the active layer"); | ||||
| RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); | RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| /* views (stereoscopy et al) */ | /* views (stereoscopy et al) */ | ||||
| prop = RNA_def_property(srna, "views", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "views", PROP_COLLECTION, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 744 Lines • ▼ Show 20 Lines | void RNA_def_scene(BlenderRNA *brna) | ||||
| rna_def_unit_settings(brna); | rna_def_unit_settings(brna); | ||||
| rna_def_scene_image_format_data(brna); | rna_def_scene_image_format_data(brna); | ||||
| rna_def_scene_game_data(brna); | rna_def_scene_game_data(brna); | ||||
| rna_def_selected_uv_element(brna); | rna_def_selected_uv_element(brna); | ||||
| rna_def_display_safe_areas(brna); | rna_def_display_safe_areas(brna); | ||||
| RNA_define_animate_sdna(true); | RNA_define_animate_sdna(true); | ||||
| /* *** Animated *** */ | /* *** Animated *** */ | ||||
| rna_def_scene_render_data(brna); | rna_def_scene_render_data(brna); | ||||
| rna_def_scene_render_layer(brna); | |||||
| rna_def_gpu_fx(brna); | rna_def_gpu_fx(brna); | ||||
| rna_def_scene_render_view(brna); | rna_def_scene_render_view(brna); | ||||
| /* Scene API */ | /* Scene API */ | ||||
| RNA_api_scene(srna); | RNA_api_scene(srna); | ||||
| } | } | ||||
| #endif | #endif | ||||