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 | |
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')
-rw-r--r-- | source/blender/makesrna/SConscript | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/SConscript | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 21 | ||||
-rw-r--r-- | source/blenderplayer/bad_level_call_stubs/stubs.c | 3 |
5 files changed, 34 insertions, 0 deletions
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index c116659e4d8..e89003a60c2 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -54,6 +54,9 @@ if env['BF_UNIT_TEST']: if env['WITH_BF_PYTHON']: defs.append('WITH_PYTHON') +if env['WITH_BF_COLLADA']: + defs.append('WITH_COLLADA') + if env['OURPLATFORM'] == 'linux2': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index cc8b3f20c9b..70490e48add 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -125,6 +125,10 @@ if(WITH_JACK) add_definitions(-DWITH_JACK) endif() +if(WITH_OPENCOLLADA) + add_definitions(-DWITH_COLLADA) +endif() + # Build makesrna executable blender_include_dirs( . diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index cacbaccfc0e..5a20a2257a8 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -88,6 +88,9 @@ if env['BF_UNIT_TEST']: if env['WITH_BF_PYTHON']: defs.append('WITH_PYTHON') +if env['WITH_BF_COLLADA']: + defs.append('WITH_COLLADA') + if env['OURPLATFORM'] == 'linux2': cflags='-pthread' incs += ' ../../../extern/binreloc/include' 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; diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index 292e9ddd1ff..4ad8d588ae4 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -388,6 +388,9 @@ char *WM_operator_pystring(struct bContext *C, struct wmOperatorType *ot, struct struct wmKeyMapItem *WM_modalkeymap_add_item(struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value){return (struct wmKeyMapItem *)NULL;} struct wmKeyMap *WM_modalkeymap_add(struct wmKeyConfig *keyconf, char *idname, EnumPropertyItem *items){return (struct wmKeyMap *) NULL;} +/* RNA COLLADA dependency */ +int collada_export(struct Scene *sce, const char *filepath){ return 0; } + int sculpt_get_brush_size(struct Brush *brush) {return 0;} void sculpt_set_brush_size(struct Brush *brush, int size) {} int sculpt_get_lock_brush_size(struct Brush *brush){ return 0;} |