Class BaseBlenderConverter
- java.lang.Object
-
- org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter
-
- org.nuxeo.ecm.platform.threed.convert.BaseBlenderConverter
-
- All Implemented Interfaces:
Converter,ExternalConverter
- Direct Known Subclasses:
BatchConverter,ColladaConverter,LodsConverter,RenderConverter
public abstract class BaseBlenderConverter extends CommandLineBasedConverter
Base converter for blender pipeline. Processes scripts for operators and input blobs- Since:
- 8.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter
CommandLineBasedConverter.CmdReturn
-
-
Field Summary
Fields Modifier and Type Field Description static StringMIMETYPE_ZIP-
Fields inherited from class org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter
CMD_NAME_PARAMETER, initParameters, TMP_PATH_PARAMETER
-
-
Constructor Summary
Constructors Constructor Description BaseBlenderConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>blobsToTempDir(BlobHolder blobHolder, Path directory)protected BlobHolderbuildResult(List<String> cmdOutput, CmdParameters cmdParams)Builds result from commandLine output buffer.BlobHolderconvert(BlobHolder blobHolder, Map<String,Serializable> parameters)Main method to handle the real Conversion Job.List<String>getConversionLOD(String outDir)List<String>getInfos(String outDir)List<String>getRenders(String outDir)protected PathgetScriptWith(List<String> operators)Returns the absolute path to the main script (main and pipeline scripts).protected booleanisThreeDFile(File file)protected Stream<String>sortFilesToPaths(List<File> files)From a list of files, sort by file name and return a stream of file paths.protected PathtempDirectory(Map<String,Serializable> parameters, String sufix)-
Methods inherited from class org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter
execOnBlob, getCmdBlobParameters, getCmdStringParameters, getCommandLineService, getCommandName, getTmpDirectory, init, isConverterAvailable
-
-
-
-
Field Detail
-
MIMETYPE_ZIP
public static final String MIMETYPE_ZIP
- See Also:
- Constant Field Values
-
-
Method Detail
-
tempDirectory
protected Path tempDirectory(Map<String,Serializable> parameters, String sufix) throws ConversionException
- Throws:
ConversionException
-
isThreeDFile
protected boolean isThreeDFile(File file)
-
sortFilesToPaths
protected Stream<String> sortFilesToPaths(List<File> files)
From a list of files, sort by file name and return a stream of file paths.
-
blobsToTempDir
protected List<String> blobsToTempDir(BlobHolder blobHolder, Path directory) throws IOException
- Throws:
IOException
-
getScriptWith
protected Path getScriptWith(List<String> operators) throws IOException
Returns the absolute path to the main script (main and pipeline scripts). Copies the script to the filesystem if needed. Copies neededoperatorsscript to the filesystem if missing.- Throws:
IOException
-
convert
public BlobHolder convert(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
Description copied from interface:ConverterMain method to handle the real Conversion Job.Returned
BlobHoldermust implementCachableBlobHolder, otherwise result won't be cached.- Specified by:
convertin interfaceConverter- Overrides:
convertin classCommandLineBasedConverter- Throws:
ConversionException
-
buildResult
protected BlobHolder buildResult(List<String> cmdOutput, CmdParameters cmdParams) throws ConversionException
Description copied from class:CommandLineBasedConverterBuilds result from commandLine output buffer.- Specified by:
buildResultin classCommandLineBasedConverter- Throws:
ConversionException
-
-