From 81d1f162b83e28c6fc791661aab165b56e6c82e3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 4 Aug 2012 15:40:20 +0200 Subject: [PATCH] Added: #1440 Initial configuration for dds convert process --HG-- branch : build_pipeline_v3 --- .../plugin_nel/pipeline_plugin_nel.cpp | 4 +- .../pipeline/plugin_nel/process_interface.cpp | 54 +++++++--- .../pipeline/plugin_nel/process_interface.h | 23 ++++- .../plugin_nel/process_interface_info.cpp | 99 ------------------- .../plugin_nel/process_interface_info.h | 63 ------------ .../plugin_nel/process_texture_dds.cpp | 73 ++++++++++++++ .../pipeline/plugin_nel/process_texture_dds.h | 83 ++++++++++++++++ .../pipeline/pipeline_process_interface.dfn | 1 - .../DFN/pipeline/pipeline_process_texture.dfn | 5 + .../pipeline/pipeline_process_texture_dds.dfn | 9 ++ .../DFN/pipeline/pipeline_project.dfn | 4 +- .../common_interface.pipeline_project | 49 +++++---- .../pipeline/plugin_nel.pipeline_plugin | 14 ++- 13 files changed, 282 insertions(+), 199 deletions(-) delete mode 100644 code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp delete mode 100644 code/nel/tools/pipeline/plugin_nel/process_interface_info.h create mode 100644 code/nel/tools/pipeline/plugin_nel/process_texture_dds.cpp create mode 100644 code/nel/tools/pipeline/plugin_nel/process_texture_dds.h create mode 100644 code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture.dfn create mode 100644 code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture_dds.dfn diff --git a/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp b/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp index 8da3f3cff..61a0ae5d5 100644 --- a/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp +++ b/code/nel/tools/pipeline/plugin_nel/pipeline_plugin_nel.cpp @@ -40,7 +40,7 @@ // Project includes #include "../plugin_library/pipeline_interface.h" #include "process_interface.h" -#include "process_interface_info.h" +#include "process_texture_dds.h" using namespace std; // using namespace NLMISC; @@ -56,6 +56,8 @@ class CPipelinePluginNeLNelLibrary : public NLMISC::INelLibrary nldebug("Library loaded: CPipelinePluginNeL"); PIPELINE_REGISTER_CLASS(CProcessInterface); PIPELINE_REGISTER_CLASS(CProcessInterfaceInfo); + PIPELINE_REGISTER_CLASS(CProcessTextureDDS); + PIPELINE_REGISTER_CLASS(CProcessTextureDDSInfo); } void onLibraryUnloaded(bool /* lastTime */) { diff --git a/code/nel/tools/pipeline/plugin_nel/process_interface.cpp b/code/nel/tools/pipeline/plugin_nel/process_interface.cpp index be5d44f27..ed417a967 100644 --- a/code/nel/tools/pipeline/plugin_nel/process_interface.cpp +++ b/code/nel/tools/pipeline/plugin_nel/process_interface.cpp @@ -41,16 +41,6 @@ using namespace std; namespace PIPELINE { -CProcessInterface::CProcessInterface() -{ - -} - -CProcessInterface::~CProcessInterface() -{ - -} - void CProcessInterface::buildAtlas(const std::string &dependLog, const std::string &errorLog, const std::vector &srcDirectories, const std::string &dstFile) { nldebug("Build: Atlas '%s'", dstFile.c_str()); @@ -105,7 +95,49 @@ void CProcessInterface::build() } m_PipelineProcess->deleteDirectoryIfEmpty(tempDir); - m_PipelineProcess->setExit(FINISH_ERROR, "Not yet implemented"); +} + +void CProcessInterfaceInfo::getDependentDirectories(std::vector &resultAppend) +{ + { + uint nb; + if (m_PipelineProcess->getValueNb(nb, "Interface.Atlas")) + { + for (uint i = 0; i < nb; ++i) + { + std::stringstream ss; + ss << "Interface.Atlas[" << i << "].SrcDirectories"; + m_PipelineProcess->getValues(resultAppend, ss.str()); + } + } + } + /*{ + uint nb; + if (m_PipelineProcess->getValueNb(nb, "Interface.AtlasDxtc")) + { + for (uint i = 0; i < nb; ++i) + { + std::stringstream ss; + ss << "Interface.AtlasDxtc[" << i << "].SrcDirectories"; + m_PipelineProcess->getValues(resultAppend, ss.str()); + } + } + } + { + std::stringstream ss; + ss << "Interface.Fullscreen.SrcDirectories"; + m_PipelineProcess->getValues(resultAppend, ss.str()); + } + { + std::stringstream ss; + ss << "Interface.3D.SrcDirectories"; + m_PipelineProcess->getValues(resultAppend, ss.str()); + }*/ +} + +void CProcessInterfaceInfo::getDependentFiles(std::vector &resultAppend) +{ + } } /* namespace PIPELINE */ diff --git a/code/nel/tools/pipeline/plugin_nel/process_interface.h b/code/nel/tools/pipeline/plugin_nel/process_interface.h index a2e426798..ca845b26d 100644 --- a/code/nel/tools/pipeline/plugin_nel/process_interface.h +++ b/code/nel/tools/pipeline/plugin_nel/process_interface.h @@ -35,6 +35,7 @@ // Project includes #include "../plugin_library/process_handler.h" +#include "../plugin_library/process_info.h" namespace PIPELINE { @@ -47,8 +48,8 @@ namespace PIPELINE { class CProcessInterface : public IProcessHandler { public: - CProcessInterface(); - virtual ~CProcessInterface(); + CProcessInterface() { } + virtual ~CProcessInterface() { } void buildAtlas(const std::string &dependLog, const std::string &errorLog, const std::vector &srcDirectories, const std::string &dstFile); @@ -57,6 +58,24 @@ public: NLMISC_DECLARE_CLASS(CProcessInterface) }; /* class CProcessInterface */ +/** + * \brief CProcessInterfaceInfo + * \date 2012-03-03 10:10GMT + * \author Jan Boon (Kaetemi) + * CProcessInterfaceInfo + */ +class CProcessInterfaceInfo : public IProcessInfo +{ +public: + CProcessInterfaceInfo() { } + virtual ~CProcessInterfaceInfo() { } + + virtual void getDependentDirectories(std::vector &resultAppend); + virtual void getDependentFiles(std::vector &resultAppend); + + NLMISC_DECLARE_CLASS(CProcessInterfaceInfo) +}; /* class CProcessInterfaceInfo */ + } /* namespace PIPELINE */ #endif /* #ifndef PIPELINE_PROCESS_INTERFACE_H */ diff --git a/code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp b/code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp deleted file mode 100644 index 1d2748b9d..000000000 --- a/code/nel/tools/pipeline/plugin_nel/process_interface_info.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/** - * \file process_interface_info.cpp - * \brief CProcessInterfaceInfo - * \date 2012-03-03 10:10GMT - * \author Jan Boon (Kaetemi) - * CProcessInterfaceInfo - */ - -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE PIPELINE. - * RYZOM CORE PIPELINE is free software: you can redistribute it - * and/or modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 2 of - * the License, or (at your option) any later version. - * - * RYZOM CORE PIPELINE is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see - * . - */ - -#include -#include "process_interface_info.h" - -// STL includes -#include - -// NeL includes -// #include - -// Project includes - -using namespace std; -// using namespace NLMISC; - -namespace PIPELINE { - -CProcessInterfaceInfo::CProcessInterfaceInfo() -{ - -} - -CProcessInterfaceInfo::~CProcessInterfaceInfo() -{ - -} - -void CProcessInterfaceInfo::getDependentDirectories(std::vector &resultAppend) -{ - { - uint nb; - if (m_PipelineProcess->getValueNb(nb, "Interface.Atlas")) - { - for (uint i = 0; i < nb; ++i) - { - std::stringstream ss; - ss << "Interface.Atlas[" << i << "].SrcDirectories"; - m_PipelineProcess->getValues(resultAppend, ss.str()); - } - } - } - { - uint nb; - if (m_PipelineProcess->getValueNb(nb, "Interface.AtlasDxtc")) - { - for (uint i = 0; i < nb; ++i) - { - std::stringstream ss; - ss << "Interface.AtlasDxtc[" << i << "].SrcDirectories"; - m_PipelineProcess->getValues(resultAppend, ss.str()); - } - } - } - { - std::stringstream ss; - ss << "Interface.Fullscreen.SrcDirectories"; - m_PipelineProcess->getValues(resultAppend, ss.str()); - } - { - std::stringstream ss; - ss << "Interface.3D.SrcDirectories"; - m_PipelineProcess->getValues(resultAppend, ss.str()); - } -} - -void CProcessInterfaceInfo::getDependentFiles(std::vector &resultAppend) -{ - -} - -} /* namespace PIPELINE */ - -/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_nel/process_interface_info.h b/code/nel/tools/pipeline/plugin_nel/process_interface_info.h deleted file mode 100644 index 7543e7fcb..000000000 --- a/code/nel/tools/pipeline/plugin_nel/process_interface_info.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * \file process_interface_info.h - * \brief CProcessInterfaceInfo - * \date 2012-03-03 10:10GMT - * \author Jan Boon (Kaetemi) - * CProcessInterfaceInfo - */ - -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE PIPELINE. - * RYZOM CORE PIPELINE is free software: you can redistribute it - * and/or modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 2 of - * the License, or (at your option) any later version. - * - * RYZOM CORE PIPELINE is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see - * . - */ - -#ifndef PIPELINE_PROCESS_INTERFACE_INFO_H -#define PIPELINE_PROCESS_INTERFACE_INFO_H -#include - -// STL includes - -// NeL includes - -// Project includes -#include "../plugin_library/process_info.h" - -namespace PIPELINE { - -/** - * \brief CProcessInterfaceInfo - * \date 2012-03-03 10:10GMT - * \author Jan Boon (Kaetemi) - * CProcessInterfaceInfo - */ -class CProcessInterfaceInfo : public IProcessInfo -{ -public: - CProcessInterfaceInfo(); - virtual ~CProcessInterfaceInfo(); - - virtual void getDependentDirectories(std::vector &resultAppend); - virtual void getDependentFiles(std::vector &resultAppend); - - NLMISC_DECLARE_CLASS(CProcessInterfaceInfo) -}; /* class CProcessInterfaceInfo */ - -} /* namespace PIPELINE */ - -#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_INFO_H */ - -/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_nel/process_texture_dds.cpp b/code/nel/tools/pipeline/plugin_nel/process_texture_dds.cpp new file mode 100644 index 000000000..7c4e7e0ec --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/process_texture_dds.cpp @@ -0,0 +1,73 @@ +/** + * \file process_texture_dds.cpp + * \brief CProcessTextureDDS + * \date 2012-08-04 12:50GMT + * \author Jan Boon (Kaetemi) + * CProcessTextureDDS + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU Affero General Public + * License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with RYZOM CORE PIPELINE. If not, see + * . + */ + +#include +#include "process_texture_dds.h" + +// STL includes +#include + +// NeL includes +#include + +// Project includes + +using namespace std; +// using namespace NLMISC; + +namespace PIPELINE { + +void CProcessTextureDDS::build() +{ + nldebug("Build process plugin: CProcessTextureDDS"); + m_PipelineProcess->setExit(FINISH_ERROR, "Not implemented"); +} + +void CProcessTextureDDSInfo::getDependentDirectories(std::vector &resultAppend) +{ + { + uint nb; + if (m_PipelineProcess->getValueNb(nb, "Texture.DDS")) + { + for (uint i = 0; i < nb; ++i) + { + std::stringstream ss; + ss << "Texture.DDS[" << i << "].SrcDirectories"; + m_PipelineProcess->getValues(resultAppend, ss.str()); + } + } + } +} + +void CProcessTextureDDSInfo::getDependentFiles(std::vector &resultAppend) +{ + +} + +} /* namespace PIPELINE */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/plugin_nel/process_texture_dds.h b/code/nel/tools/pipeline/plugin_nel/process_texture_dds.h new file mode 100644 index 000000000..0c2d61c1e --- /dev/null +++ b/code/nel/tools/pipeline/plugin_nel/process_texture_dds.h @@ -0,0 +1,83 @@ +/** + * \file process_texture_dds.h + * \brief CProcessTextureDDS + * \date 2012-08-04 12:50GMT + * \author Jan Boon (Kaetemi) + * CProcessTextureDDS + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU Affero General Public + * License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with RYZOM CORE PIPELINE. If not, see + * . + */ + +#ifndef PIPELINE_PROCESS_TEXTURE_DDS_H +#define PIPELINE_PROCESS_TEXTURE_DDS_H +#include + +// STL includes + +// NeL includes + +// Project includes +#include "../plugin_library/process_handler.h" +#include "../plugin_library/process_info.h" + +namespace PIPELINE { + +/** + * \brief CProcessTextureDDS + * \date 2012-08-04 12:50GMT + * \author Jan Boon (Kaetemi) + * CProcessTextureDDS + */ +class CProcessTextureDDS : public IProcessHandler +{ +public: + CProcessTextureDDS() { } + virtual ~CProcessTextureDDS() { } + + void buildAtlas(const std::string &dependLog, const std::string &errorLog, const std::vector &srcDirectories, const std::string &dstFile); + + virtual void build(); + + NLMISC_DECLARE_CLASS(CProcessTextureDDS) +}; /* class CProcessTextureDDS */ + +/** + * \brief CProcessTextureDDS + * \date 2012-08-04 12:50GMT + * \author Jan Boon (Kaetemi) + * CProcessTextureDDS + */ +class CProcessTextureDDSInfo : public IProcessInfo +{ +public: + CProcessTextureDDSInfo() { } + virtual ~CProcessTextureDDSInfo() { } + + virtual void getDependentDirectories(std::vector &resultAppend); + virtual void getDependentFiles(std::vector &resultAppend); + + NLMISC_DECLARE_CLASS(CProcessTextureDDSInfo) +}; /* class CProcessTextureDDS */ + +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_PROCESS_TEXTURE_DDS_H */ + +/* end of file */ diff --git a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_interface.dfn b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_interface.dfn index ecae2d76b..8cd51f12a 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_interface.dfn +++ b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_interface.dfn @@ -1,7 +1,6 @@ - diff --git a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture.dfn b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture.dfn new file mode 100644 index 000000000..17b17a483 --- /dev/null +++ b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture.dfn @@ -0,0 +1,5 @@ + + + + Sat Aug 04 15:26:07 2012 (kaetemi) Dfn Structure = + diff --git a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture_dds.dfn b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture_dds.dfn new file mode 100644 index 000000000..fa538dbd4 --- /dev/null +++ b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_process_texture_dds.dfn @@ -0,0 +1,9 @@ + + + + + + + + Sat Aug 04 15:22:53 2012 (kaetemi) Dfn Structure = + diff --git a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_project.dfn b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_project.dfn index 9af98130e..79bd8c709 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_project.dfn +++ b/code/ryzom/common/data_leveldesign/leveldesign/DFN/pipeline/pipeline_project.dfn @@ -5,10 +5,12 @@ + Sat Feb 18 13:35:41 2012 (Kaetemi) Dfn Structure = Sat Feb 18 13:36:45 2012 (Kaetemi) Dfn Structure = Sat Feb 18 13:44:45 2012 (Kaetemi) Dfn Structure = Sat Feb 18 15:28:54 2012 (Kaetemi) Dfn Structure = Fri Mar 02 21:21:25 2012 (Kaetemi) Dfn Structure = -Sat Mar 03 13:31:41 2012 (Kaetemi) Dfn Structure = +Sat Mar 03 13:31:41 2012 (Kaetemi) Dfn Structure = +Sat Aug 04 15:24:52 2012 (kaetemi) Dfn Structure = diff --git a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/common_interface.pipeline_project b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/common_interface.pipeline_project index e094451a9..dccf6f057 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/common_interface.pipeline_project +++ b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/common_interface.pipeline_project @@ -10,6 +10,7 @@ + @@ -41,24 +42,6 @@ - - - - - - - - - - - - - - - - - - @@ -70,6 +53,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -89,5 +95,10 @@ Sat Mar 03 13:34:02 2012 (Kaetemi) formName Resized = 2 Sat Mar 03 13:34:32 2012 (Kaetemi) .Interface.AtlasDxtc[0].DstFile = [&DstInterfaceAtlasDxtc]/texture_interfaces_dxtc.tga Fri Mar 09 19:49:23 2012 (Kaetemi) .Processes[1] = Dummy Fri Mar 09 19:49:23 2012 (Kaetemi) formName Resized = 2 -Tue Jul 31 19:45:33 2012 (kaetemi) formName Resized = 1 +Tue Jul 31 19:45:33 2012 (kaetemi) formName Resized = 1 +Sat Aug 04 15:26:38 2012 (kaetemi) .Texture.DDS[0].Algorithm = 5 +Sat Aug 04 15:26:38 2012 (kaetemi) formName Resized = 1 +Sat Aug 04 15:26:49 2012 (kaetemi) .Texture.DDS[0].DstDirectory = [!OutputDirectory]/interface_3d +Sat Aug 04 15:26:57 2012 (kaetemi) .Processes[1] = TextureDSS +Sat Aug 04 15:38:06 2012 (kaetemi) formName Resized = 13 diff --git a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin index f5b9af41c..f45d28c58 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin +++ b/code/ryzom/common/data_leveldesign/leveldesign/pipeline/plugin_nel.pipeline_plugin @@ -12,11 +12,16 @@ - + + + + + + @@ -40,5 +45,10 @@ Fri Mar 09 19:48:26 2012 (Kaetemi) Array Insert = 0 Fri Mar 09 19:48:26 2012 (Kaetemi) formName Deleted = Fri Mar 09 19:48:26 2012 (Kaetemi) formName Resized = 2 Fri Mar 09 19:48:39 2012 (Kaetemi) .ProcessHandlers[1].ProcessDependencies[0] = Dummy -Fri Mar 09 19:48:39 2012 (Kaetemi) formName Resized = 1 +Fri Mar 09 19:48:39 2012 (Kaetemi) formName Resized = 1 +Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Description = Builds compressed dds textures +Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Handler = CProcessTextureDDS +Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Info = CProcessTextureDDSInfo +Sat Aug 04 15:33:08 2012 (kaetemi) .ProcessHandlers[2].Process = TextureDDS +Sat Aug 04 15:33:08 2012 (kaetemi) formName Resized = 3