[DOCs] Blender export needs KiCad 6 or newer
- Also checks in the code
This commit is contained in:
parent
6118ffc013
commit
d88830948f
|
|
@ -1572,6 +1572,7 @@ Notes:
|
|||
* Type: `blender_export`
|
||||
* Description: Exports the PCB in various 3D file formats.
|
||||
Also renders the PCB with high-quality.
|
||||
Needs KiCad 6 or newer.
|
||||
This output is complex to setup and needs very big dependencies.
|
||||
Please be patient when using it.
|
||||
You need Blender with the pcb2blender plug-in installed.
|
||||
|
|
@ -3361,6 +3362,7 @@ Notes:
|
|||
* Type: `pcb2blender_tools`
|
||||
* Description: A bunch of tools used to generate PCB3D files used to export PCBs to Blender.
|
||||
Blender is the most important free software 3D render package.
|
||||
This output needs KiCad 6 or newer.
|
||||
The PCB3D file format is used by the PCB2Blender project (https://github.com/30350n/pcb2blender)
|
||||
to import KiCad PCBs in Blender.
|
||||
You need to install a Blender plug-in to load PCB3D files.
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ preflight:
|
|||
outputs:
|
||||
# Blender Export **Experimental**:
|
||||
# Also renders the PCB with high-quality.
|
||||
# Needs KiCad 6 or newer.
|
||||
# This output is complex to setup and needs very big dependencies.
|
||||
# Please be patient when using it.
|
||||
# You need Blender with the pcb2blender plug-in installed.
|
||||
|
|
@ -2055,6 +2056,7 @@ outputs:
|
|||
variant: ''
|
||||
# PCB2Blender Tools:
|
||||
# Blender is the most important free software 3D render package.
|
||||
# This output needs KiCad 6 or newer.
|
||||
# The PCB3D file format is used by the PCB2Blender project (https://github.com/30350n/pcb2blender)
|
||||
# to import KiCad PCBs in Blender.
|
||||
# You need to install a Blender plug-in to load PCB3D files.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ from tempfile import NamedTemporaryFile, TemporaryDirectory
|
|||
from .error import KiPlotConfigurationError
|
||||
from .kiplot import get_output_targets, run_output, run_command, register_xmp_import, config_output, configure_and_run
|
||||
from .gs import GS
|
||||
from .misc import MISSING_TOOL
|
||||
from .optionable import Optionable, BaseOptions
|
||||
from .out_base_3d import Base3D, Base3DOptionsWithHL
|
||||
from .registrable import RegOutput
|
||||
|
|
@ -470,6 +471,9 @@ class Blender_ExportOptions(BaseOptions):
|
|||
return pcb3d_file
|
||||
|
||||
def run(self, output):
|
||||
if GS.ki5:
|
||||
logger.error("`blender_export` needs KiCad 6+")
|
||||
exit(MISSING_TOOL)
|
||||
pcb3d_file = self.solve_pcb3d()
|
||||
# If no outputs specified just finish
|
||||
# Can be used to export the PCB to Blender
|
||||
|
|
@ -563,6 +567,7 @@ class Blender_Export(Base3D):
|
|||
""" Blender Export **Experimental**
|
||||
Exports the PCB in various 3D file formats.
|
||||
Also renders the PCB with high-quality.
|
||||
Needs KiCad 6 or newer.
|
||||
This output is complex to setup and needs very big dependencies.
|
||||
Please be patient when using it.
|
||||
You need Blender with the pcb2blender plug-in installed.
|
||||
|
|
@ -605,7 +610,7 @@ class Blender_Export(Base3D):
|
|||
|
||||
@staticmethod
|
||||
def get_conf_examples(name, layers, templates):
|
||||
if not GS.check_tool(name, 'Blender'):
|
||||
if not GS.check_tool(name, 'Blender') or GS.ki5:
|
||||
return None
|
||||
has_top = False
|
||||
has_bottom = False
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ from typing import List
|
|||
from pcbnew import B_Paste, F_Paste, PCB_TEXT_T, ToMM
|
||||
from .gs import GS
|
||||
from .misc import (MOD_THROUGH_HOLE, MOD_SMD, UI_VIRTUAL, W_UNKPCB3DTXT, W_NOPCB3DBR, W_NOPCB3DTL, W_BADPCB3DTXT,
|
||||
W_UNKPCB3DNAME, W_BADPCB3DSTK)
|
||||
W_UNKPCB3DNAME, W_BADPCB3DSTK, MISSING_TOOL)
|
||||
from .optionable import Optionable
|
||||
from .out_base import VariantOptions
|
||||
from .macros import macros, document, output_class # noqa: F401
|
||||
|
|
@ -261,6 +261,9 @@ class PCB2Blender_ToolsOptions(VariantOptions):
|
|||
|
||||
def run(self, output):
|
||||
super().run(output)
|
||||
if GS.ki5:
|
||||
logger.error("`pcb2blender_tools` needs KiCad 6+")
|
||||
exit(MISSING_TOOL)
|
||||
dir_name = os.path.dirname(output)
|
||||
self.apply_show_components()
|
||||
self.filter_pcb_components(do_3D=True)
|
||||
|
|
@ -302,6 +305,7 @@ class PCB2Blender_Tools(BaseOutput): # noqa: F821
|
|||
""" PCB2Blender Tools
|
||||
A bunch of tools used to generate PCB3D files used to export PCBs to Blender.
|
||||
Blender is the most important free software 3D render package.
|
||||
This output needs KiCad 6 or newer.
|
||||
The PCB3D file format is used by the PCB2Blender project (https://github.com/30350n/pcb2blender)
|
||||
to import KiCad PCBs in Blender.
|
||||
You need to install a Blender plug-in to load PCB3D files.
|
||||
|
|
|
|||
Loading…
Reference in New Issue