Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2022-02-03 15:56:55 +0300
committerHoward Trickey <howard.trickey@gmail.com>2022-02-03 15:56:55 +0300
commitff9dc1986e6c9a54fd0bb228e8813551e6baa042 (patch)
tree13b876e473b60f2ced9d77bda8d69e9c2ce36093 /source
parent3bf2a6e3c90ea741fb21cd868b49567557ff5306 (diff)
Split Python OBJ importer and exporter, enabling only the importer.
This is from patch D13988. It removes the "- New" from the menu of the new obj exporter, changes the default addon to just io_import_obj, and does the right versioning thing. Also disables the python tests for the old python exporter.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/blendfile.c2
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index 819f786a2d0..86c2593e2e6 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -621,12 +621,12 @@ UserDef *BKE_blendfile_userdef_from_defaults(void)
const char *addons[] = {
"io_anim_bvh",
"io_curve_svg",
+ "io_import_obj",
"io_mesh_ply",
"io_mesh_stl",
"io_mesh_uv_layout",
"io_scene_fbx",
"io_scene_gltf2",
- "io_scene_obj",
"io_scene_x3d",
"cycles",
"pose_library",
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index 064d7977c68..520059649e6 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -973,6 +973,13 @@ void blo_do_versions_userdef(UserDef *userdef)
*/
{
/* Keep this block, even when empty. */
+ if (!USER_VERSION_ATLEAST(301, 7)) {
+ /* io_scene_obj directory is gone, split into io_import_obj and io_export_obj,
+ * with io_import_obj enabled by default and io_export_obj replaced by the C++ version.
+ */
+ BKE_addon_remove_safe(&userdef->addons, "io_scene_obj");
+ BKE_addon_ensure(&userdef->addons, "io_import_obj");
+ }
}
LISTBASE_FOREACH (bTheme *, btheme, &userdef->themes) {