Added: #1440 Initial configuration for dds convert process

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 32d53ce3e3
commit 81d1f162b8

@ -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 */)
{

@ -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<std::string> &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<std::string> &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<std::string> &resultAppend)
{
}
} /* namespace PIPELINE */

@ -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<std::string> &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<std::string> &resultAppend);
virtual void getDependentFiles(std::vector<std::string> &resultAppend);
NLMISC_DECLARE_CLASS(CProcessInterfaceInfo)
}; /* class CProcessInterfaceInfo */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_H */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "process_interface_info.h"
// STL includes
#include <sstream>
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
CProcessInterfaceInfo::CProcessInterfaceInfo()
{
}
CProcessInterfaceInfo::~CProcessInterfaceInfo()
{
}
void CProcessInterfaceInfo::getDependentDirectories(std::vector<std::string> &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<std::string> &resultAppend)
{
}
} /* namespace PIPELINE */
/* end of file */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_INTERFACE_INFO_H
#define PIPELINE_PROCESS_INTERFACE_INFO_H
#include <nel/misc/types_nl.h>
// 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<std::string> &resultAppend);
virtual void getDependentFiles(std::vector<std::string> &resultAppend);
NLMISC_DECLARE_CLASS(CProcessInterfaceInfo)
}; /* class CProcessInterfaceInfo */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_PROCESS_INTERFACE_INFO_H */
/* end of file */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "process_texture_dds.h"
// STL includes
#include <sstream>
// NeL includes
#include <nel/misc/debug.h>
// 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<std::string> &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<std::string> &resultAppend)
{
}
} /* namespace PIPELINE */
/* end of file */

@ -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
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_PROCESS_TEXTURE_DDS_H
#define PIPELINE_PROCESS_TEXTURE_DDS_H
#include <nel/misc/types_nl.h>
// 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<std::string> &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<std::string> &resultAppend);
virtual void getDependentFiles(std::vector<std::string> &resultAppend);
NLMISC_DECLARE_CLASS(CProcessTextureDDSInfo)
}; /* class CProcessTextureDDS */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_PROCESS_TEXTURE_DDS_H */
/* end of file */

@ -1,7 +1,6 @@
<?xml version="1.0"?>
<DFN Revision="$Revision$" State="modified">
<ELEMENT Name="Atlas" Type="Dfn" Filename="pipeline_common_id_of.dfn" Array="true"/>
<ELEMENT Name="Fullscreen" Type="Dfn" Filename="pipeline_common_id_od.dfn" Array="false"/>
<ELEMENT Name="3D" Type="Dfn" Filename="pipeline_common_id_od.dfn" Array="false"/>
<LOG></LOG>
</DFN>

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<DFN Revision="$Revision$" State="modified">
<ELEMENT Name="DDS" Type="Dfn" Filename="pipeline_process_texture_dds.dfn" Array="true"/>
<LOG>Sat Aug 04 15:26:07 2012 (kaetemi) Dfn Structure = </LOG>
</DFN>

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<DFN Revision="$Revision$" State="modified">
<ELEMENT Name="SrcDirectories" Type="Type" Filename="pipeline_path_endslash.typ" Array="true"/>
<ELEMENT Name="DstDirectory" Type="Type" Filename="pipeline_path_endslash.typ"/>
<ELEMENT Name="Algorithm" Type="Type" Filename="string.typ"/>
<ELEMENT Name="CreateMipMap" Type="Type" Filename="boolean.typ"/>
<ELEMENT Name="ReduceFactor" Type="Type" Filename="uint8.typ" Default="0"/>
<LOG>Sat Aug 04 15:22:53 2012 (kaetemi) Dfn Structure = </LOG>
</DFN>

@ -5,10 +5,12 @@
<ELEMENT Name="DependentProjects" Type="Type" Filename="filename.typ" FilenameExt="*.pipeline_project" Array="true"/>
<ELEMENT Name="Processes" Type="Type" Filename="string.typ" Array="true"/>
<ELEMENT Name="Interface" Type="Dfn" Filename="pipeline_process_interface.dfn"/>
<ELEMENT Name="Texture" Type="Dfn" Filename="pipeline_process_texture.dfn"/>
<LOG>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 = </LOG>
Sat Mar 03 13:31:41 2012 (Kaetemi) Dfn Structure =
Sat Aug 04 15:24:52 2012 (kaetemi) Dfn Structure = </LOG>
</DFN>

@ -10,6 +10,7 @@
</ARRAY>
<ARRAY Name="Processes">
<ATOM Value="Interface"/>
<ATOM Value="TextureDDS"/>
</ARRAY>
<STRUCT Name="Interface">
<ARRAY Name="Atlas">
@ -41,24 +42,6 @@
<ATOM Name="DstFile" Value="[&amp;DstInterfaceAtlas]/texture_interfaces_dxtc.tga"/>
</STRUCT>
</ARRAY>
<STRUCT Name="Fullscreen">
<ARRAY Name="SrcDirectories">
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_fullscreen"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_outgame/fullscreen"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/abilities_items"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/buy_sell"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/camera_character"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/create_perso"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/fight"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/MatisTown"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/spell"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/talk_bot"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/abilities_items"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_quick_help/graph"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/r2_decals"/>
</ARRAY>
<ATOM Name="DstDirectory" Value="[!OutputDirectory]/interface_fullscreen"/>
</STRUCT>
<STRUCT Name="3D">
<ARRAY Name="SrcDirectories">
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_outgame/3d"/>
@ -70,6 +53,29 @@
<ATOM Name="DstDirectory" Value="[!OutputDirectory]/interface_3d"/>
</STRUCT>
</STRUCT>
<STRUCT Name="Texture">
<ARRAY Name="DDS">
<STRUCT>
<ARRAY Name="SrcDirectories">
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_fullscreen"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_outgame/fullscreen"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/abilities_items"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/buy_sell"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/camera_character"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/create_perso"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/fight"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/MatisTown"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/spell"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/talk_bot"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_doc/graph/abilities_items"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/v3_quick_help/graph"/>
<ATOM Value="[$DatabaseDirectory]/interfaces/r2_decals"/>
</ARRAY>
<ATOM Name="DstDirectory" Value="[!OutputDirectory]/interface_3d"/>
<ATOM Name="Algorithm" Value="5"/>
</STRUCT>
</ARRAY>
</STRUCT>
</STRUCT>
<STRUCT/>
<STRUCT/>
@ -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 = [&amp;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</LOG>
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</LOG>
</FORM>

@ -12,11 +12,16 @@
<STRUCT>
<ATOM Name="Description" Value="Builds interface textures"/>
<ATOM Name="Process" Value="Interface"/>
<ATOM Name="HandlerType" Value="RegisteredClass"/>
<ATOM Name="Handler" Value="CProcessInterface"/>
<ATOM Name="Info" Value="CProcessInterfaceInfo"/>
</STRUCT>
<STRUCT>
<ATOM Name="Description" Value="Builds compressed dds textures"/>
<ATOM Name="Process" Value="TextureDDS"/>
<ATOM Name="Handler" Value="CProcessTextureDDS"/>
<ATOM Name="Info" Value="CProcessTextureDDSInfo"/>
</STRUCT>
</ARRAY>
</STRUCT>
<STRUCT/>
@ -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</LOG>
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</LOG>
</FORM>

Loading…
Cancel
Save