IO: remove OBJ and PLY Python add-ons (#104503, #104504) #108440

Merged
Aras Pranckevicius merged 1 commits from aras_p/blender:remove-obj-ply-addons into main 2023-05-30 21:41:30 +02:00
6 changed files with 9 additions and 130 deletions

View File

@ -476,7 +476,7 @@ class TOPBAR_MT_file_import(Menu):
if bpy.app.build_options.io_wavefront_obj:
self.layout.operator("wm.obj_import", text="Wavefront (.obj)")
if bpy.app.build_options.io_ply:
self.layout.operator("wm.ply_import", text="Stanford PLY (.ply) (experimental)")
self.layout.operator("wm.ply_import", text="Stanford PLY (.ply)")
if bpy.app.build_options.io_stl:
self.layout.operator("wm.stl_import", text="STL (.stl) (experimental)")
@ -506,7 +506,7 @@ class TOPBAR_MT_file_export(Menu):
if bpy.app.build_options.io_wavefront_obj:
self.layout.operator("wm.obj_export", text="Wavefront (.obj)")
if bpy.app.build_options.io_ply:
self.layout.operator("wm.ply_export", text="Stanford PLY (.ply) (experimental)")
self.layout.operator("wm.ply_export", text="Stanford PLY (.ply)")
class TOPBAR_MT_file_external_data(Menu):

View File

@ -25,7 +25,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 3
#define BLENDER_FILE_SUBVERSION 4
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and show a warning if the file

View File

@ -749,12 +749,10 @@ UserDef *BKE_blendfile_userdef_from_defaults(void)
const char *addons[] = {
"io_anim_bvh",
"io_curve_svg",
"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",

View File

@ -824,6 +824,12 @@ void blo_do_versions_userdef(UserDef *userdef)
}
}
if (!USER_VERSION_ATLEAST(400, 4)) {
/* obj and ply python addons were removed. */
BKE_addon_remove_safe(&userdef->addons, "io_mesh_ply");
BKE_addon_remove_safe(&userdef->addons, "io_scene_obj");
}
/**
* Versioning code until next subversion bump goes here.
*

View File

@ -1286,10 +1286,6 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Image Tiles", "Tiles of the image");
rna_def_udim_tiles(brna, prop);
/*
* Image.has_data and Image.depth are temporary,
* Update import_obj.py when they are replaced (Arystan)
*/
prop = RNA_def_property(srna, "has_data", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Image_has_data_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);

View File

@ -314,127 +314,6 @@ add_blender_test(
# ------------------------------------------------------------------------------
# IO TESTS
# OBJ Import tests
# disabled until updated & working
if(FALSE)
add_blender_test(
import_obj_cube
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/cube.obj'\)
--md5=39cce4bacac2d1b18fc470380279bc15 --md5_method=SCENE
--write-blend=${TEST_OUT_DIR}/io_tests/import_obj_cube.blend
)
add_blender_test(
import_obj_nurbs_cyclic
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/nurbs_cyclic.obj'\)
--md5=ad3c307e5883224a0492378cd32691ab --md5_method=SCENE
--write-blend=${TEST_OUT_DIR}/io_tests/import_obj_nurbs_cyclic.blend
)
add_blender_test(
import_obj_makehuman
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/makehuman.obj'\)
--md5=c9f78b185e58358daa4ecaecfa75464e --md5_method=SCENE
--write-blend=${TEST_OUT_DIR}/io_tests/import_obj_makehuman.blend
)
endif()
# OBJ Export tests
add_blender_test(
export_obj_cube
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/io_tests/export_obj_cube.obj',use_selection=False\)
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_cube.obj
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_cube.mtl
--md5=e80660437ad9bfe082849641c361a233 --md5_method=FILE
)
add_blender_test(
export_obj_nurbs
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/io_tests/export_obj_nurbs.obj',use_selection=False,use_nurbs=True\)
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_nurbs.obj
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_nurbs.mtl
--md5=a733ae4fa4a591ea9b0912da3af042de --md5_method=FILE
)
# disabled until updated & working
if(FALSE)
add_blender_test(
export_obj_all_objects
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/io_tests/export_obj_all_objects.obj',use_selection=False,use_nurbs=True\)
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_all_objects.obj
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_all_objects.mtl
--md5=04b3ed97cede07a19548fc518ce9f8ca --md5_method=FILE
)
endif()
# PLY Import tests
add_blender_test(
import_ply_cube
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/cube_ascii.ply'\)
--md5=527134343c27fc0ea73115b85fbfd3ac --md5_method=SCENE
--write-blend=${TEST_OUT_DIR}/io_tests/import_ply_cube.blend
)
add_blender_test(
import_ply_bunny
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/bunny2.ply'\)
--md5=6ea5b8533400a17accf928b8fd024eaa --md5_method=SCENE
--write-blend=${TEST_OUT_DIR}/io_tests/import_ply_bunny.blend
)
add_blender_test(
import_ply_small_holes
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/many_small_holes.ply'\)
--md5=c3093e26ecae5b6d59fbbcf2a0d0b39f --md5_method=SCENE
--write-blend=${TEST_OUT_DIR}/io_tests/import_ply_small_holes.blend
)
# PLY Export
# disabled until updated & working
if(FALSE)
add_blender_test(
export_ply_cube_all_data
${TEST_SRC_DIR}/io_tests/blend_geometry/cube_all_data.blend
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/io_tests/export_ply_cube_all_data.ply'\)
--md5_source=${TEST_OUT_DIR}/io_tests/export_ply_cube_all_data.ply
--md5=6adc3748ceae8298496f99d0e7e76c15 --md5_method=FILE
)
add_blender_test(
export_ply_suzanne_all_data
${TEST_SRC_DIR}/io_tests/blend_geometry/suzanne_all_data.blend
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/io_tests/export_ply_suzanne_all_data.ply'\)
--md5_source=${TEST_OUT_DIR}/io_tests/export_ply_suzanne_all_data.ply
--md5=68ba23f02efd6511bfd093f45f703221 --md5_method=FILE
)
endif()
add_blender_test(
export_ply_vertices # lame, add a better one
${TEST_SRC_DIR}/io_tests/blend_geometry/vertices.blend
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/io_tests/export_ply_vertices.ply'\)
--md5_source=${TEST_OUT_DIR}/io_tests/export_ply_vertices.ply
--md5=ee6ce2e69c1d9a7418ff0548f6338f70 --md5_method=FILE
)
# STL Import tests
# disabled until updated & working
if(FALSE)