Revert r34026, which in it turn reverted r33039. Removal breaks renderers that use COLLADA as their format through render() callback.

This commit is contained in:
Nathan Letwory 2011-03-27 22:02:54 +00:00
parent 47f9b496b1
commit 3c67374f50
5 changed files with 34 additions and 0 deletions

@ -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'

@ -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(
.

@ -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'

@ -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;

@ -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;}