diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-28 02:02:54 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-28 02:02:54 +0400 |
commit | 3c67374f50ef5da6745ca78eaf3b6b20e658383a (patch) | |
tree | fd01660cc84b3151f1e4b7726b13fa3ce12cc9e1 /source/blender/makesrna/intern/rna_scene_api.c | |
parent | 47f9b496b130776220f53a33c2a7fad8ea7eb960 (diff) |
Revert r34026, which in it turn reverted r33039. Removal breaks renderers that use COLLADA as their format through render() callback.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 61715727b7d..c2194636cd3 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -81,6 +81,17 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name BKE_makepicstring(name, rd->pic, (frame==INT_MIN) ? rd->cfra : frame, rd->imtype, rd->scemode & R_EXTENSION, TRUE); } +#ifdef WITH_COLLADA +/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */ +#include "../../collada/collada.h" + +static void rna_Scene_collada_export(Scene *scene, const char *filepath) +{ + collada_export(scene, filepath); +} + +#endif + #else void RNA_api_scene(StructRNA *srna) @@ -96,8 +107,18 @@ void RNA_api_scene(StructRNA *srna) func= RNA_def_function(srna, "update", "rna_Scene_update_tagged"); RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators."); + +#ifdef WITH_COLLADA + /* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */ + func= RNA_def_function(srna, "collada_export", "rna_Scene_collada_export"); + parm= RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file."); + RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */ + RNA_def_function_ui_description(func, "Export to collada file."); +#endif } + void RNA_api_scene_render(StructRNA *srna) { FunctionRNA *func; |