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 916 Lines • ▼ Show 20 Lines | static void rna_RenderSettings_stereoViews_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) | ||||
| rna_iterator_listbase_begin(iter, &rd->views, rna_RenderSettings_stereoViews_skip); | rna_iterator_listbase_begin(iter, &rd->views, rna_RenderSettings_stereoViews_skip); | ||||
| } | } | ||||
| static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr)) | static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| return BLI_sprintfN("render"); | return BLI_sprintfN("render"); | ||||
| } | } | ||||
| static char *rna_ImageFormatSettings_path(PointerRNA *ptr) | |||||
| { | |||||
| ImageFormatData *imf = (ImageFormatData *)ptr->data; | |||||
| ID *id = ptr->id.data; | |||||
| switch (GS(id->name)) { | |||||
| case ID_SCE: | |||||
| { | |||||
| Scene *scene = (Scene *)id; | |||||
| if (&scene->r.im_format == imf) { | |||||
| return BLI_sprintfN("render.image_settings"); | |||||
| } | |||||
| else if (&scene->r.bake.im_format == imf) { | |||||
| return BLI_sprintfN("render.bake.image_settings"); | |||||
| } | |||||
| return BLI_sprintfN(".."); | |||||
| } | |||||
| case ID_NT: | |||||
| { | |||||
| bNodeTree *ntree = (bNodeTree *)id; | |||||
| bNode *node; | |||||
| for (node = ntree->nodes.first; node; node = node->next) { | |||||
| if (node->type == CMP_NODE_OUTPUT_FILE) { | |||||
| if (&((NodeImageMultiFile *)node->storage)->format == imf) { | |||||
| return BLI_sprintfN("nodes['%s'].format", node->name); | |||||
| } | |||||
| else { | |||||
| bNodeSocket *sock; | |||||
| for (sock = node->inputs.first; sock; sock = sock->next) { | |||||
| NodeImageMultiFileSocket *sockdata = sock->storage; | |||||
| if (&sockdata->format == imf) { | |||||
| return BLI_sprintfN("nodes['%s'].file_slots['%s'].format", node->name, sockdata->path); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| return BLI_sprintfN(".."); | |||||
| } | |||||
| default: | |||||
| return BLI_sprintfN(".."); | |||||
mont29: Those braces are not needed here... | |||||
| } | |||||
| } | |||||
| static int rna_RenderSettings_threads_get(PointerRNA *ptr) | static int rna_RenderSettings_threads_get(PointerRNA *ptr) | ||||
| { | { | ||||
| RenderData *rd = (RenderData *)ptr->data; | RenderData *rd = (RenderData *)ptr->data; | ||||
| return BKE_render_num_threads(rd); | return BKE_render_num_threads(rd); | ||||
| } | } | ||||
| static int rna_RenderSettings_threads_mode_get(PointerRNA *ptr) | static int rna_RenderSettings_threads_mode_get(PointerRNA *ptr) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 4,178 Lines • ▼ Show 20 Lines | #endif | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| rna_def_image_format_stereo3d_format(brna); | rna_def_image_format_stereo3d_format(brna); | ||||
| srna = RNA_def_struct(brna, "ImageFormatSettings", NULL); | srna = RNA_def_struct(brna, "ImageFormatSettings", NULL); | ||||
| RNA_def_struct_sdna(srna, "ImageFormatData"); | RNA_def_struct_sdna(srna, "ImageFormatData"); | ||||
| RNA_def_struct_nested(brna, srna, "Scene"); | RNA_def_struct_nested(brna, srna, "Scene"); | ||||
| /* RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); *//* no need for the path, its not animated! */ | RNA_def_struct_path_func(srna, "rna_ImageFormatSettings_path"); | ||||
| RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats"); | RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats"); | ||||
| prop = RNA_def_property(srna, "file_format", PROP_ENUM, 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_sdna(prop, NULL, "imtype"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_image_type_items); | RNA_def_property_enum_items(prop, rna_enum_image_type_items); | ||||
| RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set", | RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set", | ||||
| "rna_ImageFormatSettings_file_format_itemf"); | "rna_ImageFormatSettings_file_format_itemf"); | ||||
| RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as"); | RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as"); | ||||
| ▲ Show 20 Lines • Show All 2,057 Lines • Show Last 20 Lines | |||||
Those braces are not needed here...