RenderEngine/Nodes: system to check for shading nodes compatibility
[blender.git] / source / blender / makesrna / intern / rna_render.c
1 /*
2  * ***** BEGIN GPL LICENSE BLOCK *****
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  * Contributor(s): Blender Foundation (2009)
19  *
20  * ***** END GPL LICENSE BLOCK *****
21  */
22
23 /** \file blender/makesrna/intern/rna_render.c
24  *  \ingroup RNA
25  */
26
27
28 #include <stdlib.h>
29
30 #include "DNA_scene_types.h"
31
32 #include "RNA_define.h"
33 #include "RNA_enum_types.h"
34
35 #include "rna_internal.h"
36
37 #include "RE_engine.h"
38 #include "RE_pipeline.h"
39
40 #include "BKE_utildefines.h"
41
42 #ifdef RNA_RUNTIME
43
44 #include "MEM_guardedalloc.h"
45
46 #include "RNA_access.h"
47
48 #include "BKE_context.h"
49 #include "BKE_report.h"
50
51 /* RenderEngine Callbacks */
52
53 void engine_tag_redraw(RenderEngine *engine)
54 {
55         engine->flag |= RE_ENGINE_DO_DRAW;
56 }
57
58 void engine_tag_update(RenderEngine *engine)
59 {
60         engine->flag |= RE_ENGINE_DO_UPDATE;
61 }
62
63 static void engine_update(RenderEngine *engine, Main *bmain, Scene *scene)
64 {
65         extern FunctionRNA rna_RenderEngine_update_func;
66         PointerRNA ptr;
67         ParameterList list;
68         FunctionRNA *func;
69
70         RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
71         func= &rna_RenderEngine_update_func;
72
73         RNA_parameter_list_create(&list, &ptr, func);
74         RNA_parameter_set_lookup(&list, "data", &bmain);
75         RNA_parameter_set_lookup(&list, "scene", &scene);
76         engine->type->ext.call(NULL, &ptr, func, &list);
77
78         RNA_parameter_list_free(&list);
79 }
80
81 static void engine_render(RenderEngine *engine, struct Scene *scene)
82 {
83         extern FunctionRNA rna_RenderEngine_render_func;
84         PointerRNA ptr;
85         ParameterList list;
86         FunctionRNA *func;
87
88         RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
89         func= &rna_RenderEngine_render_func;
90
91         RNA_parameter_list_create(&list, &ptr, func);
92         RNA_parameter_set_lookup(&list, "scene", &scene);
93         engine->type->ext.call(NULL, &ptr, func, &list);
94
95         RNA_parameter_list_free(&list);
96 }
97
98 static void engine_view_update(RenderEngine *engine, const struct bContext *context)
99 {
100         extern FunctionRNA rna_RenderEngine_view_update_func;
101         PointerRNA ptr;
102         ParameterList list;
103         FunctionRNA *func;
104
105         RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
106         func= &rna_RenderEngine_view_update_func;
107
108         RNA_parameter_list_create(&list, &ptr, func);
109         RNA_parameter_set_lookup(&list, "context", &context);
110         engine->type->ext.call(NULL, &ptr, func, &list);
111
112         RNA_parameter_list_free(&list);
113 }
114
115 static void engine_view_draw(RenderEngine *engine, const struct bContext *context)
116 {
117         extern FunctionRNA rna_RenderEngine_view_draw_func;
118         PointerRNA ptr;
119         ParameterList list;
120         FunctionRNA *func;
121
122         RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
123         func= &rna_RenderEngine_view_draw_func;
124
125         RNA_parameter_list_create(&list, &ptr, func);
126         RNA_parameter_set_lookup(&list, "context", &context);
127         engine->type->ext.call(NULL, &ptr, func, &list);
128
129         RNA_parameter_list_free(&list);
130 }
131
132 /* RenderEngine registration */
133
134 static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type)
135 {
136         RenderEngineType *et= RNA_struct_blender_type_get(type);
137
138         if(!et)
139                 return;
140         
141         RNA_struct_free_extension(type, &et->ext);
142         BLI_freelinkN(&R_engines, et);
143         RNA_struct_free(&BLENDER_RNA, type);
144 }
145
146 static StructRNA *rna_RenderEngine_register(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
147 {
148         RenderEngineType *et, dummyet = {NULL};
149         RenderEngine dummyengine= {NULL};
150         PointerRNA dummyptr;
151         int have_function[4];
152
153         /* setup dummy engine & engine type to store static properties in */
154         dummyengine.type= &dummyet;
155         RNA_pointer_create(NULL, &RNA_RenderEngine, &dummyengine, &dummyptr);
156
157         /* validate the python class */
158         if(validate(&dummyptr, data, have_function) != 0)
159                 return NULL;
160
161         if(strlen(identifier) >= sizeof(dummyet.idname)) {
162                 BKE_reportf(reports, RPT_ERROR, "registering render engine class: '%s' is too long, maximum length is %d",
163                                                 identifier, (int)sizeof(dummyet.idname));
164                 return NULL;
165         }
166
167         /* check if we have registered this engine type before, and remove it */
168         for(et=R_engines.first; et; et=et->next) {
169                 if(strcmp(et->idname, dummyet.idname) == 0) {
170                         if(et->ext.srna)
171                                 rna_RenderEngine_unregister(bmain, et->ext.srna);
172                         break;
173                 }
174         }
175         
176         /* create a new engine type */
177         et= MEM_callocN(sizeof(RenderEngineType), "python render engine");
178         memcpy(et, &dummyet, sizeof(dummyet));
179
180         et->ext.srna= RNA_def_struct(&BLENDER_RNA, et->idname, "RenderEngine"); 
181         et->ext.data= data;
182         et->ext.call= call;
183         et->ext.free= free;
184         RNA_struct_blender_type_set(et->ext.srna, et);
185
186         et->update= (have_function[0])? engine_update: NULL;
187         et->render= (have_function[1])? engine_render: NULL;
188         et->view_update= (have_function[2])? engine_view_update: NULL;
189         et->view_draw= (have_function[3])? engine_view_draw: NULL;
190
191         BLI_addtail(&R_engines, et);
192
193         return et->ext.srna;
194 }
195
196 static void **rna_RenderEngine_instance(PointerRNA *ptr)
197 {
198         RenderEngine *engine = ptr->data;
199         return &engine->py_instance;
200 }
201
202 static StructRNA* rna_RenderEngine_refine(PointerRNA *ptr)
203 {
204         RenderEngine *engine= (RenderEngine*)ptr->data;
205         return (engine->type && engine->type->ext.srna)? engine->type->ext.srna: &RNA_RenderEngine;
206 }
207
208 static void rna_RenderResult_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
209 {
210         RenderResult *rr= (RenderResult*)ptr->data;
211         rna_iterator_listbase_begin(iter, &rr->layers, NULL);
212 }
213
214 static void rna_RenderLayer_passes_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
215 {
216         RenderLayer *rl= (RenderLayer*)ptr->data;
217         rna_iterator_listbase_begin(iter, &rl->passes, NULL);
218 }
219
220 static int rna_RenderLayer_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
221 {
222         RenderLayer *rl= (RenderLayer*)ptr->data;
223
224         length[0]= rl->rectx*rl->recty;
225         length[1]= 4;
226
227         return length[0]*length[1];
228 }
229
230 static void rna_RenderLayer_rect_get(PointerRNA *ptr, float *values)
231 {
232         RenderLayer *rl= (RenderLayer*)ptr->data;
233         memcpy(values, rl->rectf, sizeof(float)*rl->rectx*rl->recty*4);
234 }
235
236 static void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values)
237 {
238         RenderLayer *rl= (RenderLayer*)ptr->data;
239         memcpy(rl->rectf, values, sizeof(float)*rl->rectx*rl->recty*4);
240 }
241
242 static int rna_RenderPass_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
243 {
244         RenderPass *rpass= (RenderPass*)ptr->data;
245
246         length[0]= rpass->rectx*rpass->recty;
247         length[1]= rpass->channels;
248
249         return length[0]*length[1];
250 }
251
252 static void rna_RenderPass_rect_get(PointerRNA *ptr, float *values)
253 {
254         RenderPass *rpass= (RenderPass*)ptr->data;
255         memcpy(values, rpass->rect, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
256 }
257
258 static void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values)
259 {
260         RenderPass *rpass= (RenderPass*)ptr->data;
261         memcpy(rpass->rect, values, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
262 }
263
264 #else // RNA_RUNTIME
265
266 static void rna_def_render_engine(BlenderRNA *brna)
267 {
268         StructRNA *srna;
269         PropertyRNA *prop;
270         FunctionRNA *func;
271         
272         srna= RNA_def_struct(brna, "RenderEngine", NULL);
273         RNA_def_struct_sdna(srna, "RenderEngine");
274         RNA_def_struct_ui_text(srna, "Render Engine", "Render engine");
275         RNA_def_struct_refine_func(srna, "rna_RenderEngine_refine");
276         RNA_def_struct_register_funcs(srna, "rna_RenderEngine_register", "rna_RenderEngine_unregister", "rna_RenderEngine_instance");
277
278         /* final render callbacks */
279         func= RNA_def_function(srna, "update", NULL);
280         RNA_def_function_ui_description(func, "Export scene data for render");
281         RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
282         RNA_def_pointer(func, "data", "BlendData", "", "");
283         RNA_def_pointer(func, "scene", "Scene", "", "");
284
285         func= RNA_def_function(srna, "render", NULL);
286         RNA_def_function_ui_description(func, "Render scene into an image");
287         RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
288         RNA_def_pointer(func, "scene", "Scene", "", "");
289
290         /* viewport render callbacks */
291         func= RNA_def_function(srna, "view_update", NULL);
292         RNA_def_function_ui_description(func, "Update on data changes for viewport render");
293         RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
294         RNA_def_pointer(func, "context", "Context", "", "");
295
296         func= RNA_def_function(srna, "view_draw", NULL);
297         RNA_def_function_ui_description(func, "Draw viewport render");
298         RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
299         RNA_def_pointer(func, "context", "Context", "", "");
300
301         /* tag for redraw */
302         RNA_def_function(srna, "tag_redraw", "engine_tag_redraw");
303         RNA_def_function_ui_description(func, "Request redraw for viewport rendering");
304
305         /* tag for update */
306         RNA_def_function(srna, "tag_update", "engine_tag_update");
307         RNA_def_function_ui_description(func, "Request update call for viewport rendering");
308
309         func= RNA_def_function(srna, "begin_result", "RE_engine_begin_result");
310         prop= RNA_def_int(func, "x", 0, 0, INT_MAX, "X", "", 0, INT_MAX);
311         RNA_def_property_flag(prop, PROP_REQUIRED);
312         prop= RNA_def_int(func, "y", 0, 0, INT_MAX, "Y", "", 0, INT_MAX);
313         RNA_def_property_flag(prop, PROP_REQUIRED);
314         prop= RNA_def_int(func, "w", 0, 0, INT_MAX, "Width", "", 0, INT_MAX);
315         RNA_def_property_flag(prop, PROP_REQUIRED);
316         prop= RNA_def_int(func, "h", 0, 0, INT_MAX, "Height", "", 0, INT_MAX);
317         RNA_def_property_flag(prop, PROP_REQUIRED);
318         prop= RNA_def_pointer(func, "result", "RenderResult", "Result", "");
319         RNA_def_function_return(func, prop);
320
321         func= RNA_def_function(srna, "update_result", "RE_engine_update_result");
322         prop= RNA_def_pointer(func, "result", "RenderResult", "Result", "");
323         RNA_def_property_flag(prop, PROP_REQUIRED);
324
325         func= RNA_def_function(srna, "end_result", "RE_engine_end_result");
326         prop= RNA_def_pointer(func, "result", "RenderResult", "Result", "");
327         RNA_def_property_flag(prop, PROP_REQUIRED);
328
329         func= RNA_def_function(srna, "test_break", "RE_engine_test_break");
330         prop= RNA_def_boolean(func, "do_break", 0, "Break", "");
331         RNA_def_function_return(func, prop);
332
333         func= RNA_def_function(srna, "update_stats", "RE_engine_update_stats");
334         prop= RNA_def_string(func, "stats", "", 0, "Stats", "");
335         RNA_def_property_flag(prop, PROP_REQUIRED);
336         prop= RNA_def_string(func, "info", "", 0, "Info", "");
337         RNA_def_property_flag(prop, PROP_REQUIRED);
338
339         func= RNA_def_function(srna, "update_progress", "RE_engine_update_progress");
340         prop= RNA_def_float(func, "progress", 0, 0.0f, 1.0f, "", "Percentage of render that's done", 0.0f, 1.0f);
341         RNA_def_property_flag(prop, PROP_REQUIRED);
342
343         func= RNA_def_function(srna, "report", "RE_engine_report");
344         prop= RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
345         RNA_def_property_flag(prop, PROP_REQUIRED);
346         prop= RNA_def_string(func, "message", "", 0, "Report Message", "");
347         RNA_def_property_flag(prop, PROP_REQUIRED);
348
349         RNA_define_verify_sdna(0);
350
351         prop= RNA_def_property(srna, "is_animation", PROP_BOOLEAN, PROP_NONE);
352         RNA_def_property_boolean_sdna(prop, NULL, "flag", RE_ENGINE_ANIMATION);
353
354         prop= RNA_def_property(srna, "is_preview", PROP_BOOLEAN, PROP_NONE);
355         RNA_def_property_boolean_sdna(prop, NULL, "flag", RE_ENGINE_PREVIEW);
356
357         /* registration */
358
359         prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
360         RNA_def_property_string_sdna(prop, NULL, "type->idname");
361         RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
362
363         prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
364         RNA_def_property_string_sdna(prop, NULL, "type->name");
365         RNA_def_property_flag(prop, PROP_REGISTER);
366
367         prop= RNA_def_property(srna, "bl_use_preview", PROP_BOOLEAN, PROP_NONE);
368         RNA_def_property_boolean_sdna(prop, NULL, "type->flag", RE_USE_PREVIEW);
369         RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
370
371         prop= RNA_def_property(srna, "bl_use_postprocess", PROP_BOOLEAN, PROP_NONE);
372         RNA_def_property_boolean_negative_sdna(prop, NULL, "type->flag", RE_USE_POSTPROCESS);
373         RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
374
375         prop= RNA_def_property(srna, "bl_use_shading_nodes", PROP_BOOLEAN, PROP_NONE);
376         RNA_def_property_boolean_sdna(prop, NULL, "type->flag", RE_USE_SHADING_NODES);
377         RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
378
379         RNA_define_verify_sdna(1);
380 }
381
382 static void rna_def_render_result(BlenderRNA *brna)
383 {
384         StructRNA *srna;
385         FunctionRNA *func;
386         PropertyRNA *parm;
387         
388         srna= RNA_def_struct(brna, "RenderResult", NULL);
389         RNA_def_struct_ui_text(srna, "Render Result", "Result of rendering, including all layers and passes");
390
391         func= RNA_def_function(srna, "load_from_file", "RE_result_load_from_file");
392         RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file");
393         RNA_def_function_flag(func, FUNC_USE_REPORTS);
394         parm= RNA_def_string_file_name(func, "filename", "", FILE_MAX, "File Name",
395                                        "Filename to load into this render tile, must be no smaller than the render result");
396         RNA_def_property_flag(parm, PROP_REQUIRED);
397
398         RNA_define_verify_sdna(0);
399
400         parm= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
401         RNA_def_property_int_sdna(parm, NULL, "rectx");
402         RNA_def_property_clear_flag(parm, PROP_EDITABLE);
403
404         parm= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
405         RNA_def_property_int_sdna(parm, NULL, "recty");
406         RNA_def_property_clear_flag(parm, PROP_EDITABLE);
407
408         parm= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
409         RNA_def_property_struct_type(parm, "RenderLayer");
410         RNA_def_property_collection_funcs(parm, "rna_RenderResult_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
411
412         RNA_define_verify_sdna(1);
413 }
414
415 static void rna_def_render_layer(BlenderRNA *brna)
416 {
417         StructRNA *srna;
418         PropertyRNA *prop;
419         FunctionRNA *func;
420         
421         srna= RNA_def_struct(brna, "RenderLayer", NULL);
422         RNA_def_struct_ui_text(srna, "Render Layer", "");
423
424         func= RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file");
425         RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file");
426         RNA_def_function_flag(func, FUNC_USE_REPORTS);
427         prop= RNA_def_string(func, "filename", "", 0, "Filename",
428                              "Filename to load into this render tile, must be no smaller than the renderlayer");
429         RNA_def_property_flag(prop, PROP_REQUIRED);
430         RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X",
431                     "Offset the position to copy from if the image is larger than the render layer", 0, INT_MAX);
432         RNA_def_int(func, "y", 0, 0, INT_MAX, "Offset Y",
433                     "Offset the position to copy from if the image is larger than the render layer", 0, INT_MAX);
434
435         RNA_define_verify_sdna(0);
436
437         rna_def_render_layer_common(srna, 0);
438
439         prop= RNA_def_property(srna, "passes", PROP_COLLECTION, PROP_NONE);
440         RNA_def_property_struct_type(prop, "RenderPass");
441         RNA_def_property_collection_funcs(prop, "rna_RenderLayer_passes_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
442
443         prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
444         RNA_def_property_flag(prop, PROP_DYNAMIC);
445         RNA_def_property_multi_array(prop, 2, NULL);
446         RNA_def_property_dynamic_array_funcs(prop, "rna_RenderLayer_rect_get_length");
447         RNA_def_property_float_funcs(prop, "rna_RenderLayer_rect_get", "rna_RenderLayer_rect_set", NULL);
448
449         RNA_define_verify_sdna(1);
450 }
451
452 static void rna_def_render_pass(BlenderRNA *brna)
453 {
454         StructRNA *srna;
455         PropertyRNA *prop;
456
457         static EnumPropertyItem pass_type_items[]= {
458                 {SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""},
459                 {SCE_PASS_Z, "Z", 0, "Z", ""},
460                 {SCE_PASS_RGBA, "COLOR", 0, "Color", ""},
461                 {SCE_PASS_DIFFUSE, "DIFFUSE", 0, "Diffuse", ""},
462                 {SCE_PASS_SPEC, "SPECULAR", 0, "Specular", ""},
463                 {SCE_PASS_SHADOW, "SHADOW", 0, "Shadow", ""},
464                 {SCE_PASS_AO, "AO", 0, "AO", ""},
465                 {SCE_PASS_REFLECT, "REFLECTION", 0, "Reflection", ""},
466                 {SCE_PASS_NORMAL, "NORMAL", 0, "Normal", ""},
467                 {SCE_PASS_VECTOR, "VECTOR", 0, "Vector", ""},
468                 {SCE_PASS_REFRACT, "REFRACTION", 0, "Refraction", ""},
469                 {SCE_PASS_INDEXOB, "OBJECT_INDEX", 0, "Object Index", ""},
470                 {SCE_PASS_UV, "UV", 0, "UV", ""},
471                 {SCE_PASS_MIST, "MIST", 0, "Mist", ""},
472                 {SCE_PASS_EMIT, "EMIT", 0, "Emit", ""},
473                 {SCE_PASS_ENVIRONMENT, "ENVIRONMENT", 0, "Environment", ""},
474                 {SCE_PASS_INDEXMA, "MATERIAL_INDEX", 0, "Material Index", ""},
475                 {0, NULL, 0, NULL, NULL}};
476         
477         srna= RNA_def_struct(brna, "RenderPass", NULL);
478         RNA_def_struct_ui_text(srna, "Render Pass", "");
479
480         RNA_define_verify_sdna(0);
481
482         prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
483         RNA_def_property_string_sdna(prop, NULL, "name");
484         RNA_def_property_clear_flag(prop, PROP_EDITABLE);
485         RNA_def_struct_name_property(srna, prop);
486
487         prop= RNA_def_property(srna, "channel_id", PROP_STRING, PROP_NONE);
488         RNA_def_property_string_sdna(prop, NULL, "chan_id");
489         RNA_def_property_clear_flag(prop, PROP_EDITABLE);
490
491         prop= RNA_def_property(srna, "channels", PROP_INT, PROP_NONE);
492         RNA_def_property_int_sdna(prop, NULL, "channels");
493         RNA_def_property_clear_flag(prop, PROP_EDITABLE);
494
495         prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
496         RNA_def_property_enum_sdna(prop, NULL, "passtype");
497         RNA_def_property_enum_items(prop, pass_type_items);
498         RNA_def_property_clear_flag(prop, PROP_EDITABLE);
499
500         prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
501         RNA_def_property_flag(prop, PROP_DYNAMIC);
502         RNA_def_property_multi_array(prop, 2, NULL);
503         RNA_def_property_dynamic_array_funcs(prop, "rna_RenderPass_rect_get_length");
504         RNA_def_property_float_funcs(prop, "rna_RenderPass_rect_get", "rna_RenderPass_rect_set", NULL);
505
506         RNA_define_verify_sdna(1);
507 }
508
509 void RNA_def_render(BlenderRNA *brna)
510 {
511         rna_def_render_engine(brna);
512         rna_def_render_result(brna);
513         rna_def_render_layer(brna);
514         rna_def_render_pass(brna);
515 }
516
517 #endif // RNA_RUNTIME
518