diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-07 07:21:19 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-08 06:29:32 +0300 |
commit | 8edd1d8aa597514d5089f8cf2aa640ec14c1e389 (patch) | |
tree | ef4513243ab47a0cbc27d298e96d462c8f22396d /release | |
parent | a1d2efd190038c7615bd3bb459dc86c8b3a8ecdc (diff) |
CMake: optionally disable OBJ, STL & GPencil SVG support
The following CMake options have been added (enabled by default),
except for the lite build configuration.
- WITH_IO_STL
- WITH_IO_WAVEFRONT_OBJ
- WITH_IO_GPENCIL (for grease pencil SVG importing).
Note that it was already possible to disable grease pencil export
by disabling WITH_PUGIXML & WITH_HARU.
This is intended to keep the lite builds fast and small for building,
linking & execution.
Reviewed By: iyadahmed2001, aras_p, antoniov, mont29
Ref D15141
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 2980ec9ace7..d8bd724f554 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -453,9 +453,13 @@ class TOPBAR_MT_file_import(Menu): self.layout.operator( "wm.usd_import", text="Universal Scene Description (.usd, .usdc, .usda)") - self.layout.operator("wm.gpencil_import_svg", text="SVG as Grease Pencil") - self.layout.operator("wm.obj_import", text="Wavefront (.obj) (experimental)") - self.layout.operator("wm.stl_import", text="STL (.stl) (experimental)") + if bpy.app.build_options.io_gpencil: + self.layout.operator("wm.gpencil_import_svg", text="SVG as Grease Pencil") + + if bpy.app.build_options.io_wavefront_obj: + self.layout.operator("wm.obj_import", text="Wavefront (.obj) (experimental)") + if bpy.app.build_options.io_stl: + self.layout.operator("wm.stl_import", text="STL (.stl) (experimental)") class TOPBAR_MT_file_export(Menu): @@ -472,14 +476,16 @@ class TOPBAR_MT_file_export(Menu): self.layout.operator( "wm.usd_export", text="Universal Scene Description (.usd, .usdc, .usda)") - # Pugixml lib dependency - if bpy.app.build_options.pugixml: - self.layout.operator("wm.gpencil_export_svg", text="Grease Pencil as SVG") - # Haru lib dependency - if bpy.app.build_options.haru: - self.layout.operator("wm.gpencil_export_pdf", text="Grease Pencil as PDF") + if bpy.app.build_options.io_gpencil: + # Pugixml lib dependency + if bpy.app.build_options.pugixml: + self.layout.operator("wm.gpencil_export_svg", text="Grease Pencil as SVG") + # Haru lib dependency + if bpy.app.build_options.haru: + self.layout.operator("wm.gpencil_export_pdf", text="Grease Pencil as PDF") - self.layout.operator("wm.obj_export", text="Wavefront (.obj) (experimental)") + if bpy.app.build_options.io_wavefront_obj: + self.layout.operator("wm.obj_export", text="Wavefront (.obj) (experimental)") class TOPBAR_MT_file_external_data(Menu): |