2015-05-19 21:01:32 +00:00
|
|
|
#ifndef CTOOL_COOK
|
|
|
|
#define CTOOL_COOK
|
2015-05-19 07:01:18 +00:00
|
|
|
|
|
|
|
#include "CToolBase.hpp"
|
2015-05-26 04:42:20 +00:00
|
|
|
#include <stdio.h>
|
2015-05-19 07:01:18 +00:00
|
|
|
|
2015-05-20 05:22:32 +00:00
|
|
|
class CToolCook final : public CToolBase
|
2015-05-19 07:01:18 +00:00
|
|
|
{
|
|
|
|
public:
|
2015-05-20 05:22:32 +00:00
|
|
|
CToolCook(const SToolPassInfo& info)
|
|
|
|
: CToolBase(info)
|
2015-05-19 07:01:18 +00:00
|
|
|
{
|
|
|
|
}
|
2015-05-20 05:22:32 +00:00
|
|
|
|
2015-05-19 07:01:18 +00:00
|
|
|
~CToolCook()
|
|
|
|
{
|
|
|
|
}
|
2015-05-20 05:22:32 +00:00
|
|
|
|
2015-05-26 04:42:20 +00:00
|
|
|
static void Help(CHelpOutput& help)
|
2015-05-20 05:22:32 +00:00
|
|
|
{
|
2015-05-26 04:42:20 +00:00
|
|
|
help.secHead("NAME");
|
|
|
|
help.beginWrap();
|
|
|
|
help.wrap("hecl-cook - Cook objects within the project database\n");
|
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.secHead("SYNOPSIS");
|
|
|
|
help.beginWrap();
|
|
|
|
help.wrap("hecl cook [-r] [<pathspec>...]\n");
|
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.secHead("DESCRIPTION");
|
|
|
|
help.beginWrap();
|
|
|
|
help.wrap("This command initiates a cooking pass on the project database. Cooking "
|
|
|
|
"is analogous to compiling in software development. The resulting object buffers "
|
|
|
|
"are cached within the project database. HECL performs the following "
|
|
|
|
"tasks for each object during the cook process:\n\n");
|
|
|
|
help.wrapBold("- Object Gather: ");
|
|
|
|
help.wrap("Files added with ");
|
|
|
|
help.wrapBold("hecl add");
|
|
|
|
help.wrap(" are queried for their dependent files (e.g. ");
|
|
|
|
help.wrapBold(".blend");
|
|
|
|
help.wrap(" files return any linked ");
|
|
|
|
help.wrapBold(".png");
|
|
|
|
help.wrap(" images). If the dependent files are unable to be found, the cook process aborts.\n\n");
|
|
|
|
help.wrapBold("- Modtime Comparison: ");
|
|
|
|
help.wrap("Files that have previously finished a cook pass are inspected for their time of "
|
|
|
|
"last modification. If the file hasn't changed since its previous cook-pass, the "
|
|
|
|
"process is skipped. If the file has been moved or deleted, the object is automatically "
|
|
|
|
"removed from the project database.\n\n");
|
|
|
|
help.wrapBold("- Cook: ");
|
|
|
|
help.wrap("A type-specific procedure compiles the file's contents into an efficient format "
|
|
|
|
"for use by the runtime. A data-buffer is provided to HECL.\n\n");
|
|
|
|
help.wrapBold("- Hash and Compress: ");
|
|
|
|
help.wrap("The data-buffer is hashed and compressed before being cached in the object database.\n\n");
|
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.secHead("OPTIONS");
|
|
|
|
help.optionHead("<pathspec>...", "input file(s)");
|
|
|
|
help.beginWrap();
|
|
|
|
help.wrap("Specifies working file(s) containing production data to be cooked by HECL. "
|
|
|
|
"Glob-strings may be specified (e.g. ");
|
|
|
|
help.wrapBold("*.blend");
|
|
|
|
help.wrap(") to automatically cook all matching current-directory files in the project database. "
|
|
|
|
"If no path specified, all files in the project database are cooked.\n");
|
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.optionHead("-r", "recursion");
|
|
|
|
help.beginWrap();
|
|
|
|
help.wrap("Enables recursive file-matching for cooking entire directories of working files.\n");
|
|
|
|
help.endWrap();
|
2015-05-20 05:22:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string toolName() const {return "cook";}
|
|
|
|
|
|
|
|
int run()
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2015-05-19 07:01:18 +00:00
|
|
|
};
|
2015-05-19 21:01:32 +00:00
|
|
|
|
|
|
|
#endif // CTOOL_COOK
|