[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48190] branches/soc-2012-bratwurst/source /blender: fix for broken merge
Gaia Clary
gaia.clary at machinimatrix.org
Fri Jun 22 14:11:39 CEST 2012
Revision: 48190
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48190
Author: gaiaclary
Date: 2012-06-22 12:11:32 +0000 (Fri, 22 Jun 2012)
Log Message:
-----------
fix for broken merge
Modified Paths:
--------------
branches/soc-2012-bratwurst/source/blender/collada/SceneExporter.cpp
branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_operators.c
Modified: branches/soc-2012-bratwurst/source/blender/collada/SceneExporter.cpp
===================================================================
--- branches/soc-2012-bratwurst/source/blender/collada/SceneExporter.cpp 2012-06-22 11:56:21 UTC (rev 48189)
+++ branches/soc-2012-bratwurst/source/blender/collada/SceneExporter.cpp 2012-06-22 12:11:32 UTC (rev 48190)
@@ -211,7 +211,7 @@
for (ct = (bConstraintTarget*)targets.first; ct; ct = ct->next){
obtar = ct->tar;
std::string tar_id(id_name(obtar));
- node.addExtraTechniqueChildParameter("blender",con_tag,"target_id",tar_id);
+ colladaNode.addExtraTechniqueChildParameter("blender",con_tag,"target_id",tar_id);
}
}
}
Modified: branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_operators.c 2012-06-22 11:56:21 UTC (rev 48189)
+++ branches/soc-2012-bratwurst/source/blender/windowmanager/intern/wm_operators.c 2012-06-22 12:11:32 UTC (rev 48190)
@@ -2147,143 +2147,7 @@
RNA_def_boolean(ot->srna, "relative_remap", 0, "Remap Relative", "Remap relative paths when saving in a different directory");
}
-/* XXX: move these collada operators to a more appropriate place */
-#ifdef WITH_COLLADA
-#include "../../collada/collada.h"
-
-static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
-{
- if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
- char filepath[FILE_MAX];
-
- if (G.main->name[0] == 0)
- BLI_strncpy(filepath, "untitled", sizeof(filepath));
- else
- BLI_strncpy(filepath, G.main->name, sizeof(filepath));
-
- BLI_replace_extension(filepath, sizeof(filepath), ".dae");
- RNA_string_set(op->ptr, "filepath", filepath);
- }
-
- WM_event_add_fileselect(C, op);
-
- return OPERATOR_RUNNING_MODAL;
-}
-
-/* function used for WM_OT_save_mainfile too */
-static int wm_collada_export_exec(bContext *C, wmOperator *op)
-{
- char filepath[FILE_MAX];
- int selected, second_life;
- int include_armatures;
- int apply_modifiers;
- int include_children;
- int use_object_instantiation;
-
- if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
- BKE_report(op->reports, RPT_ERROR, "No filename given");
- return OPERATOR_CANCELLED;
- }
-
- RNA_string_get(op->ptr, "filepath", filepath);
- BLI_ensure_extension(filepath, sizeof(filepath), ".dae");
-
- /* Options panel */
- selected = RNA_boolean_get(op->ptr, "selected");
- apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers");
- include_armatures = RNA_boolean_get(op->ptr, "include_armatures");
- include_children = RNA_boolean_get(op->ptr, "include_children");
- use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation");
- second_life = RNA_boolean_get(op->ptr, "second_life");
-
- /* get editmode results */
- ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */
-
- if (collada_export(
- CTX_data_scene(C),
- filepath,
- selected,
- apply_modifiers,
- include_armatures,
- include_children,
- use_object_instantiation,
- second_life)) {
- return OPERATOR_FINISHED;
- }
- else {
- return OPERATOR_CANCELLED;
- }
-}
-
-static void WM_OT_collada_export(wmOperatorType *ot)
-{
- ot->name = "Export COLLADA";
- ot->description = "Save a Collada file";
- ot->idname = "WM_OT_collada_export";
-
- ot->invoke = wm_collada_export_invoke;
- ot->exec = wm_collada_export_exec;
- ot->poll = WM_operator_winactive;
-
- ot->flag |= OPTYPE_PRESET;
-
- WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
-
- RNA_def_boolean(ot->srna, "selected", 0, "Selection Only",
- "Export only selected elements");
-
- RNA_def_boolean(ot->srna, "apply_modifiers", 0, "Apply Modifiers",
- "Apply modifiers (Preview Resolution)");
-
- RNA_def_boolean(ot->srna, "include_armatures", 0, "Include Armatures",
- "Include armature(s) used by the exported objects");
-
- RNA_def_boolean(ot->srna, "include_children", 0, "Include Children",
- "Include all children even if not selected");
-
- RNA_def_boolean(ot->srna, "use_object_instantiation", 1, "Use Object Instantiation",
- "Instantiate multiple Objects from same Data");
-
- 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 */
-static int wm_collada_import_exec(bContext *C, wmOperator *op)
-{
- char filename[FILE_MAX];
-
- if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
- BKE_report(op->reports, RPT_ERROR, "No filename given");
- return OPERATOR_CANCELLED;
- }
-
- RNA_string_get(op->ptr, "filepath", filename);
- if (collada_import(C, filename)) return OPERATOR_FINISHED;
-
- BKE_report(op->reports, RPT_ERROR, "Errors found during parsing COLLADA document. Please see console for error log.");
-
- return OPERATOR_FINISHED;
-}
-
-static void WM_OT_collada_import(wmOperatorType *ot)
-{
- ot->name = "Import COLLADA";
- ot->description = "Load a Collada file";
- ot->idname = "WM_OT_collada_import";
-
- ot->invoke = WM_operator_filesel;
- ot->exec = wm_collada_import_exec;
- ot->poll = WM_operator_winactive;
-
- WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
-}
-
-#endif
-
-
-/* XXX: move these collada operators to a more appropriate place */
#ifdef WITH_ASSIMP
#include "../../assimp/bassimp.h"
More information about the Bf-blender-cvs
mailing list