Merging r43909 through r43951 from trunk into soc-2011-tomato

This commit is contained in:
Sergey Sharybin 2012-02-07 15:04:56 +00:00
commit c5664a86a0
28 changed files with 188 additions and 55 deletions

@ -717,10 +717,11 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, RAWINP
if (key != GHOST_kKeyUnknown) {
char utf8_char[6] = {0} ;
char ascii = 0;
wchar_t utf16[2]={0};
BYTE state[256];
GetKeyboardState((PBYTE)state);
BYTE state[256] ={0};
GetKeyboardState(state);
if(ToUnicodeEx(vk, 0, state, utf16, 2, 0, system->m_keylayout))
WideCharToMultiByte(CP_UTF8, 0,
@ -728,9 +729,14 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, RAWINP
(LPSTR) utf8_char, 5,
NULL,NULL); else *utf8_char = 0;
if(!keyDown) utf8_char[0] = '\0';
event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, (*utf8_char & 0x80)?'?':*utf8_char, utf8_char);
if(!keyDown) {utf8_char[0] = '\0'; ascii='\0';}
else ascii = utf8_char[0]& 0x80?'?':utf8_char[0];
if(0x80&state[VK_MENU]) utf8_char[0]='\0';
event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, ascii, utf8_char);
#ifdef GHOST_DEBUG
std::cout << ascii << std::endl;

@ -327,9 +327,6 @@ def refresh_script_paths():
_sys_path_ensure(path)
_presets = _os.path.join(_scripts[0], "presets") # FIXME - multiple paths
def preset_paths(subdir):
"""
Returns a list of paths for a specific preset.

@ -362,7 +362,7 @@ class INFO_MT_help(Menu):
layout = self.layout
layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:2.6/Manual'
layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-261/'
layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-262/'
layout.separator()

@ -12,18 +12,18 @@
</style>
</head>
<body>
<p class="title"><b>Blender 2.61</b></p>
<p class="title"><b>Blender 2.62</b></p>
<p><br></p>
<p class="header"><b>About</b></p>
<p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows, Solaris and FreeBSD and has a large world-wide community.</p>
<p class="body">Blender can be used freely for any purpose, including commercial use and distribution. It's free and open-source software, released under the GNU GPL licence. The entire source code is available on our website.</p>
<p class="body">For more information, visit <a href="http://www.blender.org">blender.org</a>.</p>
<p><br></p>
<p class="header"><b>2.61</b></p>
<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.61. This release is the second official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features again.<a href="http://www.blender.org/development/release-logs/blender-261/">More information about this release</a>.</p>
<p class="header"><b>2.62</b></p>
<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.62. This release is the third official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features again.<a href="http://www.blender.org/development/release-logs/blender-262/">More information about this release</a>.</p>
<p><br></p>
<p class="header"><b>Bugs</b></p>
<p class="body">Although Blender 2.61 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender. If it wasnt reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
<p class="body">Although Blender 2.62 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender. If it wasnt reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
<p><br></p>
<p class="header"><b>Package Contents</b></p>
<p class="body">The downloaded Blender package includes:</p>
@ -47,7 +47,7 @@
<p class="header"><b>Links</b></p>
<p class="body">Users:</p>
<p class="body"> General information <a href="http://www.blender.org">www.blender.org</a> <br>
Full release log <a href="http://www.blender.org/development/release-logs/blender-261/">www.blender.org/development/release-logs/blender-261/</a><br>
Full release log <a href="http://www.blender.org/development/release-logs/blender-262/">www.blender.org/development/release-logs/blender-262/</a><br>
Tutorials <a href="http://www.blender.org/education-help/">www.blender.org/education-help/</a> <br>
Manual <a href="http://wiki.blender.org/index.php/Doc:Manual">wiki.blender.org/index.php/Doc:Manual</a><br>
User Forum <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>

@ -51,7 +51,7 @@ extern "C" {
/* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR
/* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE beta
#define BLENDER_VERSION_CYCLE rc
extern char versionstr[]; /* from blender.c */

@ -398,8 +398,11 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
// fprintf(stderr,"armature %s target :%s \n", ob->id.name, target->id.name);
node3 = dag_get_node(dag, ct->tar);
if (ct->subtarget[0])
if (ct->subtarget[0]) {
dag_add_relation(dag,node3,node, DAG_RL_OB_DATA|DAG_RL_DATA_DATA, cti->name);
if(ct->tar->type == OB_MESH)
node3->customdata_mask |= CD_MASK_MDEFORMVERT;
}
else if(ELEM3(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_SPLINEIK))
dag_add_relation(dag,node3,node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, cti->name);
else

@ -4769,8 +4769,8 @@ static void lib_link_scene(FileData *fd, Main *main)
(void)marker;
#endif
if(sce->ed)
seq_update_muting(sce->ed);
seq_update_muting(sce->ed);
seq_update_sound_bounds_all(sce);
if(sce->nodetree) {
lib_link_ntree(fd, &sce->id, sce->nodetree);

@ -773,6 +773,27 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Ob
copy_m4_m4(mat, pchan->pose_mat);
UnitConverter converter;
// SECOND_LIFE_COMPATIBILITY
// AFAIK animation to second life is via BVH, but no
// reason to not have the collada-animation be correct
if(export_settings->second_life)
{
float temp[4][4];
copy_m4_m4(temp, bone->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
invert_m4(temp);
mult_m4_m4m4(mat, mat, temp);
if(bone->parent)
{
copy_m4_m4(temp, bone->parent->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
mult_m4_m4m4(mat, temp, mat);
}
}
float outmat[4][4];
converter.mat4_to_dae(outmat,mat);

@ -83,7 +83,9 @@ private:
public:
AnimationExporter(COLLADASW::StreamWriter *sw): COLLADASW::LibraryAnimations(sw) { this->sw = sw; }
AnimationExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings):
COLLADASW::LibraryAnimations(sw), export_settings(export_settings)
{ this->sw = sw; }
void exportAnimations(Scene *sce);
@ -92,6 +94,7 @@ public:
void operator() (Object *ob);
protected:
const ExportSettings *export_settings;
void dae_animation(Object* ob, FCurve *fcu, char* transformName , bool is_param, Material *ma = NULL);

@ -221,8 +221,31 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
mult_m4_m4m4(mat, invpar, pchan->pose_mat);
}
else {
// get world-space from armature-space
mult_m4_m4m4(mat, ob_arm->obmat, pchan->pose_mat);
copy_m4_m4(mat, pchan->pose_mat);
// Why? Joint's localspace is still it's parent node
//get world-space from armature-space
//mult_m4_m4m4(mat, ob_arm->obmat, pchan->pose_mat);
}
// SECOND_LIFE_COMPATIBILITY
if(export_settings->second_life)
{
// Remove rotations vs armature from transform
// parent_rest_rot * mat * irest_rot
float temp[4][4];
copy_m4_m4(temp, bone->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
invert_m4(temp);
mult_m4_m4m4(mat, mat, temp);
if(bone->parent)
{
copy_m4_m4(temp, bone->parent->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
mult_m4_m4m4(mat, temp, mat);
}
}
TransformWriter::add_node_transform(node, mat,NULL );
@ -341,10 +364,16 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase
{
std::string source_id = controller_id + BIND_POSES_SOURCE_ID_SUFFIX;
int totjoint = 0;
for (bDeformGroup *def = (bDeformGroup*)defbase->first; def; def = def->next) {
if (is_bone_defgroup(ob_arm, def))
totjoint++;
}
COLLADASW::FloatSourceF source(mSW);
source.setId(source_id);
source.setArrayId(source_id + ARRAY_ID_SUFFIX);
source.setAccessorCount(BLI_countlist(defbase));
source.setAccessorCount(totjoint); //BLI_countlist(defbase));
source.setAccessorStride(16);
source.setParameterTypeName(&COLLADASW::CSWC::CSW_VALUE_TYPE_FLOAT4x4);
@ -366,16 +395,27 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase
for (bDeformGroup *def = (bDeformGroup*)defbase->first; def; def = def->next) {
if (is_bone_defgroup(ob_arm, def)) {
bPoseChannel *pchan = get_pose_channel(pose, def->name);
float mat[4][4];
float world[4][4];
float inv_bind_mat[4][4];
// make world-space matrix, arm_mat is armature-space
mult_m4_m4m4(world, ob_arm->obmat, pchan->bone->arm_mat);
// SECOND_LIFE_COMPATIBILITY
if(export_settings->second_life)
{
// Only translations, no rotation vs armature
float temp[4][4];
unit_m4(temp);
copy_v3_v3(temp[3], pchan->bone->arm_mat[3]);
mult_m4_m4m4(world, ob_arm->obmat, temp);
}
else
{
// make world-space matrix, arm_mat is armature-space
mult_m4_m4m4(world, ob_arm->obmat, pchan->bone->arm_mat);
}
invert_m4_m4(mat, world);
converter.mat4_to_dae(inv_bind_mat, mat);

@ -257,7 +257,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce)
}
// <library_animations>
AnimationExporter ae(&sw);
AnimationExporter ae(&sw, this->export_settings);
ae.exportAnimations(sce);
// <library_controllers>

@ -31,6 +31,7 @@ struct ExportSettings
{
public:
bool selected;
bool second_life;
char *filepath;
};

@ -59,6 +59,7 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[][4],
void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
{
/*
float rot[3], loc[3], scale[3];
if (ob->parent) {
@ -91,6 +92,27 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
}
add_transform(node, loc, rot, scale);
*/
/* Using parentinv should allow use of existing curves */
// If parentinv is identity don't add it.
bool add_parinv = false;
for(int i = 0; i < 16; ++i)
{
float f = (i%4 == i/4) ? 1.0f : 0.0f ;
if(ob->parentinv[i%4][i/4] != f) add_parinv = true;
}
// Eat this 3ds Max et friends
if(add_parinv)
{
double dmat[4][4];
UnitConverter converter;
converter.mat4_to_dae_double(dmat, ob->parentinv);
node.addMatrix("parentinverse", dmat);
}
add_transform(node, ob->loc, ob->rot, ob->size);
}
void TransformWriter::add_node_transform_identity(COLLADASW::Node& node)

@ -49,11 +49,12 @@ extern "C"
return 0;
}
int collada_export(Scene *sce, const char *filepath, int selected)
int collada_export(Scene *sce, const char *filepath, int selected, int second_life)
{
ExportSettings export_settings;
export_settings.selected = selected != 0;
export_settings.second_life = second_life != 0;
export_settings.filepath = (char *)filepath;
/* annoying, collada crashes if file cant be created! [#27162] */

@ -37,7 +37,7 @@ extern "C" {
* both return 1 on success, 0 on error
*/
int collada_import(bContext *C, const char *filepath);
int collada_export(Scene *sce, const char *filepath, int selected);
int collada_export(Scene *sce, const char *filepath, int selected, int second_life);
#ifdef __cplusplus
}
#endif

@ -439,22 +439,28 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
void draw_markers_time(const bContext *C, int flag)
{
ListBase *markers= ED_context_get_markers(C);
View2D *v2d= UI_view2d_fromcontext(C);
View2D *v2d;
TimeMarker *marker;
Scene *scene;
if (markers == NULL)
return;
scene = CTX_data_scene(C);
v2d = UI_view2d_fromcontext(C);
/* unselected markers are drawn at the first time */
for (marker= markers->first; marker; marker= marker->next) {
if ((marker->flag & SELECT) == 0)
draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
if ((marker->flag & SELECT) == 0) {
draw_marker(v2d, marker, scene->r.cfra, flag);
}
}
/* selected markers are drawn later */
for (marker= markers->first; marker; marker= marker->next) {
if (marker->flag & SELECT)
draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
if (marker->flag & SELECT) {
draw_marker(v2d, marker, scene->r.cfra, flag);
}
}
}
@ -550,7 +556,8 @@ static int ed_marker_add(bContext *C, wmOperator *UNUSED(op))
if (markers == NULL)
return OPERATOR_CANCELLED;
/* two markers can't be at the same place */
/* prefer not having 2 markers at the same place,
* though the user can move them to overlap once added */
for (marker= markers->first; marker; marker= marker->next) {
if (marker->frame == frame)
return OPERATOR_CANCELLED;

@ -103,7 +103,8 @@ static int eyedropper_cancel(bContext *C, wmOperator *op)
static void eyedropper_sample(bContext *C, Eyedropper *eye, int mx, int my)
{
if(RNA_property_type(eye->prop) == PROP_FLOAT) {
const int color_manage = CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT;
Scene *scene = CTX_data_scene(C);
const int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
float col[4];
RNA_property_float_get_array(&eye->ptr, eye->prop, col);

@ -380,8 +380,16 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
lcd = op->customdata;
if (lcd->em->selectmode == SCE_SELECT_FACE) {
PointerRNA props_ptr;
int extend = RNA_boolean_get(op->ptr, "extend");
ringsel_exit(op);
WM_operator_name_call(C, "MESH_OT_loop_select", WM_OP_INVOKE_REGION_WIN, NULL);
WM_operator_properties_create(&props_ptr, "MESH_OT_loop_select");
RNA_boolean_set(&props_ptr, "extend", extend);
WM_operator_name_call(C, "MESH_OT_loop_select", WM_OP_INVOKE_REGION_WIN, &props_ptr);
WM_operator_properties_free(&props_ptr);
return OPERATOR_CANCELLED;
}

@ -596,6 +596,7 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
{
wmWindowManager *wm= CTX_wm_manager(C);
wmWindow *window= CTX_wm_window(C);
Scene *scene = CTX_data_scene(C);
SpaceClip *sc= (SpaceClip *)sa->spacedata.first;
ARegion *ar_main= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
ARegion *ar_preview= clip_has_preview_region(C, sa);
@ -637,7 +638,7 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ED_area_tag_redraw(sa);
}
BKE_movieclip_user_set_frame(&sc->user, CTX_data_scene(C)->r.cfra);
BKE_movieclip_user_set_frame(&sc->user, scene->r.cfra);
}
/********************* main region ********************/

@ -594,7 +594,7 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
/* retrieve state */
sima= CTX_wm_space_image(C);
ar= CTX_wm_region(C);
scene= (Scene*)CTX_data_scene(C);
scene= CTX_data_scene(C);
obedit= CTX_data_edit_object(C);
ima= ED_space_image(sima);
@ -1445,7 +1445,7 @@ static int image_new_exec(bContext *C, wmOperator *op)
/* retrieve state */
sima= CTX_wm_space_image(C);
scene= (Scene*)CTX_data_scene(C);
scene= CTX_data_scene(C);
obedit= CTX_data_edit_object(C);
RNA_string_get(op->ptr, "name", name);

@ -581,7 +581,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
ima= ED_space_image(sima);
if(sima->iuser.flag & IMA_ANIM_ALWAYS)
BKE_image_user_calc_frame(&sima->iuser, CTX_data_scene(C)->r.cfra, 0);
BKE_image_user_calc_frame(&sima->iuser, scene->r.cfra, 0);
/* check if we have to set the image from the editmesh */
if(ima && (ima->source==IMA_SRC_VIEWER || sima->pin));

@ -1341,9 +1341,10 @@ typedef struct ImageSampleInfo {
static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
{
Scene *scene = CTX_data_scene(C);
ImageSampleInfo *info= arg_info;
ED_image_draw_info(ar, (CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
ED_image_draw_info(ar, (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
info->x, info->y, info->col, info->colf,
NULL, NULL /* zbuf - unused for nodes */
);

@ -1269,7 +1269,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
}
/* default for now */
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, ob);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d);
}
static void view3d_panel_object(const bContext *C, Panel *pa)

@ -2192,14 +2192,13 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_PAINT_MASK);
RNA_def_property_ui_text(prop, "Paint Mask", "Face selection masking for painting");
RNA_def_property_ui_icon(prop, ICON_FACESEL_HLT, 0);
RNA_def_property_update(prop, 0, "rna_Mesh_update_facemask");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_Mesh_update_facemask");
prop= RNA_def_property(srna, "use_paint_mask_vertex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_VERT_SEL);
RNA_def_property_ui_text(prop, "Vertex Selection", "Vertex selection masking for painting (weight paint only)");
RNA_def_property_ui_icon(prop, ICON_VERTEXSEL, 0);
RNA_def_property_update(prop, 0, "rna_Mesh_update_vertmask");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_Mesh_update_vertmask");
/* readonly editmesh info - use for extrude menu */
prop= RNA_def_property(srna, "total_vert_sel", PROP_INT, PROP_UNSIGNED);

@ -84,9 +84,9 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name
/* 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, int selected)
static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected, int second_life)
{
collada_export(scene, filepath, selected);
collada_export(scene, filepath, selected, second_life);
}
#endif
@ -110,10 +110,11 @@ void RNA_api_scene(StructRNA *srna)
#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");
RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
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 */
parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
parm= RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
RNA_def_function_ui_description(func, "Export to collada file");
#endif
}

@ -197,7 +197,9 @@ void RNA_api_wm(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "fileselect_add", "WM_event_add_fileselect");
RNA_def_function_ui_description(func, "Show up the file selector");
RNA_def_function_ui_description(func, "Opens a file selector with an operator. "
"The string properties 'filepath', 'filename', 'directory' and a 'files' collection "
"are assigned when present in the operator");
rna_generic_op_invoke(func, 0);
func= RNA_def_function(srna, "modal_handler_add", "rna_event_modal_handler_add");

@ -1324,7 +1324,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiItemL(col, "Links", ICON_NONE);
uiItemStringO(col, IFACE_("Donations"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
uiItemStringO(col, IFACE_("Credits"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-261");
uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-262");
uiItemStringO(col, IFACE_("Manual"), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
uiItemStringO(col, IFACE_("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
uiItemStringO(col, IFACE_("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
@ -2135,7 +2135,7 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
static int wm_collada_export_exec(bContext *C, wmOperator *op)
{
char filename[FILE_MAX];
int selected;
int selected, second_life;
if(!RNA_struct_property_is_set(op->ptr, "filepath")) {
BKE_report(op->reports, RPT_ERROR, "No filename given");
@ -2144,7 +2144,8 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", filename);
selected = RNA_boolean_get(op->ptr, "selected");
if(collada_export(CTX_data_scene(C), filename, selected)) {
second_life = RNA_boolean_get(op->ptr, "second_life");
if(collada_export(CTX_data_scene(C), filename, selected, second_life)) {
return OPERATOR_FINISHED;
}
else {
@ -2164,6 +2165,8 @@ static void WM_OT_collada_export(wmOperatorType *ot)
WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
RNA_def_boolean(ot->srna, "selected", 0, "Export only selected",
"Export only selected elements");
RNA_def_boolean(ot->srna, "second_life", 0, "Export for Second Life",
"Compatibility mode for Second Life");
}
/* function used for WM_OT_save_mainfile too */

@ -1880,6 +1880,14 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
Py_DECREF(mod);
}
#ifdef WITH_AUDASPACE
/* accessing a SoundActuator's sound results in a crash if aud is not initialised... */
{
PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
Py_DECREF(mod);
}
#endif
initPyTypes();
bpy_import_main_set(maggie);
@ -1924,6 +1932,14 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
Py_NoSiteFlag=1;
Py_FrozenFlag=1;
#ifdef WITH_AUDASPACE
/* accessing a SoundActuator's sound results in a crash if aud is not initialised... */
{
PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
Py_DECREF(mod);
}
#endif
initPyTypes();
bpy_import_main_set(maggie);