merge from default

This commit is contained in:
dnk-88 2011-09-26 02:40:30 +03:00
parent d5aba92b5a
commit f07731ad20
185 changed files with 5279 additions and 1508 deletions

View file

@ -95,12 +95,6 @@ public:
@endcode @endcode
*/ */
virtual void setNelContext(NLMISC::INelContext *nelContext) = 0; virtual void setNelContext(NLMISC::INelContext *nelContext) = 0;
virtual QString name() const = 0;
virtual QString version() const = 0;
virtual QString vendor() const = 0;
virtual QString description() const = 0;
virtual QStringList dependencies() const = 0;
}; };
}; //namespace ExtensionSystem }; //namespace ExtensionSystem

View file

@ -37,8 +37,8 @@ struct State
{ {
Invalid = 1, Invalid = 1,
Read, Read,
Loaded,
Resolved, Resolved,
Loaded,
Initialized, Initialized,
Running, Running,
Stopped, Stopped,

View file

@ -26,13 +26,14 @@
namespace ExtensionSystem namespace ExtensionSystem
{ {
CPluginManager::CPluginManager(QObject *parent) PluginManager::PluginManager(QObject *parent)
:IPluginManager(parent), :IPluginManager(parent),
m_settings(0) m_settings(0),
m_extension("xml")
{ {
} }
CPluginManager::~CPluginManager() PluginManager::~PluginManager()
{ {
writeSettings(); writeSettings();
stopAll(); stopAll();
@ -40,7 +41,7 @@ CPluginManager::~CPluginManager()
qDeleteAll(m_pluginSpecs); qDeleteAll(m_pluginSpecs);
} }
void CPluginManager::addObject(QObject *obj) void PluginManager::addObject(QObject *obj)
{ {
QWriteLocker lock(&m_lock); QWriteLocker lock(&m_lock);
if (obj == 0) if (obj == 0)
@ -60,7 +61,7 @@ void CPluginManager::addObject(QObject *obj)
Q_EMIT objectAdded(obj); Q_EMIT objectAdded(obj);
} }
void CPluginManager::removeObject(QObject *obj) void PluginManager::removeObject(QObject *obj)
{ {
if (obj == 0) if (obj == 0)
{ {
@ -80,25 +81,25 @@ void CPluginManager::removeObject(QObject *obj)
m_allObjects.removeAll(obj); m_allObjects.removeAll(obj);
} }
QList<QObject *> CPluginManager::allObjects() const QList<QObject *> PluginManager::allObjects() const
{ {
return m_allObjects; return m_allObjects;
} }
void CPluginManager::loadPlugins() void PluginManager::loadPlugins()
{ {
Q_FOREACH (CPluginSpec *spec, m_pluginSpecs) Q_FOREACH (PluginSpec *spec, m_pluginSpecs)
setPluginState(spec, State::Loaded);
Q_FOREACH (CPluginSpec *spec, m_pluginSpecs)
setPluginState(spec, State::Resolved); setPluginState(spec, State::Resolved);
QList<CPluginSpec *> queue = loadQueue(); QList<PluginSpec *> queue = loadQueue();
Q_FOREACH (CPluginSpec *spec, queue) Q_FOREACH (PluginSpec *spec, queue)
setPluginState(spec, State::Loaded);
Q_FOREACH (PluginSpec *spec, queue)
setPluginState(spec, State::Initialized); setPluginState(spec, State::Initialized);
QListIterator<CPluginSpec *> it(queue); QListIterator<PluginSpec *> it(queue);
it.toBack(); it.toBack();
while (it.hasPrevious()) while (it.hasPrevious())
setPluginState(it.previous(), State::Running); setPluginState(it.previous(), State::Running);
@ -106,34 +107,34 @@ void CPluginManager::loadPlugins()
Q_EMIT pluginsChanged(); Q_EMIT pluginsChanged();
} }
QStringList CPluginManager::getPluginPaths() const QStringList PluginManager::getPluginPaths() const
{ {
return m_pluginPaths; return m_pluginPaths;
} }
void CPluginManager::setPluginPaths(const QStringList &paths) void PluginManager::setPluginPaths(const QStringList &paths)
{ {
m_pluginPaths = paths; m_pluginPaths = paths;
readPluginPaths(); readPluginPaths();
readSettings(); readSettings();
} }
QList<IPluginSpec *> CPluginManager::plugins() const QList<IPluginSpec *> PluginManager::plugins() const
{ {
return m_ipluginSpecs; return m_ipluginSpecs;
} }
void CPluginManager::setSettings(QSettings *settings) void PluginManager::setSettings(QSettings *settings)
{ {
m_settings = settings; m_settings = settings;
} }
QSettings *CPluginManager::settings() const QSettings *PluginManager::settings() const
{ {
return m_settings; return m_settings;
} }
void CPluginManager::readSettings() void PluginManager::readSettings()
{ {
if (m_settings) if (m_settings)
{ {
@ -141,7 +142,7 @@ void CPluginManager::readSettings()
m_settings->beginGroup("PluginManager"); m_settings->beginGroup("PluginManager");
blackList = m_settings->value("BlackList").toStringList(); blackList = m_settings->value("BlackList").toStringList();
m_settings->endGroup(); m_settings->endGroup();
Q_FOREACH (CPluginSpec *spec, m_pluginSpecs) Q_FOREACH (PluginSpec *spec, m_pluginSpecs)
{ {
QString pluginName = spec->fileName(); QString pluginName = spec->fileName();
@ -154,14 +155,13 @@ void CPluginManager::readSettings()
} }
} }
void CPluginManager::writeSettings() void PluginManager::writeSettings()
{ {
if (m_settings) if (m_settings)
{ {
QStringList blackList; QStringList blackList;
Q_FOREACH(CPluginSpec *spec, m_pluginSpecs) Q_FOREACH(PluginSpec *spec, m_pluginSpecs)
{ {
nlinfo(spec->fileName().toStdString().c_str());
if (!spec->isEnabled()) if (!spec->isEnabled())
blackList.push_back(spec->fileName()); blackList.push_back(spec->fileName());
} }
@ -172,7 +172,7 @@ void CPluginManager::writeSettings()
} }
} }
void CPluginManager::readPluginPaths() void PluginManager::readPluginPaths()
{ {
qDeleteAll(m_pluginSpecs); qDeleteAll(m_pluginSpecs);
m_pluginSpecs.clear(); m_pluginSpecs.clear();
@ -183,11 +183,7 @@ void CPluginManager::readPluginPaths()
while (!searchPaths.isEmpty()) while (!searchPaths.isEmpty())
{ {
const QDir dir(searchPaths.takeFirst()); const QDir dir(searchPaths.takeFirst());
#ifdef Q_OS_WIN const QFileInfoList files = dir.entryInfoList(QStringList() << QString("ovqt_plugin_*.%1").arg(m_extension), QDir::Files);
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("ovqt_plugin_*.dll"), QDir::Files);
#else
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("libovqt_plugin_*.so"), QDir::Files);
#endif
Q_FOREACH (const QFileInfo &file, files) Q_FOREACH (const QFileInfo &file, files)
pluginsList << file.absoluteFilePath(); pluginsList << file.absoluteFilePath();
const QFileInfoList dirs = dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot); const QFileInfoList dirs = dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot);
@ -197,9 +193,9 @@ void CPluginManager::readPluginPaths()
Q_FOREACH (const QString &pluginFile, pluginsList) Q_FOREACH (const QString &pluginFile, pluginsList)
{ {
CPluginSpec *spec = new CPluginSpec; PluginSpec *spec = new PluginSpec;
spec->setFileName(pluginFile);
spec->m_pluginManager = this; spec->m_pluginManager = this;
spec->setSpecFileName(pluginFile);
m_pluginSpecs.append(spec); m_pluginSpecs.append(spec);
m_ipluginSpecs.append(spec); m_ipluginSpecs.append(spec);
} }
@ -207,7 +203,7 @@ void CPluginManager::readPluginPaths()
Q_EMIT pluginsChanged(); Q_EMIT pluginsChanged();
} }
void CPluginManager::setPluginState(CPluginSpec *spec, int destState) void PluginManager::setPluginState(PluginSpec *spec, int destState)
{ {
if (spec->hasError() || spec->state() != destState-1) if (spec->hasError() || spec->state() != destState-1)
return; return;
@ -233,7 +229,7 @@ void CPluginManager::setPluginState(CPluginSpec *spec, int destState)
default: default:
break; break;
} }
Q_FOREACH (const CPluginSpec *depSpec, spec->dependencySpecs()) Q_FOREACH (const PluginSpec *depSpec, spec->dependencySpecs())
{ {
if (depSpec->state() != destState) if (depSpec->state() != destState)
{ {
@ -256,19 +252,19 @@ void CPluginManager::setPluginState(CPluginSpec *spec, int destState)
} }
} }
QList<CPluginSpec *> CPluginManager::loadQueue() QList<PluginSpec *> PluginManager::loadQueue()
{ {
QList<CPluginSpec *> queue; QList<PluginSpec *> queue;
Q_FOREACH(CPluginSpec *spec, m_pluginSpecs) Q_FOREACH(PluginSpec *spec, m_pluginSpecs)
{ {
QList<CPluginSpec *> circularityCheckQueue; QList<PluginSpec *> circularityCheckQueue;
loadQueue(spec, queue, circularityCheckQueue); loadQueue(spec, queue, circularityCheckQueue);
} }
return queue; return queue;
} }
bool CPluginManager::loadQueue(CPluginSpec *spec, QList<CPluginSpec *> &queue, bool PluginManager::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queue,
QList<CPluginSpec *> &circularityCheckQueue) QList<PluginSpec *> &circularityCheckQueue)
{ {
if (queue.contains(spec)) if (queue.contains(spec))
return true; return true;
@ -295,7 +291,7 @@ bool CPluginManager::loadQueue(CPluginSpec *spec, QList<CPluginSpec *> &queue,
} }
// add dependencies // add dependencies
Q_FOREACH (CPluginSpec *depSpec, spec->dependencySpecs()) Q_FOREACH (PluginSpec *depSpec, spec->dependencySpecs())
{ {
if (!loadQueue(depSpec, queue, circularityCheckQueue)) if (!loadQueue(depSpec, queue, circularityCheckQueue))
{ {
@ -311,17 +307,17 @@ bool CPluginManager::loadQueue(CPluginSpec *spec, QList<CPluginSpec *> &queue,
return true; return true;
} }
void CPluginManager::stopAll() void PluginManager::stopAll()
{ {
QList<CPluginSpec *> queue = loadQueue(); QList<PluginSpec *> queue = loadQueue();
Q_FOREACH (CPluginSpec *spec, queue) Q_FOREACH (PluginSpec *spec, queue)
setPluginState(spec, State::Stopped); setPluginState(spec, State::Stopped);
} }
void CPluginManager::deleteAll() void PluginManager::deleteAll()
{ {
QList<CPluginSpec *> queue = loadQueue(); QList<PluginSpec *> queue = loadQueue();
QListIterator<CPluginSpec *> it(queue); QListIterator<PluginSpec *> it(queue);
it.toBack(); it.toBack();
while (it.hasPrevious()) while (it.hasPrevious())
{ {

View file

@ -29,15 +29,15 @@ namespace ExtensionSystem
{ {
class IPlugin; class IPlugin;
class CPluginSpec; class PluginSpec;
class CPluginManager : public IPluginManager class PluginManager : public IPluginManager
{ {
Q_OBJECT Q_OBJECT
public: public:
CPluginManager(QObject *parent = 0); PluginManager(QObject *parent = 0);
~CPluginManager(); ~PluginManager();
// Object pool operations // Object pool operations
virtual void addObject(QObject *obj); virtual void addObject(QObject *obj);
@ -49,7 +49,7 @@ public:
virtual QStringList getPluginPaths() const; virtual QStringList getPluginPaths() const;
virtual void setPluginPaths(const QStringList &paths); virtual void setPluginPaths(const QStringList &paths);
virtual QList<IPluginSpec *> plugins() const; virtual QList<IPluginSpec *> plugins() const;
QList<CPluginSpec *> loadQueue(); QList<PluginSpec *> loadQueue();
// Settings // Settings
virtual void setSettings(QSettings *settings); virtual void setSettings(QSettings *settings);
@ -58,21 +58,22 @@ public:
void writeSettings(); void writeSettings();
private: private:
void setPluginState(CPluginSpec *spec, int destState); void setPluginState(PluginSpec *spec, int destState);
void readPluginPaths(); void readPluginPaths();
bool loadQueue(CPluginSpec *spec, QList<CPluginSpec *> &queue, QList<CPluginSpec *> &circularityCheckQueue); bool loadQueue(PluginSpec *spec, QList<PluginSpec *> &queue, QList<PluginSpec *> &circularityCheckQueue);
void stopAll(); void stopAll();
void deleteAll(); void deleteAll();
mutable QReadWriteLock m_lock; mutable QReadWriteLock m_lock;
QSettings *m_settings; QSettings *m_settings;
QList<CPluginSpec *> m_pluginSpecs; QString m_extension;
QList<PluginSpec *> m_pluginSpecs;
QList<IPluginSpec *> m_ipluginSpecs; QList<IPluginSpec *> m_ipluginSpecs;
QStringList m_pluginPaths; QStringList m_pluginPaths;
QList<QObject *> m_allObjects; QList<QObject *> m_allObjects;
}; // class CPluginManager }; // class PluginManager
} // namespace ExtensionSystem } // namespace ExtensionSystem

View file

@ -16,12 +16,15 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Project includes
#include "plugin_spec.h" #include "plugin_spec.h"
#include "iplugin.h" #include "iplugin.h"
#include "iplugin_manager.h" #include "iplugin_manager.h"
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include "nel/misc/debug.h"
// Qt includes
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QFile> #include <QtCore/QFile>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
@ -30,8 +33,17 @@
namespace ExtensionSystem namespace ExtensionSystem
{ {
const char *const PLUGIN_SPEC_NAME = "name";
const char *const PLUGIN_SPEC_VENDOR = "vendor";
const char *const PLUGIN_SPEC_VERSION = "version";
const char *const PLUGIN_SPEC_LIBRARY_NAME = "library-name";
const char *const PLUGIN_SPEC_DESCRIPTION = "description";
const char *const PLUGIN_SPEC_DEPENDENCIES = "dependencies";
const char *const PLUGIN_SPEC_DEPENDENCY = "dependency";
const char *const PLUGIN_SPEC_DEPENDENCY_NAME = "plugin-name";
const char *const PLUGIN_SPEC_DEPENDENCY_VERSION = "version";
CPluginSpec::CPluginSpec() PluginSpec::PluginSpec()
: m_location(""), : m_location(""),
m_filePath(""), m_filePath(""),
m_fileName(""), m_fileName(""),
@ -39,6 +51,8 @@ CPluginSpec::CPluginSpec()
m_version(""), m_version(""),
m_vendor(""), m_vendor(""),
m_description(""), m_description(""),
m_nameSpecFile(""),
m_suffix(""),
m_state(State::Invalid), m_state(State::Invalid),
m_enabled(true), m_enabled(true),
m_enabledStartup(true), m_enabledStartup(true),
@ -47,104 +61,195 @@ CPluginSpec::CPluginSpec()
m_plugin(0), m_plugin(0),
m_pluginManager(0) m_pluginManager(0)
{ {
#ifdef Q_OS_WIN
# ifdef DEBUG
m_suffix = "_d.dll";
# else
m_suffix = "_r.dll";
# endif
#else
m_suffix = ".so";
#endif
} }
QString CPluginSpec::name() const QString PluginSpec::name() const
{ {
return m_name; return m_name;
} }
QString CPluginSpec::version() const QString PluginSpec::version() const
{ {
return m_version; return m_version;
} }
QString CPluginSpec::vendor() const QString PluginSpec::vendor() const
{ {
return m_vendor; return m_vendor;
} }
QString CPluginSpec::description() const QString PluginSpec::description() const
{ {
return m_description; return m_description;
} }
QString CPluginSpec::location() const QString PluginSpec::location() const
{ {
return m_location; return m_location;
} }
QString CPluginSpec::filePath() const QString PluginSpec::filePath() const
{ {
return m_filePath; return m_filePath;
} }
QString CPluginSpec::fileName() const QString PluginSpec::fileName() const
{ {
return m_fileName; return m_fileName;
} }
IPlugin *CPluginSpec::plugin() const IPlugin *PluginSpec::plugin() const
{ {
return m_plugin; return m_plugin;
} }
int CPluginSpec::state() const int PluginSpec::state() const
{ {
return m_state; return m_state;
} }
bool CPluginSpec::hasError() const bool PluginSpec::hasError() const
{ {
return m_hasError; return m_hasError;
} }
QString CPluginSpec::errorString() const QString PluginSpec::errorString() const
{ {
return m_errorString; return m_errorString;
} }
QList<CPluginSpec *> CPluginSpec::dependencySpecs() const QList<PluginSpec *> PluginSpec::dependencySpecs() const
{ {
return m_dependencySpecs; return m_dependencySpecs;
} }
bool CPluginSpec::setFileName(const QString &fileName) bool PluginSpec::setFileName(const QString &fileName)
{ {
QFile file(fileName); m_fileName = fileName + m_suffix;
m_filePath = m_location + "/" + m_fileName;
nlinfo(m_filePath.toStdString().c_str());
QFile file(m_filePath);
if (!file.exists()) if (!file.exists())
return reportError(QCoreApplication::translate("CPluginSpec", "File does not exist: %1").arg(file.fileName())); return reportError(QCoreApplication::translate("PluginSpec", "File does not exist: %1").arg(file.fileName()));
if (!file.open(QIODevice::ReadOnly)) if (!file.open(QIODevice::ReadOnly))
return reportError(QCoreApplication::translate("CPluginSpec", "Could not open file for read: %1").arg(file.fileName())); return reportError(QCoreApplication::translate("PluginSpec", "Could not open file for read: %1").arg(file.fileName()));
return true;
}
bool PluginSpec::setSpecFileName(const QString &specFileName)
{
m_nameSpecFile = specFileName;
QFile file(specFileName);
if (!file.exists())
return reportError(QCoreApplication::translate("PluginSpec", "Spec file does not exist: %1").arg(file.fileName()));
QFileInfo fileInfo(file); QFileInfo fileInfo(file);
m_location = fileInfo.absolutePath(); m_location = fileInfo.absolutePath();
m_filePath = fileInfo.absoluteFilePath(); readSpec();
m_fileName = fileInfo.fileName(); return true;
}
bool PluginSpec::readSpec()
{
QFile file(m_nameSpecFile);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
return reportError(QCoreApplication::translate("PluginSpec", "Could not open spec file for read: %1").arg(file.fileName()));
QXmlStreamReader reader(&file);
while (!reader.atEnd())
{
if (reader.isStartElement())
parseSpec(reader);
reader.readNext();
}
if (reader.hasError())
return reportError(QCoreApplication::translate("PluginSpec", "Error parsing file %1: %2, at line %3, column %4")
.arg(file.fileName())
.arg(reader.errorString())
.arg(reader.lineNumber())
.arg(reader.columnNumber()));
m_state = State::Read; m_state = State::Read;
return true; return true;
} }
void CPluginSpec::setEnabled(bool enabled) void PluginSpec::parseSpec(QXmlStreamReader &reader)
{
QString elemName = reader.name().toString();
reader.readNext();
if (reader.isCharacters())
{
QString elemText = reader.text().toString();
if (elemName == PLUGIN_SPEC_LIBRARY_NAME)
setFileName(elemText);
if (elemName == PLUGIN_SPEC_NAME)
m_name = elemText;
if (elemName == PLUGIN_SPEC_VERSION)
m_version = elemText;
if (elemName == PLUGIN_SPEC_VENDOR)
m_vendor = elemText;
if (elemName == PLUGIN_SPEC_DESCRIPTION)
m_description = elemText;
if (elemName == PLUGIN_SPEC_DEPENDENCIES)
parseDependency(reader);
}
}
void PluginSpec::parseDependency(QXmlStreamReader &reader)
{
QString elemName;
while (!reader.atEnd() && (elemName != PLUGIN_SPEC_DEPENDENCIES))
{
reader.readNext();
elemName = reader.name().toString();
if (reader.isStartElement() && (elemName == PLUGIN_SPEC_DEPENDENCY))
{
// Read name dependency plugin
QString dependencyName = reader.attributes().value(PLUGIN_SPEC_DEPENDENCY_NAME).toString();
if (dependencyName.isEmpty())
{
reader.raiseError(QCoreApplication::translate("CPluginSpec", "'%1' misses attribute '%2'")
.arg(PLUGIN_SPEC_DEPENDENCY)
.arg(PLUGIN_SPEC_DEPENDENCY_NAME));
return;
}
// TODO: Read version dependency plugin
QString dependencyVersion = reader.attributes().value(PLUGIN_SPEC_DEPENDENCY_VERSION).toString();
m_dependencies.push_back(dependencyName);
}
}
}
void PluginSpec::setEnabled(bool enabled)
{ {
m_enabled = enabled; m_enabled = enabled;
} }
bool CPluginSpec::isEnabled() const bool PluginSpec::isEnabled() const
{ {
return m_enabled; return m_enabled;
} }
bool CPluginSpec::loadLibrary() bool PluginSpec::loadLibrary()
{ {
if (m_hasError) if (m_hasError)
return false; return false;
if (m_state != State::Read) if (m_state != State::Resolved)
{ {
if (m_state == State::Loaded) if (m_state == State::Loaded)
return true; return true;
return reportError(QCoreApplication::translate("CPluginSpec", "Loading the library failed because state != Resolved")); return reportError(QCoreApplication::translate("PluginSpec", "Loading the library failed because state != Resolved"));
} }
QPluginLoader loader(m_filePath); QPluginLoader loader(m_filePath);
@ -155,38 +260,32 @@ bool CPluginSpec::loadLibrary()
if (!pluginObject) if (!pluginObject)
{ {
loader.unload(); loader.unload();
return reportError(QCoreApplication::translate("CPluginSpec", "Plugin is not valid (does not derive from IPlugin)")); return reportError(QCoreApplication::translate("PluginSpec", "Plugin is not valid (does not derive from IPlugin)"));
} }
pluginObject->setNelContext(&NLMISC::INelContext::getInstance()); pluginObject->setNelContext(&NLMISC::INelContext::getInstance());
m_name = pluginObject->name();
m_version = pluginObject->version();
m_vendor = pluginObject->vendor();
m_description = pluginObject->description();
m_state = State::Loaded; m_state = State::Loaded;
m_plugin = pluginObject; m_plugin = pluginObject;
return true; return true;
} }
bool CPluginSpec::resolveDependencies(const QList<CPluginSpec *> &specs) bool PluginSpec::resolveDependencies(const QList<PluginSpec *> &specs)
{ {
if (m_hasError) if (m_hasError)
return false; return false;
if (m_state != State::Loaded) if (m_state != State::Read)
{ {
m_errorString = QCoreApplication::translate("CPluginSpec", "Resolving dependencies failed because state != Read"); m_errorString = QCoreApplication::translate("PluginSpec", "Resolving dependencies failed because state != Read");
m_hasError = true; m_hasError = true;
return false; return false;
} }
QList<CPluginSpec *> resolvedDependencies; QList<PluginSpec *> resolvedDependencies;
QStringList dependencies = m_plugin->dependencies(); Q_FOREACH(const QString &dependency, m_dependencies)
Q_FOREACH(const QString &dependency, dependencies)
{ {
CPluginSpec *found = 0; PluginSpec *found = 0;
Q_FOREACH(CPluginSpec *spec, specs) Q_FOREACH(PluginSpec *spec, specs)
{ {
if (QString::compare(dependency, spec->name(), Qt::CaseInsensitive) == 0) if (QString::compare(dependency, spec->name(), Qt::CaseInsensitive) == 0)
{ {
@ -199,7 +298,7 @@ bool CPluginSpec::resolveDependencies(const QList<CPluginSpec *> &specs)
m_hasError = true; m_hasError = true;
if (!m_errorString.isEmpty()) if (!m_errorString.isEmpty())
m_errorString.append(QLatin1Char('\n')); m_errorString.append(QLatin1Char('\n'));
m_errorString.append(QCoreApplication::translate("CPluginSpec", "Could not resolve dependency '%1'") m_errorString.append(QCoreApplication::translate("PluginSpec", "Could not resolve dependency '%1'")
.arg(dependency)); .arg(dependency));
continue; continue;
} }
@ -209,34 +308,32 @@ bool CPluginSpec::resolveDependencies(const QList<CPluginSpec *> &specs)
return false; return false;
m_dependencySpecs = resolvedDependencies; m_dependencySpecs = resolvedDependencies;
m_state = State::Resolved; m_state = State::Resolved;
return true; return true;
} }
bool CPluginSpec::initializePlugin() bool PluginSpec::initializePlugin()
{ {
if (m_hasError) if (m_hasError)
return false; return false;
if (m_state != State::Resolved) if (m_state != State::Loaded)
{ {
if (m_state == State::Initialized) if (m_state == State::Initialized)
return true; return true;
return reportError(QCoreApplication::translate("CPluginSpec", "Initializing the plugin failed because state != Resolved)")); return reportError(QCoreApplication::translate("PluginSpec", "Initializing the plugin failed because state != Loaded)"));
} }
if (!m_plugin) if (!m_plugin)
return reportError(QCoreApplication::translate("CPluginSpec", "Internal error: have no plugin instance to initialize")); return reportError(QCoreApplication::translate("PluginSpec", "Internal error: have no plugin instance to initialize"));
QString err; QString err;
if (!m_plugin->initialize(m_pluginManager, &err)) if (!m_plugin->initialize(m_pluginManager, &err))
return reportError(QCoreApplication::translate("CPluginSpec", "Plugin initialization failed: %1").arg(err)); return reportError(QCoreApplication::translate("PluginSpec", "Plugin initialization failed: %1").arg(err));
m_state = State::Initialized; m_state = State::Initialized;
return true; return true;
} }
bool CPluginSpec::initializeExtensions() bool PluginSpec::initializeExtensions()
{ {
if (m_hasError) if (m_hasError)
return false; return false;
@ -244,17 +341,17 @@ bool CPluginSpec::initializeExtensions()
{ {
if (m_state == State::Running) if (m_state == State::Running)
return true; return true;
return reportError(QCoreApplication::translate("CPluginSpec", "Cannot perform extensionsInitialized because state != Initialized")); return reportError(QCoreApplication::translate("PluginSpec", "Cannot perform extensionsInitialized because state != Initialized"));
} }
if (!m_plugin) if (!m_plugin)
return reportError(QCoreApplication::translate("CPluginSpec", "Internal error: have no plugin instance to perform extensionsInitialized")); return reportError(QCoreApplication::translate("PluginSpec", "Internal error: have no plugin instance to perform extensionsInitialized"));
m_plugin->extensionsInitialized(); m_plugin->extensionsInitialized();
m_state = State::Running; m_state = State::Running;
return true; return true;
} }
void CPluginSpec::stop() void PluginSpec::stop()
{ {
if (!m_plugin) if (!m_plugin)
return; return;
@ -262,7 +359,7 @@ void CPluginSpec::stop()
m_state = State::Stopped; m_state = State::Stopped;
} }
void CPluginSpec::kill() void PluginSpec::kill()
{ {
if (!m_plugin) if (!m_plugin)
return; return;
@ -271,17 +368,17 @@ void CPluginSpec::kill()
m_state = State::Deleted; m_state = State::Deleted;
} }
void CPluginSpec::setEnabledStartup(bool enabled) void PluginSpec::setEnabledStartup(bool enabled)
{ {
m_enabledStartup = enabled; m_enabledStartup = enabled;
} }
bool CPluginSpec::isEnabledStartup() const bool PluginSpec::isEnabledStartup() const
{ {
return m_enabledStartup; return m_enabledStartup;
} }
bool CPluginSpec::reportError(const QString &err) bool PluginSpec::reportError(const QString &err)
{ {
m_errorString = err; m_errorString = err;
m_hasError = true; m_hasError = true;

View file

@ -21,12 +21,14 @@
#include "iplugin_spec.h" #include "iplugin_spec.h"
#include "QtCore/QList" #include <QtCore/QList>
#include <QtCore/QStringList>
#include <QtCore/QXmlStreamReader>
namespace ExtensionSystem namespace ExtensionSystem
{ {
class CPluginSpec: public IPluginSpec class PluginSpec: public IPluginSpec
{ {
public: public:
virtual QString name() const; virtual QString name() const;
@ -44,18 +46,22 @@ public:
virtual int state() const; virtual int state() const;
virtual bool hasError() const; virtual bool hasError() const;
virtual QString errorString() const; virtual QString errorString() const;
QList<CPluginSpec *> dependencySpecs() const; QList<PluginSpec *> dependencySpecs() const;
/// Enables/disables load this plugin after restart the program /// Enables/disables load this plugin after restart the program
virtual void setEnabled(bool enabled); virtual void setEnabled(bool enabled);
virtual bool isEnabled() const; virtual bool isEnabled() const;
private: private:
CPluginSpec(); PluginSpec();
bool setFileName(const QString &fileName); bool setFileName(const QString &fileName);
bool setSpecFileName(const QString &specFileName);
bool readSpec();
void parseSpec(QXmlStreamReader &reader);
void parseDependency(QXmlStreamReader &reader);
bool loadLibrary(); bool loadLibrary();
bool resolveDependencies(const QList<CPluginSpec *> &specs); bool resolveDependencies(const QList<PluginSpec *> &specs);
bool initializePlugin(); bool initializePlugin();
bool initializeExtensions(); bool initializeExtensions();
void stop(); void stop();
@ -77,16 +83,19 @@ private:
QString m_vendor; QString m_vendor;
QString m_description; QString m_description;
QString m_nameSpecFile;
QString m_suffix;
int m_state; int m_state;
bool m_enabled, m_enabledStartup; bool m_enabled, m_enabledStartup;
bool m_hasError; bool m_hasError;
QString m_errorString; QString m_errorString;
QStringList m_dependencies;
IPlugin *m_plugin; IPlugin *m_plugin;
IPluginManager *m_pluginManager; IPluginManager *m_pluginManager;
QList<CPluginSpec *> m_dependencySpecs; QList<PluginSpec *> m_dependencySpecs;
friend class CPluginManager; friend class PluginManager;
}; };
} // namespace ExtensionSystem } // namespace ExtensionSystem

View file

@ -148,7 +148,7 @@ sint main(int argc, char **argv)
NLMISC::CLibrary::addLibPath((qApp->applicationDirPath() + QString("/../PlugIns/nel")).toStdString()); NLMISC::CLibrary::addLibPath((qApp->applicationDirPath() + QString("/../PlugIns/nel")).toStdString());
#endif #endif
ExtensionSystem::CPluginManager pluginManager; ExtensionSystem::PluginManager pluginManager;
pluginManager.setSettings(settings); pluginManager.setSettings(settings);
QStringList pluginPaths; QStringList pluginPaths;
#if !defined(NL_OS_MAC) #if !defined(NL_OS_MAC)

View file

@ -17,7 +17,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "core.h" #include "core.h"
#include "imenu_manager.h"
#include "context_manager.h" #include "context_manager.h"
#include "main_window.h" #include "main_window.h"
#include "../../extension_system/iplugin_manager.h" #include "../../extension_system/iplugin_manager.h"
@ -50,7 +49,7 @@ bool CoreImpl::showOptionsDialog(const QString &group,
return m_mainWindow->showOptionsDialog(group, page, parent); return m_mainWindow->showOptionsDialog(group, page, parent);
} }
IMenuManager *CoreImpl::menuManager() const MenuManager *CoreImpl::menuManager() const
{ {
return m_mainWindow->menuManager(); return m_mainWindow->menuManager();
} }

View file

@ -37,7 +37,7 @@ public:
const QString &page = QString(), const QString &page = QString(),
QWidget *parent = 0); QWidget *parent = 0);
virtual IMenuManager *menuManager() const; virtual MenuManager *menuManager() const;
virtual ContextManager *contextManager() const; virtual ContextManager *contextManager() const;
virtual QSettings *settings() const; virtual QSettings *settings() const;

View file

@ -23,7 +23,7 @@ namespace Core
namespace Constants namespace Constants
{ {
const char * const OVQT_VERSION_LONG = "0.1"; const char *const OVQT_VERSION_LONG = "0.8";
const char *const OVQT_VENDOR = "Ryzom Core"; const char *const OVQT_VENDOR = "Ryzom Core";
const char *const OVQT_YEAR = "2010, 2011"; const char *const OVQT_YEAR = "2010, 2011";
const char *const OVQT_CORE_PLUGIN = "Core"; const char *const OVQT_CORE_PLUGIN = "Core";

View file

@ -64,8 +64,8 @@ bool CorePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QStr
bool success = m_mainWindow->initialize(errorString); bool success = m_mainWindow->initialize(errorString);
GeneralSettingsPage *generalSettings = new GeneralSettingsPage(this); GeneralSettingsPage *generalSettings = new GeneralSettingsPage(this);
CSearchPathsSettingsPage *searchPathPage = new CSearchPathsSettingsPage(false, this); SearchPathsSettingsPage *searchPathPage = new SearchPathsSettingsPage(false, this);
CSearchPathsSettingsPage *recureseSearchPathPage = new CSearchPathsSettingsPage(true, this); SearchPathsSettingsPage *recureseSearchPathPage = new SearchPathsSettingsPage(true, this);
generalSettings->applyGeneralSettings(); generalSettings->applyGeneralSettings();
searchPathPage->applySearchPaths(); searchPathPage->applySearchPaths();
@ -95,31 +95,6 @@ void CorePlugin::setNelContext(NLMISC::INelContext *nelContext)
m_libContext = new NLMISC::CLibraryContext(*nelContext); m_libContext = new NLMISC::CLibraryContext(*nelContext);
} }
QString CorePlugin::name() const
{
return QLatin1String(Constants::OVQT_CORE_PLUGIN);
}
QString CorePlugin::version() const
{
return Constants::OVQT_VERSION_LONG;
}
QString CorePlugin::vendor() const
{
return Constants::OVQT_VENDOR;
}
QString CorePlugin::description() const
{
return "Core plugin.";
}
QStringList CorePlugin::dependencies() const
{
return QStringList();
}
void CorePlugin::addAutoReleasedObject(QObject *obj) void CorePlugin::addAutoReleasedObject(QObject *obj)
{ {
m_plugMan->addObject(obj); m_plugMan->addObject(obj);

View file

@ -53,12 +53,6 @@ public:
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void addAutoReleasedObject(QObject *obj); void addAutoReleasedObject(QObject *obj);
ExtensionSystem::IPluginManager *pluginManager() const ExtensionSystem::IPluginManager *pluginManager() const

View file

@ -35,7 +35,7 @@ class IPluginManager;
namespace Core namespace Core
{ {
class IMenuManager; class MenuManager;
class ContextManager; class ContextManager;
class CORE_EXPORT ICore : public QObject class CORE_EXPORT ICore : public QObject
@ -52,7 +52,7 @@ public:
const QString &page = QString(), const QString &page = QString(),
QWidget *parent = 0) = 0; QWidget *parent = 0) = 0;
virtual IMenuManager *menuManager() const = 0; virtual MenuManager *menuManager() const = 0;
virtual ContextManager *contextManager() const = 0; virtual ContextManager *contextManager() const = 0;
virtual QSettings *settings() const = 0; virtual QSettings *settings() const = 0;

View file

@ -1,62 +0,0 @@
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
// Copyright (C) 2011 Dzmitry Kamiahin <dnk-88@tut.by>
//
// This program 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.
//
// This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef IMENU_MANAGER_H
#define IMENU_MANAGER_H
#include "core_global.h"
#include <QtCore/QObject>
#include <QtCore/QList>
QT_BEGIN_NAMESPACE
class QMenu;
class QAction;
class QString;
class QMenuBar;
QT_END_NAMESPACE
namespace Core
{
/*
@interface IMenuManager
@brief The IMenuManager is an interface for providing a registration of menus and menu item.
@details The IMenuManager provides centralized access to menus and menu items.
All menus and menu items should be registered in the IMenuManager.
*/
class CORE_EXPORT IMenuManager : public QObject
{
Q_OBJECT
public:
IMenuManager(QObject *parent = 0): QObject(parent) {}
virtual ~IMenuManager() {}
virtual void registerMenu(QMenu *menu, const QString &id) = 0;
virtual void registerAction(QAction *action, const QString &id) = 0;
virtual QMenu *menu(const QString &id) const = 0;
virtual QAction *action(const QString &id) const = 0;
virtual void unregisterMenu(const QString &id) = 0;
virtual void unregisterAction(const QString &id) = 0;
virtual QMenuBar *menuBar() const = 0;
};
} // namespace Core
#endif // IMENU_MANAGER_H

View file

@ -65,8 +65,7 @@ MainWindow::MainWindow(ExtensionSystem::IPluginManager *pluginManager, QWidget *
setMenuBar(m_menuBar); setMenuBar(m_menuBar);
#endif #endif
m_menuManager = new MenuManager(this); m_menuManager = new MenuManager(m_menuBar, this);
m_menuManager->setMenuBar(m_menuBar);
m_tabWidget = new QTabWidget(this); m_tabWidget = new QTabWidget(this);
m_tabWidget->setTabPosition(QTabWidget::South); m_tabWidget->setTabPosition(QTabWidget::South);
@ -114,7 +113,7 @@ void MainWindow::extensionsInitialized()
show(); show();
} }
IMenuManager *MainWindow::menuManager() const MenuManager *MainWindow::menuManager() const
{ {
return m_menuManager; return m_menuManager;
} }
@ -205,7 +204,7 @@ bool MainWindow::showOptionsDialog(const QString &group,
{ {
if (!parent) if (!parent)
parent = this; parent = this;
CSettingsDialog settingsDialog(m_pluginManager, group, page, parent); SettingsDialog settingsDialog(m_pluginManager, group, page, parent);
settingsDialog.show(); settingsDialog.show();
bool ok = settingsDialog.execDialog(); bool ok = settingsDialog.execDialog();
if (ok) if (ok)

View file

@ -34,7 +34,6 @@ namespace Core
class CSettingsDialog; class CSettingsDialog;
class CorePlugin; class CorePlugin;
class IContext; class IContext;
class IMenuManager;
class MenuManager; class MenuManager;
class ContextManager; class ContextManager;
class CoreImpl; class CoreImpl;
@ -50,7 +49,7 @@ public:
bool initialize(QString *errorString); bool initialize(QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
IMenuManager *menuManager() const; MenuManager *menuManager() const;
ContextManager *contextManager() const; ContextManager *contextManager() const;
QSettings *settings() const; QSettings *settings() const;

View file

@ -21,74 +21,76 @@
// NeL includes // NeL includes
#include <nel/misc/debug.h> #include <nel/misc/debug.h>
// Qt includes
#include <QtGui/QMenu>
#include <QtGui/QAction>
#include <QtGui/QMenuBar>
namespace Core namespace Core
{ {
MenuManager::MenuManager(QObject *parent) struct MenuManagerPrivate
: IMenuManager(parent),
_menuBar(0)
{ {
MenuManagerPrivate(): m_menuBar(0) {}
QMenuBar *m_menuBar;
typedef QHash<QString, QMenu *> IdMenuMap;
IdMenuMap m_menuMap;
typedef QHash<QString, QAction *> IdActionMap;
IdActionMap m_actionMap;
};
MenuManager::MenuManager(QMenuBar *menuBar, QObject *parent)
: QObject(parent),
d(new MenuManagerPrivate())
{
d->m_menuBar = menuBar;
} }
MenuManager::~MenuManager() MenuManager::~MenuManager()
{ {
_menuMap.clear(); d->m_menuMap.clear();
delete d;
} }
void MenuManager::registerMenu(QMenu *menu, const QString &id) void MenuManager::registerMenu(QMenu *menu, const QString &id)
{ {
menu->setObjectName(id); menu->setObjectName(id);
_menuMap.insert(id, menu); d->m_menuMap.insert(id, menu);
} }
void MenuManager::registerAction(QAction *action, const QString &id) void MenuManager::registerAction(QAction *action, const QString &id)
{ {
action->setObjectName(id); action->setObjectName(id);
_actionMap.insert(id, action); d->m_actionMap.insert(id, action);
} }
QMenu *MenuManager::menu(const QString &id) const QMenu *MenuManager::menu(const QString &id) const
{ {
QMenu *result = 0; QMenu *result = 0;
if (!_menuMap.contains(id)) if (!d->m_menuMap.contains(id))
nlwarning("QMenu %s not found", id.toStdString().c_str()); nlwarning("QMenu %s not found", id.toStdString().c_str());
else else
result = _menuMap.value(id); result = d->m_menuMap.value(id);
return result; return result;
} }
QAction *MenuManager::action(const QString &id) const QAction *MenuManager::action(const QString &id) const
{ {
QAction *result = 0; QAction *result = 0;
if (!_actionMap.contains(id)) if (!d->m_actionMap.contains(id))
nlwarning("QAction %s not found", id.toStdString().c_str()); nlwarning("QAction %s not found", id.toStdString().c_str());
else else
result = _actionMap.value(id); result = d->m_actionMap.value(id);
return result; return result;
} }
void MenuManager::unregisterMenu(const QString &id) void MenuManager::unregisterMenu(const QString &id)
{ {
_menuMap.remove(id); d->m_menuMap.remove(id);
} }
void MenuManager::unregisterAction(const QString &id) void MenuManager::unregisterAction(const QString &id)
{ {
_actionMap.remove(id); d->m_actionMap.remove(id);
} }
QMenuBar *MenuManager::menuBar() const QMenuBar *MenuManager::menuBar() const
{ {
return _menuBar; return d->m_menuBar;
}
void MenuManager::setMenuBar(QMenuBar *menuBar)
{
_menuBar = menuBar;
} }
} /* namespace Core */ } /* namespace Core */

View file

@ -19,39 +19,47 @@
#define MENU_MANAGER_H #define MENU_MANAGER_H
// Project includes // Project includes
#include "imenu_manager.h" #include "core_global.h"
// Qt includes // Qt includes
#include <QtCore/QHash> #include <QtCore/QHash>
#include <QtCore/QObject>
#include <QtCore/QList>
#include <QtGui/QMenu>
#include <QtGui/QAction>
#include <QtGui/QMenuBar>
namespace Core namespace Core
{ {
struct MenuManagerPrivate;
class MenuManager : public IMenuManager /*
@interface MenuManager
@brief The MenuManager provide the interface for registration of menus and menu item.
@details The MenuManager provides centralized access to menus and menu items.
All menus and menu items should be registered in the MenuManager.
*/
class CORE_EXPORT MenuManager: public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
MenuManager(QObject *parent = 0); explicit MenuManager(QMenuBar *menuBar, QObject *parent = 0);
virtual ~MenuManager(); virtual ~MenuManager();
virtual void registerMenu(QMenu *menu, const QString &id); void registerMenu(QMenu *menu, const QString &id);
virtual void registerAction(QAction *action, const QString &id); void registerAction(QAction *action, const QString &id);
virtual QMenu *menu(const QString &id) const; QMenu *menu(const QString &id) const;
virtual QAction *action(const QString &id) const; QAction *action(const QString &id) const;
virtual void unregisterMenu(const QString &id); void unregisterMenu(const QString &id);
virtual void unregisterAction(const QString &id); void unregisterAction(const QString &id);
virtual QMenuBar *menuBar() const; QMenuBar *menuBar() const;
void setMenuBar(QMenuBar *menuBar);
private: private:
QMenuBar *_menuBar;
typedef QHash<QString, QMenu *> IdMenuMap; MenuManagerPrivate *d;
IdMenuMap _menuMap;
typedef QHash<QString, QAction *> IdActionMap;
IdActionMap _actionMap;
}; };
} // namespace Core } // namespace Core

View file

@ -0,0 +1,7 @@
<plugin-spec>
<library-name>ovqt_plugin_core</library-name>
<name>Core</name>
<version>0.8</version>
<vendor>Ryzom Core</vendor>
<description>Core plugin.</description>
</plugin-spec>

View file

@ -112,7 +112,7 @@
</layout> </layout>
</widget> </widget>
<resources> <resources>
<include location="../object_viewer_qt.qrc"/> <include location="../../object_viewer_qt.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>

View file

@ -33,18 +33,18 @@ namespace Core
QString lastDir = "."; QString lastDir = ".";
CSearchPathsSettingsPage::CSearchPathsSettingsPage(bool recurse, QObject *parent) SearchPathsSettingsPage::SearchPathsSettingsPage(bool recurse, QObject *parent)
: IOptionsPage(parent), : IOptionsPage(parent),
m_recurse(recurse), m_recurse(recurse),
m_page(0) m_page(0)
{ {
} }
CSearchPathsSettingsPage::~CSearchPathsSettingsPage() SearchPathsSettingsPage::~SearchPathsSettingsPage()
{ {
} }
QString CSearchPathsSettingsPage::id() const QString SearchPathsSettingsPage::id() const
{ {
if (m_recurse) if (m_recurse)
return QLatin1String("search_recurse_paths"); return QLatin1String("search_recurse_paths");
@ -52,7 +52,7 @@ QString CSearchPathsSettingsPage::id() const
return QLatin1String("search_paths"); return QLatin1String("search_paths");
} }
QString CSearchPathsSettingsPage::trName() const QString SearchPathsSettingsPage::trName() const
{ {
if (m_recurse) if (m_recurse)
return tr("Search Recurse Paths"); return tr("Search Recurse Paths");
@ -60,22 +60,22 @@ QString CSearchPathsSettingsPage::trName() const
return tr("Search Paths"); return tr("Search Paths");
} }
QString CSearchPathsSettingsPage::category() const QString SearchPathsSettingsPage::category() const
{ {
return QLatin1String(Constants::SETTINGS_CATEGORY_GENERAL); return QLatin1String(Constants::SETTINGS_CATEGORY_GENERAL);
} }
QString CSearchPathsSettingsPage::trCategory() const QString SearchPathsSettingsPage::trCategory() const
{ {
return tr(Constants::SETTINGS_TR_CATEGORY_GENERAL); return tr(Constants::SETTINGS_TR_CATEGORY_GENERAL);
} }
QIcon CSearchPathsSettingsPage::categoryIcon() const QIcon SearchPathsSettingsPage::categoryIcon() const
{ {
return QIcon(); return QIcon();
} }
QWidget *CSearchPathsSettingsPage::createPage(QWidget *parent) QWidget *SearchPathsSettingsPage::createPage(QWidget *parent)
{ {
m_page = new QWidget(parent); m_page = new QWidget(parent);
m_ui.setupUi(m_page); m_ui.setupUi(m_page);
@ -90,19 +90,19 @@ QWidget *CSearchPathsSettingsPage::createPage(QWidget *parent)
return m_page; return m_page;
} }
void CSearchPathsSettingsPage::apply() void SearchPathsSettingsPage::apply()
{ {
writeSettings(); writeSettings();
applySearchPaths(); applySearchPaths();
} }
void CSearchPathsSettingsPage::finish() void SearchPathsSettingsPage::finish()
{ {
delete m_page; delete m_page;
m_page = 0; m_page = 0;
} }
void CSearchPathsSettingsPage::applySearchPaths() void SearchPathsSettingsPage::applySearchPaths()
{ {
QStringList paths, remapExt; QStringList paths, remapExt;
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::instance()->settings();
@ -124,7 +124,7 @@ void CSearchPathsSettingsPage::applySearchPaths()
} }
} }
void CSearchPathsSettingsPage::addPath() void SearchPathsSettingsPage::addPath()
{ {
QString newPath = QFileDialog::getExistingDirectory(m_page, "", lastDir); QString newPath = QFileDialog::getExistingDirectory(m_page, "", lastDir);
if (!newPath.isEmpty()) if (!newPath.isEmpty())
@ -139,7 +139,7 @@ void CSearchPathsSettingsPage::addPath()
checkEnabledButton(); checkEnabledButton();
} }
void CSearchPathsSettingsPage::delPath() void SearchPathsSettingsPage::delPath()
{ {
QListWidgetItem *removeItem = m_ui.pathsListWidget->takeItem(m_ui.pathsListWidget->currentRow()); QListWidgetItem *removeItem = m_ui.pathsListWidget->takeItem(m_ui.pathsListWidget->currentRow());
if (!removeItem) if (!removeItem)
@ -148,7 +148,7 @@ void CSearchPathsSettingsPage::delPath()
checkEnabledButton(); checkEnabledButton();
} }
void CSearchPathsSettingsPage::upPath() void SearchPathsSettingsPage::upPath()
{ {
int currentRow = m_ui.pathsListWidget->currentRow(); int currentRow = m_ui.pathsListWidget->currentRow();
if (!(currentRow == 0)) if (!(currentRow == 0))
@ -159,7 +159,7 @@ void CSearchPathsSettingsPage::upPath()
} }
} }
void CSearchPathsSettingsPage::downPath() void SearchPathsSettingsPage::downPath()
{ {
int currentRow = m_ui.pathsListWidget->currentRow(); int currentRow = m_ui.pathsListWidget->currentRow();
if (!(currentRow == m_ui.pathsListWidget->count()-1)) if (!(currentRow == m_ui.pathsListWidget->count()-1))
@ -170,7 +170,7 @@ void CSearchPathsSettingsPage::downPath()
} }
} }
void CSearchPathsSettingsPage::readSettings() void SearchPathsSettingsPage::readSettings()
{ {
QStringList paths; QStringList paths;
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::instance()->settings();
@ -189,7 +189,7 @@ void CSearchPathsSettingsPage::readSettings()
} }
} }
void CSearchPathsSettingsPage::writeSettings() void SearchPathsSettingsPage::writeSettings()
{ {
QStringList paths; QStringList paths;
for (int i = 0; i < m_ui.pathsListWidget->count(); ++i) for (int i = 0; i < m_ui.pathsListWidget->count(); ++i)
@ -205,7 +205,7 @@ void CSearchPathsSettingsPage::writeSettings()
settings->sync(); settings->sync();
} }
void CSearchPathsSettingsPage::checkEnabledButton() void SearchPathsSettingsPage::checkEnabledButton()
{ {
bool bEnabled = true; bool bEnabled = true;
if (m_ui.pathsListWidget->count() == 0) if (m_ui.pathsListWidget->count() == 0)

View file

@ -30,15 +30,15 @@ class QWidget;
namespace Core namespace Core
{ {
/** /**
@class CSearchPathsSettingsPage @class SearchPathsSettingsPage
*/ */
class CSearchPathsSettingsPage : public Core::IOptionsPage class SearchPathsSettingsPage : public Core::IOptionsPage
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit CSearchPathsSettingsPage(bool recurse, QObject *parent = 0); explicit SearchPathsSettingsPage(bool recurse, QObject *parent = 0);
~CSearchPathsSettingsPage(); ~SearchPathsSettingsPage();
QString id() const; QString id() const;
QString trName() const; QString trName() const;
@ -66,7 +66,7 @@ private:
bool m_recurse; bool m_recurse;
QWidget *m_page; QWidget *m_page;
Ui::CSearchPathsSettingsPage m_ui; Ui::SearchPathsSettingsPage m_ui;
}; };
} // namespace Core } // namespace Core

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CSearchPathsSettingsPage</class> <class>SearchPathsSettingsPage</class>
<widget class="QWidget" name="CSearchPathsSettingsPage"> <widget class="QWidget" name="SearchPathsSettingsPage">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>

View file

@ -35,33 +35,33 @@ Q_DECLARE_METATYPE(PageData);
namespace Core namespace Core
{ {
CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager, SettingsDialog::SettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
const QString &categoryId, const QString &categoryId,
const QString &pageId, const QString &pageId,
QWidget *parent) QWidget *parent)
: QDialog(parent), : QDialog(parent),
_applied(false) m_applied(false)
{ {
_ui.setupUi(this); m_ui.setupUi(this);
_plugMan = pluginManager; m_plugMan = pluginManager;
QString initialCategory = categoryId; QString initialCategory = categoryId;
QString initialPage = pageId; QString initialPage = pageId;
_ui.buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); m_ui.buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
connect(_ui.buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply())); connect(m_ui.buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply()));
_ui.splitter->setCollapsible(1, false); m_ui.splitter->setCollapsible(1, false);
_ui.pageTree->header()->setVisible(false); m_ui.pageTree->header()->setVisible(false);
connect(_ui.pageTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), connect(m_ui.pageTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
this, SLOT(pageSelected())); this, SLOT(pageSelected()));
QMap<QString, QTreeWidgetItem *> categories; QMap<QString, QTreeWidgetItem *> categories;
QList<IOptionsPage *> pages = _plugMan->getObjects<IOptionsPage>(); QList<IOptionsPage *> pages = m_plugMan->getObjects<IOptionsPage>();
int index = 0; int index = 0;
Q_FOREACH(IOptionsPage *page, pages) Q_FOREACH(IOptionsPage *page, pages)
@ -82,7 +82,7 @@ CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
QTreeWidgetItem *treeitem; QTreeWidgetItem *treeitem;
if (!categories.contains(currentCategory)) if (!categories.contains(currentCategory))
{ {
treeitem = new QTreeWidgetItem(_ui.pageTree); treeitem = new QTreeWidgetItem(m_ui.pageTree);
treeitem->setText(0, trCategories.at(0)); treeitem->setText(0, trCategories.at(0));
treeitem->setData(0, Qt::UserRole, qVariantFromValue(pageData)); treeitem->setData(0, Qt::UserRole, qVariantFromValue(pageData));
categories.insert(currentCategory, treeitem); categories.insert(currentCategory, treeitem);
@ -108,13 +108,13 @@ CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
categories.value(currentCategory)->addChild(item); categories.value(currentCategory)->addChild(item);
_pages.append(page); m_pages.append(page);
_ui.stackedPages->addWidget(page->createPage(_ui.stackedPages)); m_ui.stackedPages->addWidget(page->createPage(m_ui.stackedPages));
if (page->id() == initialPage && currentCategory == initialCategory) if (page->id() == initialPage && currentCategory == initialCategory)
{ {
_ui.stackedPages->setCurrentIndex(_ui.stackedPages->count()); m_ui.stackedPages->setCurrentIndex(m_ui.stackedPages->count());
_ui.pageTree->setCurrentItem(item); m_ui.pageTree->setCurrentItem(item);
} }
index++; index++;
@ -122,30 +122,30 @@ CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
QList<int> sizes; QList<int> sizes;
sizes << 150 << 300; sizes << 150 << 300;
_ui.splitter->setSizes(sizes); m_ui.splitter->setSizes(sizes);
_ui.splitter->setStretchFactor(_ui.splitter->indexOf(_ui.pageTree), 0); m_ui.splitter->setStretchFactor(m_ui.splitter->indexOf(m_ui.pageTree), 0);
_ui.splitter->setStretchFactor(_ui.splitter->indexOf(_ui.layoutWidget), 1); m_ui.splitter->setStretchFactor(m_ui.splitter->indexOf(m_ui.layoutWidget), 1);
} }
CSettingsDialog::~CSettingsDialog() SettingsDialog::~SettingsDialog()
{ {
} }
void CSettingsDialog::pageSelected() void SettingsDialog::pageSelected()
{ {
QTreeWidgetItem *item = _ui.pageTree->currentItem(); QTreeWidgetItem *item = m_ui.pageTree->currentItem();
PageData data = item->data(0, Qt::UserRole).value<PageData>(); PageData data = item->data(0, Qt::UserRole).value<PageData>();
int index = data.index; int index = data.index;
_currentCategory = data.category; m_currentCategory = data.category;
_currentPage = data.id; m_currentPage = data.id;
_ui.stackedPages->setCurrentIndex(index); m_ui.stackedPages->setCurrentIndex(index);
} }
void CSettingsDialog::accept() void SettingsDialog::accept()
{ {
_applied = true; m_applied = true;
Q_FOREACH(IOptionsPage *page, _pages) Q_FOREACH(IOptionsPage *page, m_pages)
{ {
page->apply(); page->apply();
page->finish(); page->finish();
@ -153,28 +153,28 @@ void CSettingsDialog::accept()
done(QDialog::Accepted); done(QDialog::Accepted);
} }
void CSettingsDialog::reject() void SettingsDialog::reject()
{ {
Q_FOREACH(IOptionsPage *page, _pages) Q_FOREACH(IOptionsPage *page, m_pages)
page->finish(); page->finish();
done(QDialog::Rejected); done(QDialog::Rejected);
} }
void CSettingsDialog::apply() void SettingsDialog::apply()
{ {
Q_FOREACH(IOptionsPage *page, _pages) Q_FOREACH(IOptionsPage *page, m_pages)
page->apply(); page->apply();
_applied = true; m_applied = true;
} }
bool CSettingsDialog::execDialog() bool SettingsDialog::execDialog()
{ {
_applied = false; m_applied = false;
exec(); exec();
return _applied; return m_applied;
} }
void CSettingsDialog::done(int val) void SettingsDialog::done(int val)
{ {
QDialog::done(val); QDialog::done(val);
} }

View file

@ -35,17 +35,17 @@ class IOptionsPage;
@class CSettingsDialog @class CSettingsDialog
@brief Settings dialog @brief Settings dialog
*/ */
class CSettingsDialog: public QDialog class SettingsDialog: public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager, SettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
const QString &initialCategory = QString(), const QString &initialCategory = QString(),
const QString &initialPage = QString(), const QString &initialPage = QString(),
QWidget *parent = 0); QWidget *parent = 0);
~CSettingsDialog(); ~SettingsDialog();
/// Run the dialog and return true if 'Ok' was choosen or 'Apply' was invoked at least once /// Run the dialog and return true if 'Ok' was choosen or 'Apply' was invoked at least once
bool execDialog(); bool execDialog();
@ -60,14 +60,14 @@ private Q_SLOTS:
void apply(); void apply();
private: private:
QList<IOptionsPage *> _pages; QList<IOptionsPage *> m_pages;
bool _applied; bool m_applied;
QString _currentCategory; QString m_currentCategory;
QString _currentPage; QString m_currentPage;
ExtensionSystem::IPluginManager *_plugMan; ExtensionSystem::IPluginManager *m_plugMan;
Ui::CSettingsDialog _ui; Ui::SettingsDialog m_ui;
}; /* class CSettingsDialog */ }; /* class CSettingsDialog */
} /* namespace Core */ } /* namespace Core */

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CSettingsDialog</class> <class>SettingsDialog</class>
<widget class="QDialog" name="CSettingsDialog"> <widget class="QDialog" name="SettingsDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -93,7 +93,7 @@
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>accepted()</signal> <signal>accepted()</signal>
<receiver>CSettingsDialog</receiver> <receiver>SettingsDialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
@ -109,7 +109,7 @@
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>rejected()</signal> <signal>rejected()</signal>
<receiver>CSettingsDialog</receiver> <receiver>SettingsDialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">

View file

@ -28,7 +28,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(ovqt_plugin_disp_sheet_id MODULE ${SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS}) ADD_LIBRARY(ovqt_plugin_disp_sheet_id MODULE ${SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS})
TARGET_LINK_LIBRARIES(ovqt_plugin_disp_sheet_id ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(ovqt_plugin_disp_sheet_id ovqt_plugin_core nelmisc ${QT_LIBRARIES})
IF(WITH_STLPORT) IF(WITH_STLPORT)
TARGET_LINK_LIBRARIES(ovqt_plugin_disp_sheet_id ${CMAKE_THREAD_LIBS_INIT}) TARGET_LINK_LIBRARIES(ovqt_plugin_disp_sheet_id ${CMAKE_THREAD_LIBS_INIT})

View file

@ -18,7 +18,7 @@
#include "disp_sheet_id_plugin.h" #include "disp_sheet_id_plugin.h"
#include "sheet_id_view.h" #include "sheet_id_view.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
// Qt includes // Qt includes
@ -37,13 +37,13 @@ using namespace SheetIdViewPlugin;
bool DispSheetIdPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) bool DispSheetIdPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
{ {
Q_UNUSED(errorString); Q_UNUSED(errorString);
_plugMan = pluginManager; m_plugMan = pluginManager;
return true; return true;
} }
void DispSheetIdPlugin::extensionsInitialized() void DispSheetIdPlugin::extensionsInitialized()
{ {
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager(); Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
QMenu *sheetMenu = menuManager->menu(Core::Constants::M_SHEET); QMenu *sheetMenu = menuManager->menu(Core::Constants::M_SHEET);
QAction *sheetIdViewAction = sheetMenu->addAction(tr("Sheet id view")); QAction *sheetIdViewAction = sheetMenu->addAction(tr("Sheet id view"));
@ -67,34 +67,7 @@ void DispSheetIdPlugin::setNelContext(NLMISC::INelContext *nelContext)
// This only applies to platforms without PIC, e.g. Windows. // This only applies to platforms without PIC, e.g. Windows.
nlassert(!NLMISC::INelContext::isContextInitialised()); nlassert(!NLMISC::INelContext::isContextInitialised());
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
_LibContext = new NLMISC::CLibraryContext(*nelContext); m_LibContext = new NLMISC::CLibraryContext(*nelContext);
}
QString DispSheetIdPlugin::name() const
{
return "Display sheet id";
}
QString DispSheetIdPlugin::version() const
{
return "1.0";
}
QString DispSheetIdPlugin::vendor() const
{
return "pemeon";
}
QString DispSheetIdPlugin::description() const
{
return "Display sheet id";
}
QStringList DispSheetIdPlugin::dependencies() const
{
QStringList list;
list.append(Core::Constants::OVQT_CORE_PLUGIN);
return list;
} }
Q_EXPORT_PLUGIN(DispSheetIdPlugin) Q_EXPORT_PLUGIN(DispSheetIdPlugin)

View file

@ -28,11 +28,6 @@ namespace NLMISC
class CLibraryContext; class CLibraryContext;
} }
namespace NLQT
{
class IPluginSpec;
}
namespace SheetIdViewPlugin namespace SheetIdViewPlugin
{ {
@ -44,23 +39,16 @@ public:
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
private Q_SLOTS: private Q_SLOTS:
void execMessageBox(); void execMessageBox();
protected: protected:
NLMISC::CLibraryContext *_LibContext; NLMISC::CLibraryContext *m_LibContext;
private: private:
ExtensionSystem::IPluginManager *_plugMan; ExtensionSystem::IPluginManager *m_plugMan;
}; };

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_disp_sheet_id</library-name>
<name>DisplaySheetId</name>
<version>1.0</version>
<vendor>pemeon</vendor>
<description>Display sheet id.</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -9,7 +9,7 @@ SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h)
SET(OVQT_PLUG_EXAMPLE_HDR plugin1.h SET(OVQT_PLUG_EXAMPLE_HDR example_plugin.h
qnel_widget.h qnel_widget.h
simple_viewer.h simple_viewer.h
example_settings_page.h) example_settings_page.h)

View file

@ -0,0 +1,83 @@
// Project includes
#include "example_plugin.h"
#include "example_settings_page.h"
#include "simple_viewer.h"
#include "../core/icore.h"
#include "../core/core_constants.h"
#include "../core/menu_manager.h"
#include "../../extension_system/iplugin_spec.h"
// NeL includes
#include "nel/misc/debug.h"
// Qt includes
#include <QtCore/QObject>
#include <QtGui/QMessageBox>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QAction>
#include <QtGui/QMenuBar>
namespace Plugin
{
ExamplePlugin::ExamplePlugin()
{
}
ExamplePlugin::~ExamplePlugin()
{
Q_FOREACH(QObject *obj, m_autoReleaseObjects)
{
m_plugMan->removeObject(obj);
}
qDeleteAll(m_autoReleaseObjects);
m_autoReleaseObjects.clear();
}
bool ExamplePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
{
Q_UNUSED(errorString);
m_plugMan = pluginManager;
addAutoReleasedObject(new ExampleSettingsPage(this));
addAutoReleasedObject(new ExampleContext(this));
addAutoReleasedObject(new ExampleCoreListener(this));
return true;
}
void ExamplePlugin::extensionsInitialized()
{
Core::ICore *core = Core::ICore::instance();
Core::MenuManager *menuManager = core->menuManager();
QAction *exampleAction1 = new QAction("Example1", this);
QAction *exampleAction2 = new QAction("Example2", this);
QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT);
QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP);
helpMenu->insertAction(aboutQtAction, exampleAction1);
helpMenu->addSeparator();
helpMenu->addAction(exampleAction2);
menuManager->menuBar()->addMenu("ExampleMenu");
}
void ExamplePlugin::setNelContext(NLMISC::INelContext *nelContext)
{
#ifdef NL_OS_WINDOWS
// Ensure that a context doesn't exist yet.
// This only applies to platforms without PIC, e.g. Windows.
nlassert(!NLMISC::INelContext::isContextInitialised());
#endif // NL_OS_WINDOWS
m_LibContext = new NLMISC::CLibraryContext(*nelContext);
}
void ExamplePlugin::addAutoReleasedObject(QObject *obj)
{
m_plugMan->addObject(obj);
m_autoReleaseObjects.prepend(obj);
}
}
Q_EXPORT_PLUGIN(Plugin::ExamplePlugin)

View file

@ -18,56 +18,41 @@ namespace NLMISC
class CLibraryContext; class CLibraryContext;
} }
namespace ExtensionSystem
{
class IPluginSpec;
}
namespace Plugin namespace Plugin
{ {
class MyPlugin : public QObject, public ExtensionSystem::IPlugin class ExamplePlugin : public QObject, public ExtensionSystem::IPlugin
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(ExtensionSystem::IPlugin) Q_INTERFACES(ExtensionSystem::IPlugin)
public: public:
ExamplePlugin();
virtual ~MyPlugin(); virtual ~ExamplePlugin();
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void addAutoReleasedObject(QObject *obj); void addAutoReleasedObject(QObject *obj);
QObject *objectByName(const QString &name) const;
ExtensionSystem::IPluginSpec *pluginByName(const QString &name) const;
protected: protected:
NLMISC::CLibraryContext *_LibContext; NLMISC::CLibraryContext *m_LibContext;
private: private:
ExtensionSystem::IPluginManager *_plugMan; ExtensionSystem::IPluginManager *m_plugMan;
QList<QObject *> _autoReleaseObjects; QList<QObject *> m_autoReleaseObjects;
}; };
class CExampleContext: public Core::IContext class ExampleContext: public Core::IContext
{ {
Q_OBJECT Q_OBJECT
public: public:
CExampleContext(QObject *parent = 0): IContext(parent) ExampleContext(QObject *parent = 0): IContext(parent)
{ {
m_simpleViewer = new CSimpleViewer(); m_simpleViewer = new SimpleViewer();
} }
virtual ~CExampleContext() {} virtual ~ExampleContext() {}
virtual QString id() const virtual QString id() const
{ {
@ -95,7 +80,7 @@ public:
{ {
} }
CSimpleViewer *m_simpleViewer; SimpleViewer *m_simpleViewer;
}; };
} // namespace Plugin } // namespace Plugin

View file

@ -27,45 +27,45 @@
namespace Plugin namespace Plugin
{ {
CExampleSettingsPage::CExampleSettingsPage(QObject *parent) ExampleSettingsPage::ExampleSettingsPage(QObject *parent)
: IOptionsPage(parent), : IOptionsPage(parent),
_currentPage(NULL) m_currentPage(0)
{ {
} }
QString CExampleSettingsPage::id() const QString ExampleSettingsPage::id() const
{ {
return QLatin1String("ExamplePage"); return QLatin1String("ExamplePage");
} }
QString CExampleSettingsPage::trName() const QString ExampleSettingsPage::trName() const
{ {
return tr("Example page"); return tr("Example page");
} }
QString CExampleSettingsPage::category() const QString ExampleSettingsPage::category() const
{ {
return QLatin1String("General"); return QLatin1String("Example");
} }
QString CExampleSettingsPage::trCategory() const QString ExampleSettingsPage::trCategory() const
{ {
return tr("General"); return tr("Example");
} }
QIcon CExampleSettingsPage::categoryIcon() const QIcon ExampleSettingsPage::categoryIcon() const
{ {
return QIcon(); return QIcon();
} }
QWidget *CExampleSettingsPage::createPage(QWidget *parent) QWidget *ExampleSettingsPage::createPage(QWidget *parent)
{ {
_currentPage = new QWidget(parent); m_currentPage = new QWidget(parent);
_ui.setupUi(_currentPage); m_ui.setupUi(m_currentPage);
return _currentPage; return m_currentPage;
} }
void CExampleSettingsPage::apply() void ExampleSettingsPage::apply()
{ {
} }

View file

@ -29,15 +29,13 @@ class QWidget;
namespace Plugin namespace Plugin
{ {
/**
@class CExampleSettingsPage class ExampleSettingsPage : public Core::IOptionsPage
*/
class CExampleSettingsPage : public Core::IOptionsPage
{ {
Q_OBJECT Q_OBJECT
public: public:
CExampleSettingsPage(QObject *parent = 0); ExampleSettingsPage(QObject *parent = 0);
virtual ~CExampleSettingsPage() {} virtual ~ExampleSettingsPage() {}
virtual QString id() const; virtual QString id() const;
virtual QString trName() const; virtual QString trName() const;
@ -50,8 +48,8 @@ public:
virtual void finish() {} virtual void finish() {}
private: private:
QWidget *_currentPage; QWidget *m_currentPage;
Ui::CExampleSettingsPage _ui; Ui::ExampleSettingsPage m_ui;
}; };
} // namespace Plugin } // namespace Plugin

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CExampleSettingsPage</class> <class>ExampleSettingsPage</class>
<widget class="QWidget" name="CExampleSettingsPage"> <widget class="QWidget" name="ExampleSettingsPage">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_example</library-name>
<name>ExamplePlugin</name>
<version>0.2</version>
<vendor>dnk-88</vendor>
<description>Example ovqt plugin.</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -1,120 +0,0 @@
// Project includes
#include "plugin1.h"
#include "example_settings_page.h"
#include "simple_viewer.h"
#include "../core/icore.h"
#include "../core/core_constants.h"
#include "../core/imenu_manager.h"
#include "../../extension_system/iplugin_spec.h"
// NeL includes
#include "nel/misc/debug.h"
// Qt includes
#include <QtCore/QObject>
#include <QtGui/QMessageBox>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QAction>
#include <QtGui/QMenuBar>
namespace Plugin
{
MyPlugin::~MyPlugin()
{
Q_FOREACH(QObject *obj, _autoReleaseObjects)
{
_plugMan->removeObject(obj);
}
qDeleteAll(_autoReleaseObjects);
_autoReleaseObjects.clear();
}
bool MyPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
{
Q_UNUSED(errorString);
_plugMan = pluginManager;
addAutoReleasedObject(new CExampleSettingsPage(this));
addAutoReleasedObject(new CExampleContext(this));
addAutoReleasedObject(new CCoreListener(this));
return true;
}
void MyPlugin::extensionsInitialized()
{
Core::ICore *core = Core::ICore::instance();
Core::IMenuManager *menuManager = core->menuManager();
//menuManager = _plugMan->getObject<Core::IMenuManager>();
QAction *exampleAction1 = new QAction("Example1", this);
QAction *exampleAction2 = new QAction("Example2", this);
QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT);
QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP);
helpMenu->insertAction(aboutQtAction, exampleAction1);
helpMenu->addSeparator();
helpMenu->addAction(exampleAction2);
menuManager->menuBar()->addMenu("ExampleMenu");
}
void MyPlugin::setNelContext(NLMISC::INelContext *nelContext)
{
#ifdef NL_OS_WINDOWS
// Ensure that a context doesn't exist yet.
// This only applies to platforms without PIC, e.g. Windows.
nlassert(!NLMISC::INelContext::isContextInitialised());
#endif // NL_OS_WINDOWS
_LibContext = new NLMISC::CLibraryContext(*nelContext);
}
QString MyPlugin::name() const
{
return "ExamplePlugin";
}
QString MyPlugin::version() const
{
return "0.2";
}
QString MyPlugin::vendor() const
{
return "dnk-88";
}
QString MyPlugin::description() const
{
return "Example ovqt plugin.";
}
QStringList MyPlugin::dependencies() const
{
QStringList list;
list.append(Core::Constants::OVQT_CORE_PLUGIN);
return list;
}
void MyPlugin::addAutoReleasedObject(QObject *obj)
{
_plugMan->addObject(obj);
_autoReleaseObjects.prepend(obj);
}
QObject* MyPlugin::objectByName(const QString &name) const
{
Q_FOREACH (QObject *qobj, _plugMan->allObjects())
if (qobj->objectName() == name)
return qobj;
return 0;
}
ExtensionSystem::IPluginSpec *MyPlugin::pluginByName(const QString &name) const
{
Q_FOREACH (ExtensionSystem::IPluginSpec *spec, _plugMan->plugins())
if (spec->name() == name)
return spec;
return 0;
}
}
Q_EXPORT_PLUGIN(Plugin::MyPlugin)

View file

@ -29,19 +29,19 @@
namespace Plugin namespace Plugin
{ {
CSimpleViewer::CSimpleViewer(QWidget *parent) SimpleViewer::SimpleViewer(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
QGridLayout *gridLayout = new QGridLayout(this); QGridLayout *gridLayout = new QGridLayout(this);
gridLayout->setObjectName(QString::fromUtf8("gridLayoutSimpleViewer")); gridLayout->setObjectName(QString::fromUtf8("gridLayoutSimpleViewer"));
gridLayout->setContentsMargins(0, 0, 0, 0); gridLayout->setContentsMargins(0, 0, 0, 0);
NLQT::QNLWidget *_nelWidget = new NLQT::QNLWidget(this); NLQT::QNLWidget *m_nelWidget = new NLQT::QNLWidget(this);
gridLayout->addWidget(_nelWidget, 0, 0, 1, 1); gridLayout->addWidget(m_nelWidget, 0, 0, 1, 1);
m_undoStack = new QUndoStack(this); m_undoStack = new QUndoStack(this);
} }
bool CCoreListener::closeMainWindow() const bool ExampleCoreListener::closeMainWindow() const
{ {
int ret = QMessageBox::question(0, tr("Example close event hook"), int ret = QMessageBox::question(0, tr("Example close event hook"),
tr("Do you want to close window?"), tr("Do you want to close window?"),

View file

@ -31,22 +31,22 @@ class QWidget;
namespace Plugin namespace Plugin
{ {
class CSimpleViewer : public QWidget class SimpleViewer : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
CSimpleViewer(QWidget *parent = 0); SimpleViewer(QWidget *parent = 0);
virtual ~CSimpleViewer() {} virtual ~SimpleViewer() {}
QUndoStack *m_undoStack; QUndoStack *m_undoStack;
}; };
class CCoreListener : public Core::ICoreListener class ExampleCoreListener : public Core::ICoreListener
{ {
Q_OBJECT Q_OBJECT
public: public:
CCoreListener(QObject *parent = 0): ICoreListener(parent) {} ExampleCoreListener(QObject *parent = 0): ICoreListener(parent) {}
virtual ~CCoreListener() {} virtual ~ExampleCoreListener() {}
virtual bool closeMainWindow() const; virtual bool closeMainWindow() const;
}; };

View file

@ -21,7 +21,7 @@
#include "georges_treeview_dialog.h" #include "georges_treeview_dialog.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
// NeL includes // NeL includes
@ -63,7 +63,7 @@ namespace Plugin
m_undoStack = new QUndoStack(this); m_undoStack = new QUndoStack(this);
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager(); Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
m_openAction = menuManager->action(Core::Constants::OPEN); m_openAction = menuManager->action(Core::Constants::OPEN);
m_newAction = new QAction(tr("&New..."), this); m_newAction = new QAction(tr("&New..."), this);

View file

@ -67,35 +67,6 @@ void GeorgesEditorPlugin::setNelContext(NLMISC::INelContext *nelContext)
m_libContext = new NLMISC::CLibraryContext(*nelContext); m_libContext = new NLMISC::CLibraryContext(*nelContext);
} }
QString GeorgesEditorPlugin::name() const
{
return tr("Georges Editor");
}
QString GeorgesEditorPlugin::version() const
{
return "0.4";
}
QString GeorgesEditorPlugin::vendor() const
{
return "aquiles";
}
QString GeorgesEditorPlugin::description() const
{
return tr("Tool to create & edit sheets or forms.");
}
QStringList GeorgesEditorPlugin::dependencies() const
{
QStringList list;
// TODO
//list.append(Core::Constants::OVQT_CORE_PLUGIN);
//list.append("ObjectViewer");
return list;
}
void GeorgesEditorPlugin::addAutoReleasedObject(QObject *obj) void GeorgesEditorPlugin::addAutoReleasedObject(QObject *obj)
{ {
m_plugMan->addObject(obj); m_plugMan->addObject(obj);

View file

@ -52,15 +52,8 @@ public:
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void shutdown();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void addAutoReleasedObject(QObject *obj); void addAutoReleasedObject(QObject *obj);
protected: protected:

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_georges_editor</library-name>
<name>GeorgesEditor</name>
<version>0.4</version>
<vendor>aquiles</vendor>
<description>Tool to create and edit sheets or forms.</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_log</library-name>
<name>LogPlugin</name>
<version>1.1</version>
<vendor>aquiles</vendor>
<description>DockWidget to display all log messages from NeL.</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -16,7 +16,7 @@
#include <QTableWidgetItem> #include <QTableWidgetItem>
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
#include <nel/misc/common.h> #include <nel/misc/common.h>

View file

@ -2,7 +2,7 @@
#include "mission_compiler_plugin.h" #include "mission_compiler_plugin.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../../extension_system/iplugin_spec.h" #include "../../extension_system/iplugin_spec.h"
// NeL includes // NeL includes
@ -24,18 +24,18 @@ namespace MissionCompiler
MissionCompilerPlugin::~MissionCompilerPlugin() MissionCompilerPlugin::~MissionCompilerPlugin()
{ {
Q_FOREACH(QObject *obj, _autoReleaseObjects) Q_FOREACH(QObject *obj, m_autoReleaseObjects)
{ {
_plugMan->removeObject(obj); m_plugMan->removeObject(obj);
} }
qDeleteAll(_autoReleaseObjects); qDeleteAll(m_autoReleaseObjects);
_autoReleaseObjects.clear(); m_autoReleaseObjects.clear();
} }
bool MissionCompilerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) bool MissionCompilerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
{ {
Q_UNUSED(errorString); Q_UNUSED(errorString);
_plugMan = pluginManager; m_plugMan = pluginManager;
addAutoReleasedObject(new MissionCompilerSettingsPage(this)); addAutoReleasedObject(new MissionCompilerSettingsPage(this));
addAutoReleasedObject(new CMissionCompilerContext(this)); addAutoReleasedObject(new CMissionCompilerContext(this));
@ -47,18 +47,7 @@ void MissionCompilerPlugin::extensionsInitialized()
{ {
Core::ICore *core = Core::ICore::instance(); Core::ICore *core = Core::ICore::instance();
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::instance()->settings();
Core::IMenuManager *menuManager = core->menuManager(); Core::MenuManager *menuManager = core->menuManager();
//menuManager = _plugMan->getObject<Core::IMenuManager>();
//QAction *exampleAction1 = new QAction("Zone1", this);
//QAction *exampleAction2 = new QAction("Zone2", this);
//QMenu *toolsMenu = menuManager->menu(Core::Constants::M_TOOLS);
//helpMenu->insertAction(aboutQtAction, exampleAction1);
//helpMenu->addSeparator();
//helpMenu->addAction(exampleAction2);
//QMenu *zoneMenu = menuManager->menuBar()->addMenu("ZoneMenu");
//zoneMenu->insertAction(aboutQtAction, exampleAction1);
//zoneMenu->addSeparator();
//zoneMenu->addAction(exampleAction2);
// Initialize Ligo. // Initialize Ligo.
//settings->beginGroup(Core::Constants::DATA_PATH_SECTION); //settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
@ -73,57 +62,13 @@ void MissionCompilerPlugin::setNelContext(NLMISC::INelContext *nelContext)
// This only applies to platforms without PIC, e.g. Windows. // This only applies to platforms without PIC, e.g. Windows.
nlassert(!NLMISC::INelContext::isContextInitialised()); nlassert(!NLMISC::INelContext::isContextInitialised());
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
_LibContext = new NLMISC::CLibraryContext(*nelContext); m_LibContext = new NLMISC::CLibraryContext(*nelContext);
}
QString MissionCompilerPlugin::name() const
{
return "MissionCompilerPlugin";
}
QString MissionCompilerPlugin::version() const
{
return "0.1";
}
QString MissionCompilerPlugin::vendor() const
{
return "Ryzom Core";
}
QString MissionCompilerPlugin::description() const
{
return "Mission Compiler Plugin";
}
QStringList MissionCompilerPlugin::dependencies() const
{
QStringList list;
list.append(Core::Constants::OVQT_CORE_PLUGIN);
//list.append("ObjectViewer");
return list;
} }
void MissionCompilerPlugin::addAutoReleasedObject(QObject *obj) void MissionCompilerPlugin::addAutoReleasedObject(QObject *obj)
{ {
_plugMan->addObject(obj); m_plugMan->addObject(obj);
_autoReleaseObjects.prepend(obj); m_autoReleaseObjects.prepend(obj);
}
QObject* MissionCompilerPlugin::objectByName(const QString &name) const
{
Q_FOREACH (QObject *qobj, _plugMan->allObjects())
if (qobj->objectName() == name)
return qobj;
return 0;
}
ExtensionSystem::IPluginSpec *MissionCompilerPlugin::pluginByName(const QString &name) const
{
Q_FOREACH (ExtensionSystem::IPluginSpec *spec, _plugMan->plugins())
if (spec->name() == name)
return spec;
return 0;
} }
} }

View file

@ -37,26 +37,16 @@ public:
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void addAutoReleasedObject(QObject *obj); void addAutoReleasedObject(QObject *obj);
QObject *objectByName(const QString &name) const;
ExtensionSystem::IPluginSpec *pluginByName(const QString &name) const;
protected: protected:
NLMISC::CLibraryContext *_LibContext; NLMISC::CLibraryContext *m_LibContext;
private: private:
ExtensionSystem::IPluginManager *_plugMan; ExtensionSystem::IPluginManager *m_plugMan;
QList<QObject *> _autoReleaseObjects; QList<QObject *> m_autoReleaseObjects;
}; };
class CMissionCompilerContext: public Core::IContext class CMissionCompilerContext: public Core::IContext

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_mission_compiler</library-name>
<name>MissionCompiler</name>
<version>0.1</version>
<vendor>Ryzom Core</vendor>
<description>Mission Compiler Plugin</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -52,7 +52,7 @@
#include "object_viewer_constants.h" #include "object_viewer_constants.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
using namespace std; using namespace std;
@ -259,7 +259,7 @@ void CMainWindow::createActions()
void CMainWindow::createMenus() void CMainWindow::createMenus()
{ {
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager(); Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
_openAction = menuManager->action(Core::Constants::OPEN); _openAction = menuManager->action(Core::Constants::OPEN);

View file

@ -56,33 +56,6 @@ void ObjectViewerPlugin::setNelContext(NLMISC::INelContext *nelContext)
_LibContext = new NLMISC::CLibraryContext(*nelContext); _LibContext = new NLMISC::CLibraryContext(*nelContext);
} }
QString ObjectViewerPlugin::name() const
{
return "ObjectViewer";
}
QString ObjectViewerPlugin::version() const
{
return "0.8";
}
QString ObjectViewerPlugin::vendor() const
{
return "GSoC2010_dnk-88";
}
QString ObjectViewerPlugin::description() const
{
return "Object Viewer plugin.";
}
QStringList ObjectViewerPlugin::dependencies() const
{
QStringList list;
list.append(Core::Constants::OVQT_CORE_PLUGIN);
return list;
}
void ObjectViewerPlugin::addAutoReleasedObject(QObject *obj) void ObjectViewerPlugin::addAutoReleasedObject(QObject *obj)
{ {
_plugMan->addObject(obj); _plugMan->addObject(obj);

View file

@ -36,15 +36,8 @@ public:
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void shutdown();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void addAutoReleasedObject(QObject *obj); void addAutoReleasedObject(QObject *obj);
protected: protected:

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_object_viewer</library-name>
<name>ObjectViewer</name>
<version>0.8</version>
<vendor>Ryzom Core</vendor>
<description>Object Viewer plugin.</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_sheet_builder</library-name>
<name>SheetBuilder</name>
<version>1.0</version>
<vendor>kharvd</vendor>
<description>make_sheet_id equivalent</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -19,7 +19,7 @@
#include "sheetbuilderdialog.h" #include "sheetbuilderdialog.h"
#include "sheetbuilderconfgdialog.h" #include "sheetbuilderconfgdialog.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
// NeL includes // NeL includes
@ -38,14 +38,14 @@ using namespace Plugin;
bool SheetBuilderPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) bool SheetBuilderPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
{ {
Q_UNUSED(errorString); Q_UNUSED(errorString);
_plugMan = pluginManager; m_plugMan = pluginManager;
return true; return true;
} }
void SheetBuilderPlugin::extensionsInitialized() void SheetBuilderPlugin::extensionsInitialized()
{ {
Core::IMenuManager *menuManager = Core::ICore::instance()->menuManager(); Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
QMenu *sheetMenu = menuManager->menu(Core::Constants::M_SHEET); QMenu *sheetMenu = menuManager->menu(Core::Constants::M_SHEET);
QAction *sheetBuilderAction = sheetMenu->addAction(tr("Sheet builder")); QAction *sheetBuilderAction = sheetMenu->addAction(tr("Sheet builder"));
@ -69,34 +69,7 @@ void SheetBuilderPlugin::setNelContext(NLMISC::INelContext *nelContext)
// This only applies to platforms without PIC, e.g. Windows. // This only applies to platforms without PIC, e.g. Windows.
nlassert(!NLMISC::INelContext::isContextInitialised()); nlassert(!NLMISC::INelContext::isContextInitialised());
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
_LibContext = new NLMISC::CLibraryContext(*nelContext); m_LibContext = new NLMISC::CLibraryContext(*nelContext);
}
QString SheetBuilderPlugin::name() const
{
return "Sheet builder";
}
QString SheetBuilderPlugin::version() const
{
return "1.0";
}
QString SheetBuilderPlugin::vendor() const
{
return "kharvd";
}
QString SheetBuilderPlugin::description() const
{
return "make_sheet_id equivalent";
}
QStringList SheetBuilderPlugin::dependencies() const
{
QStringList list;
list.append(Core::Constants::OVQT_CORE_PLUGIN);
return list;
} }
Q_EXPORT_PLUGIN(SheetBuilderPlugin) Q_EXPORT_PLUGIN(SheetBuilderPlugin)

View file

@ -28,11 +28,6 @@ namespace NLMISC
class CLibraryContext; class CLibraryContext;
} }
namespace ExtensionSystem
{
class IPluginSpec;
}
namespace Plugin namespace Plugin
{ {
@ -43,25 +38,18 @@ class SheetBuilderPlugin : public QObject, public ExtensionSystem::IPlugin
public: public:
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void buildSheet(bool clean); void buildSheet(bool clean);
private Q_SLOTS: private Q_SLOTS:
void execBuilderDialog(); void execBuilderDialog();
protected: protected:
NLMISC::CLibraryContext *_LibContext; NLMISC::CLibraryContext *m_LibContext;
private: private:
ExtensionSystem::IPluginManager *_plugMan; ExtensionSystem::IPluginManager *m_plugMan;
}; };

View file

@ -0,0 +1,10 @@
<plugin-spec>
<library-name>ovqt_plugin_zone_painter</library-name>
<name>ZonePainter</name>
<version>0.0</version>
<vendor>Ryzom Core</vendor>
<description>Zone Painter Plugin</description>
<dependencies>
<dependency plugin-name="Core" version="0.8"/>
</dependencies>
</plugin-spec>

View file

@ -11,7 +11,7 @@
#include "painter_dock_widget.h" #include "painter_dock_widget.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
ZonePainterMainWindow::ZonePainterMainWindow(QWidget *parent) : ZonePainterMainWindow::ZonePainterMainWindow(QWidget *parent) :
@ -145,6 +145,7 @@ void ZonePainterMainWindow::loadConfig() {
QColor color; QColor color;
color = settings->value("BackgroundColor", QColor(80, 80, 80)).value<QColor>(); color = settings->value("BackgroundColor", QColor(80, 80, 80)).value<QColor>();
settings->endGroup();
m_nelWidget->setBackgroundColor(NLMISC::CRGBA(color.red(), color.green(), color.blue(), color.alpha())); m_nelWidget->setBackgroundColor(NLMISC::CRGBA(color.red(), color.green(), color.blue(), color.alpha()));
} }

View file

@ -3,7 +3,7 @@
#include "zone_painter_settings_page.h" #include "zone_painter_settings_page.h"
#include "../core/icore.h" #include "../core/icore.h"
#include "../core/core_constants.h" #include "../core/core_constants.h"
#include "../core/imenu_manager.h" #include "../core/menu_manager.h"
#include "../../extension_system/iplugin_spec.h" #include "../../extension_system/iplugin_spec.h"
// NeL includes // NeL includes
@ -19,22 +19,22 @@
namespace Plugin namespace Plugin
{ {
NLMISC_SAFE_SINGLETON_IMPL(CZoneManager) // NLMISC_SAFE_SINGLETON_IMPL(CZoneManager)
ZonePainterPlugin::~ZonePainterPlugin() ZonePainterPlugin::~ZonePainterPlugin()
{ {
Q_FOREACH(QObject *obj, _autoReleaseObjects) Q_FOREACH(QObject *obj, m_autoReleaseObjects)
{ {
_plugMan->removeObject(obj); m_plugMan->removeObject(obj);
} }
qDeleteAll(_autoReleaseObjects); qDeleteAll(m_autoReleaseObjects);
_autoReleaseObjects.clear(); m_autoReleaseObjects.clear();
} }
bool ZonePainterPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) bool ZonePainterPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
{ {
Q_UNUSED(errorString); Q_UNUSED(errorString);
_plugMan = pluginManager; m_plugMan = pluginManager;
addAutoReleasedObject(new CZonePainterSettingsPage(this)); addAutoReleasedObject(new CZonePainterSettingsPage(this));
addAutoReleasedObject(new CZonePainterContext(this)); addAutoReleasedObject(new CZonePainterContext(this));
@ -45,19 +45,7 @@ bool ZonePainterPlugin::initialize(ExtensionSystem::IPluginManager *pluginManage
void ZonePainterPlugin::extensionsInitialized() void ZonePainterPlugin::extensionsInitialized()
{ {
Core::ICore *core = Core::ICore::instance(); Core::ICore *core = Core::ICore::instance();
Core::IMenuManager *menuManager = core->menuManager(); Core::MenuManager *menuManager = core->menuManager();
//menuManager = _plugMan->getObject<Core::IMenuManager>();
QAction *exampleAction1 = new QAction("Zone1", this);
QAction *exampleAction2 = new QAction("Zone2", this);
QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT);
QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP);
helpMenu->insertAction(aboutQtAction, exampleAction1);
helpMenu->addSeparator();
helpMenu->addAction(exampleAction2);
QMenu *zoneMenu = menuManager->menuBar()->addMenu("ZoneMenu");
zoneMenu->insertAction(aboutQtAction, exampleAction1);
zoneMenu->addSeparator();
zoneMenu->addAction(exampleAction2);
} }
void ZonePainterPlugin::setNelContext(NLMISC::INelContext *nelContext) void ZonePainterPlugin::setNelContext(NLMISC::INelContext *nelContext)
@ -67,57 +55,13 @@ void ZonePainterPlugin::setNelContext(NLMISC::INelContext *nelContext)
// This only applies to platforms without PIC, e.g. Windows. // This only applies to platforms without PIC, e.g. Windows.
nlassert(!NLMISC::INelContext::isContextInitialised()); nlassert(!NLMISC::INelContext::isContextInitialised());
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
_LibContext = new NLMISC::CLibraryContext(*nelContext); m_LibContext = new NLMISC::CLibraryContext(*nelContext);
}
QString ZonePainterPlugin::name() const
{
return "ZonePainterPlugin";
}
QString ZonePainterPlugin::version() const
{
return "0.2";
}
QString ZonePainterPlugin::vendor() const
{
return "Ryzom Core";
}
QString ZonePainterPlugin::description() const
{
return "Zone Painter Plugin";
}
QStringList ZonePainterPlugin::dependencies() const
{
QStringList list;
list.append(Core::Constants::OVQT_CORE_PLUGIN);
//list.append("ObjectViewer");
return list;
} }
void ZonePainterPlugin::addAutoReleasedObject(QObject *obj) void ZonePainterPlugin::addAutoReleasedObject(QObject *obj)
{ {
_plugMan->addObject(obj); m_plugMan->addObject(obj);
_autoReleaseObjects.prepend(obj); m_autoReleaseObjects.prepend(obj);
}
QObject* ZonePainterPlugin::objectByName(const QString &name) const
{
Q_FOREACH (QObject *qobj, _plugMan->allObjects())
if (qobj->objectName() == name)
return qobj;
return 0;
}
ExtensionSystem::IPluginSpec *ZonePainterPlugin::pluginByName(const QString &name) const
{
Q_FOREACH (ExtensionSystem::IPluginSpec *spec, _plugMan->plugins())
if (spec->name() == name)
return spec;
return 0;
} }
} }

View file

@ -31,7 +31,7 @@ class IPluginSpec;
namespace Plugin namespace Plugin
{ {
class CZoneManager /* class CZoneManager
{ {
NLMISC_SAFE_SINGLETON_DECL(CZoneManager) NLMISC_SAFE_SINGLETON_DECL(CZoneManager)
public: public:
@ -41,7 +41,7 @@ namespace Plugin
NL3D::CLandscapeModel *m_painterLandscape; NL3D::CLandscapeModel *m_painterLandscape;
NL3D::CZone *m_currentZone; NL3D::CZone *m_currentZone;
}; };
*/
class ZonePainterPlugin : public QObject, public ExtensionSystem::IPlugin class ZonePainterPlugin : public QObject, public ExtensionSystem::IPlugin
{ {
Q_OBJECT Q_OBJECT
@ -52,28 +52,16 @@ public:
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized(); void extensionsInitialized();
void setNelContext(NLMISC::INelContext *nelContext); void setNelContext(NLMISC::INelContext *nelContext);
QString name() const;
QString version() const;
QString vendor() const;
QString description() const;
QStringList dependencies() const;
void addAutoReleasedObject(QObject *obj); void addAutoReleasedObject(QObject *obj);
QObject *objectByName(const QString &name) const;
ExtensionSystem::IPluginSpec *pluginByName(const QString &name) const;
protected: protected:
NLMISC::CLibraryContext *_LibContext; NLMISC::CLibraryContext *m_LibContext;
private: private:
ExtensionSystem::IPluginManager *_plugMan; ExtensionSystem::IPluginManager *m_plugMan;
QList<QObject *> _autoReleaseObjects; QList<QObject *> m_autoReleaseObjects;
}; };
class CZonePainterContext: public Core::IContext class CZonePainterContext: public Core::IContext

View file

@ -288,6 +288,14 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime)
string tmp = *ntExclu.Addr(i); string tmp = *ntExclu.Addr(i);
this->setExclusion.insert(tmp); this->setExclusion.insert(tmp);
} }
#else // (MAX_RELEASE < 4000)
ExclList& exclusionList = maxLight->GetExclusionList();
for (sint i = 0; i < exclusionList.Count(); ++i)
{
INode *exclNode = exclusionList[i];
string tmp = exclNode->GetName();
this->setExclusion.insert(tmp);
}
#endif // (MAX_RELEASE < 4000) #endif // (MAX_RELEASE < 4000)
// Get Soft Shadow informations // Get Soft Shadow informations
@ -1999,11 +2007,12 @@ void CExportNel::deleteLM(INode& ZeNode)
sprintf( tmp, "%d", i ); sprintf( tmp, "%d", i );
sSaveName += tmp; sSaveName += tmp;
sSaveName += ".tga"; sSaveName += ".tga";
FILE *file; if (CFile::fileExists(sSaveName))
if( file = fopen(sSaveName.c_str(),"rb") )
{ {
fclose( file ); if (!CFile::deleteFile(sSaveName))
DeleteFile( sSaveName.c_str() ); {
nlwarning("Failed to delete file %s.", sSaveName.c_str());
}
} }
} }
} }
@ -2576,11 +2585,13 @@ bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshB
for (i = 0; i < 256; ++i) for (i = 0; i < 256; ++i)
{ {
string sLMName = sBaseName + NLMISC::toString(i) + ".tga"; string sLMName = sBaseName + NLMISC::toString(i) + ".tga";
CIFile ifi; if (CFile::fileExists(sLMName))
if (ifi.open(sLMName))
{ {
ifi.close (); nlinfo("DELETE %s", sLMName.c_str());
DeleteFile (sLMName.c_str()); if (!CFile::deleteFile(sLMName))
{
nlwarning("Failed to delete file %s", sLMName.c_str());
}
} }
} }
} }
@ -2598,6 +2609,7 @@ bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshB
COFile f( sSaveName ); COFile f( sSaveName );
try try
{ {
nlinfo("SAVE %s", sSaveName.c_str());
if (lmcEnabled) if (lmcEnabled)
{ {
// In fact the output is 32 bits because we need the alpha channel // In fact the output is 32 bits because we need the alpha channel

View file

@ -36,7 +36,7 @@ IShape* CExportNel::buildParticleSystem(INode& node, TimeValue time)
// if not found, get from the APP_DATAS // if not found, get from the APP_DATAS
shapeName = CExportNel::getNelObjectName(node); shapeName = CExportNel::getNelObjectName(node);
if (shapeName.empty()) return NULL; if (shapeName.empty()) return NULL;
shapeName = NLMISC::CPath::lookup("shapeName", false); shapeName = NLMISC::CPath::lookup(shapeName, false);
if (shapeName.empty()) return NULL; if (shapeName.empty()) return NULL;
} }

View file

@ -24,6 +24,7 @@
#include "../nel_patch_lib/rpo.h" #include "../nel_patch_lib/rpo.h"
#include "../../ig_lighter_lib/ig_lighter_lib.h" #include "../../ig_lighter_lib/ig_lighter_lib.h"
#include "nel/misc/path.h"
#include "nel/3d/scene_group.h" #include "nel/3d/scene_group.h"
#include "nel/3d/scene.h" #include "nel/3d/scene.h"
#include "nel/3d/shape_bank.h" #include "nel/3d/shape_bank.h"
@ -418,12 +419,21 @@ CInstanceGroup* CExportNel::buildInstanceGroup(const vector<INode*>& vectNode, v
if (clid.PartA() == NEL_PARTICLE_SYSTEM_CLASS_ID) if (clid.PartA() == NEL_PARTICLE_SYSTEM_CLASS_ID)
{ {
// build the shape from the file name // build the shape from the file name
std::string objName = CExportNel::getNelObjectName(*pNode); // std::string objName = CExportNel::getNelObjectName(*pNode);
if (!objName.empty()) std::string psFilePath;
// try to get the complete path
if (!CExportNel::getValueByNameUsingParamBlock2(*pNode, "ps_file_name", (ParamType2) TYPE_STRING, &psFilePath, 0))
{
// if not found, get from the APP_DATAS
psFilePath = CExportNel::getNelObjectName(*pNode);
if (!psFilePath.empty())
psFilePath = CPath::lookup(psFilePath, false);
}
if (!psFilePath.empty())
{ {
NL3D::CShapeStream ss; NL3D::CShapeStream ss;
NLMISC::CIFile iF; NLMISC::CIFile iF;
if (iF.open(objName.c_str())) if (iF.open(psFilePath.c_str()))
{ {
try try
{ {

View file

@ -24,9 +24,27 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Setup')
parser.add_argument('--noconf', '-nc', action='store_true')
parser.add_argument('--noverify', '-nv', action='store_true')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -35,8 +53,12 @@ try:
from buildsite import * from buildsite import *
except ImportError: except ImportError:
printLog(log, "*** FIRST RUN ***") printLog(log, "*** FIRST RUN ***")
if args.noconf:
printLog(log, "ERROR --noconf is invalid on first run, exit.")
exit()
from tools import * from tools import *
if not args.noconf:
try: try:
BuildQuality BuildQuality
except NameError: except NameError:
@ -44,11 +66,11 @@ except NameError:
try: try:
ToolDirectories ToolDirectories
except NameError: except NameError:
ToolDirectories = [ 'R:/code/nel', 'R:/code/ryzom/tools' ] ToolDirectories = [ 'R:/build/dev/bin/Release', 'D:/libraries/external/bin' ]
try: try:
ToolSuffix ToolSuffix
except NameError: except NameError:
ToolSuffix = "_r.exe" ToolSuffix = ".exe"
try: try:
ScriptDirectory ScriptDirectory
except NameError: except NameError:
@ -112,7 +134,7 @@ except NameError:
try: try:
WindowsExeDllCfgDirectories WindowsExeDllCfgDirectories
except NameError: except NameError:
WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'D:/source/external_local/bin/x86', 'D:/source/external_shared/bin/x86', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/client', 'R:/code/ryzom/tools/client/client_config/bin' ] WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'D:/libraries/external/bin', 'R:/build/dev/bin/Release', 'R:/code/ryzom/client', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/tools/client/client_config/bin' ]
try: try:
MaxAvailable MaxAvailable
except NameError: except NameError:
@ -262,9 +284,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes") os.chdir("processes")
try: try:
if not args.includeprocess == None:
subprocess.call([ "python", "0_setup.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "0_setup.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "0_setup.py" ]) subprocess.call([ "python", "0_setup.py" ])
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
@ -276,8 +305,62 @@ for projectName in ProjectsToProcess:
log.write(projectLogData) log.write(projectLogData)
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
# Additional directories
printLog(log, ">>> Setup additional directories <<<")
mkPath(log, ClientDevDirectory)
mkPath(log, ClientPatchDirectory)
mkPath(log, ClientInstallDirectory)
if not args.noverify:
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Verify tool paths")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
if MaxAvailable:
findMax(log, MaxDirectory, MaxExecutable)
findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix)
findTool(log, ToolDirectories, BuildInterfaceTool, ToolSuffix)
findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix)
findTool(log, ToolDirectories, BuildSmallbankTool, ToolSuffix)
findTool(log, ToolDirectories, BuildFarbankTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneDependenciesTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneWelderTool, ToolSuffix)
findTool(log, ToolDirectories, BuildRbankTool, ToolSuffix)
findTool(log, ToolDirectories, BuildIndoorRbankTool, ToolSuffix)
findTool(log, ToolDirectories, BuildIgBoxesTool, ToolSuffix)
findTool(log, ToolDirectories, GetNeighborsTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneLighterTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneIgLighterTool, ToolSuffix)
findTool(log, ToolDirectories, IgLighterTool, ToolSuffix)
findTool(log, ToolDirectories, AnimBuilderTool, ToolSuffix)
findTool(log, ToolDirectories, TileEditTool, ToolSuffix)
# findTool(log, ToolDirectories, BuildImagesetTool, ToolSuffix) # kaetemi stuff, ignore this
findTool(log, ToolDirectories, MakeSheetIdTool, ToolSuffix)
# findTool(log, ToolDirectories, BuildSheetsTool, ToolSuffix) # kaetemi stuff, ignore this
# findTool(log, ToolDirectories, BuildSoundTool, ToolSuffix) # kaetemi stuff, ignore this
findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix)
findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSuffix)
findTool(log, ToolDirectories, BuildClodtexTool, ToolSuffix)
findTool(log, ToolDirectories, BuildShadowSkinTool, ToolSuffix)
findTool(log, ToolDirectories, PanoplyMakerTool, ToolSuffix)
findTool(log, ToolDirectories, HlsBankMakerTool, ToolSuffix)
findTool(log, ToolDirectories, LandExportTool, ToolSuffix)
findTool(log, ToolDirectories, PrimExportTool, ToolSuffix)
findTool(log, ToolDirectories, IgElevationTool, ToolSuffix)
findTool(log, ToolDirectories, IgAddTool, ToolSuffix)
findTool(log, ToolDirectories, BuildClodBankTool, ToolSuffix)
findTool(log, ToolDirectories, SheetsPackerTool, ToolSuffix)
findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix)
findTool(log, ToolDirectories, AiBuildWmapTool, ToolSuffix)
findTool(log, ToolDirectories, TgaCutTool, ToolSuffix)
findTool(log, ToolDirectories, PatchGenTool, ToolSuffix)
log.close() log.close()
if os.path.isfile("0_setup.log"): if os.path.isfile("0_setup.log"):
os.remove("0_setup.log") os.remove("0_setup.log")

View file

@ -24,9 +24,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Export')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -46,9 +62,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes") os.chdir("processes")
try: try:
if not args.includeprocess == None:
subprocess.call([ "python", "1_export.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "1_export.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "1_export.py" ]) subprocess.call([ "python", "1_export.py" ])
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
@ -60,6 +83,8 @@ for projectName in ProjectsToProcess:
log.write(projectLogData) log.write(projectLogData)
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Build')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -46,9 +62,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes") os.chdir("processes")
try: try:
if not args.includeprocess == None:
subprocess.call([ "python", "2_build.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "2_build.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "2_build.py" ]) subprocess.call([ "python", "2_build.py" ])
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
@ -60,6 +83,8 @@ for projectName in ProjectsToProcess:
log.write(projectLogData) log.write(projectLogData)
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Install')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -46,9 +62,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes") os.chdir("processes")
try: try:
if not args.includeprocess == None:
subprocess.call([ "python", "3_install.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "3_install.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "3_install.py" ]) subprocess.call([ "python", "3_install.py" ])
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
@ -60,6 +83,8 @@ for projectName in ProjectsToProcess:
log.write(projectLogData) log.write(projectLogData)
except Exception, e: except Exception, e:
printLog(log, "<" + projectName + "> " + str(e)) printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Client Patch')
parser.add_argument('--bnponly', '-bo', action='store_true')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -59,16 +63,17 @@ printLog(log, "")
if BnpMake == "": if BnpMake == "":
toolLogFail(log, BnpMakeTool, ToolSuffix) toolLogFail(log, BnpMakeTool, ToolSuffix)
elif PatchGen == "": elif PatchGen == "" and not args.bnponly:
toolLogFail(log, PatchGenTool, ToolSuffix) toolLogFail(log, PatchGenTool, ToolSuffix)
elif Lzma == "": elif Lzma == "" and not args.bnponly:
toolLogFail(log, "LZMA", ToolSuffix) toolLogFail(log, "LZMA", ToolSuffix)
elif XDelta == "": elif XDelta == "" and not args.bnponly:
toolLogFail(log, "XDELTA", ToolSuffix) toolLogFail(log, "XDELTA", ToolSuffix)
elif os.path.dirname(Lzma) != os.path.dirname(XDelta): elif os.path.dirname(Lzma) != os.path.dirname(XDelta):
printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory") printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory")
else: else:
mkPath(log, ClientPatchDirectory) mkPath(log, ClientPatchDirectory)
if not args.bnponly:
productXml = ClientPatchDirectory + "/" + ProductName + ".xml" productXml = ClientPatchDirectory + "/" + ProductName + ".xml"
if not os.path.isfile(productXml): if not os.path.isfile(productXml):
printLog(log, ">>> Create new product <<<") printLog(log, ">>> Create new product <<<")
@ -133,6 +138,7 @@ else:
else: else:
printLog(log, "SKIP " + targetBnp) printLog(log, "SKIP " + targetBnp)
printLog(log, "") printLog(log, "")
if not args.bnponly:
printLog(log, ">>> Update product <<<") printLog(log, ">>> Update product <<<")
cwDir = os.getcwd().replace("\\", "/") cwDir = os.getcwd().replace("\\", "/")
toolDir = os.path.dirname(Lzma).replace("\\", "/") toolDir = os.path.dirname(Lzma).replace("\\", "/")

View file

@ -45,13 +45,6 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# Find tools
BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix)
printLog(log, "")
if BnpMake == "":
toolLogFail(log, BnpMakeTool, ToolSuffix)
else:
for category in InstallClientData: for category in InstallClientData:
printLog(log, "CATEGORY " + category["Name"]) printLog(log, "CATEGORY " + category["Name"])
if (category["UnpackTo"] != None): if (category["UnpackTo"] != None):
@ -64,26 +57,18 @@ else:
mkPath(log, InstallDirectory + "/" + package[0]) mkPath(log, InstallDirectory + "/" + package[0])
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath) copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath)
else: else:
sourcePath = ClientPatchDirectory + "/bnp"
targetPath = ClientInstallDirectory + "/data" targetPath = ClientInstallDirectory + "/data"
mkPath(log, targetPath) mkPath(log, targetPath)
for package in category["Packages"]: for package in category["Packages"]:
printLog(log, "PACKAGE " + package[0]) printLog(log, "PACKAGE " + package[0])
sourcePath = InstallDirectory + "/" + package[0] sourceBnp = sourcePath + "/" + package[0] + ".bnp"
mkPath(log, sourcePath)
targetBnp = targetPath + "/" + package[0] + ".bnp" targetBnp = targetPath + "/" + package[0] + ".bnp"
if (len(package[1]) > 0): if (len(package[1]) > 0):
sourceBnp = sourcePath + "/" + package[1][0]
targetBnp = targetPath + "/" + package[1][0] targetBnp = targetPath + "/" + package[1][0]
printLog(log, "TARGET " + package[1][0]) printLog(log, "TARGET " + package[1][0])
needUpdateBnp = 1 copyFileIfNeeded(log, sourceBnp, targetBnp)
if (len(package) > 2):
needUpdateBnp = needUpdate(log, sourcePath + "/" + package[2], targetBnp)
else:
needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp)
if (needUpdateBnp):
printLog(log, "BNP " + targetBnp)
subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1])
else:
printLog(log, "SKIP " + targetBnp)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -69,10 +69,10 @@ ZoneIgLighterTool = "zone_ig_lighter"
IgLighterTool = "ig_lighter" IgLighterTool = "ig_lighter"
AnimBuilderTool = "anim_builder" AnimBuilderTool = "anim_builder"
TileEditTool = "tile_edit" TileEditTool = "tile_edit"
BuildImagesetTool = "th_build_imageset" # BuildImagesetTool = "th_build_imageset" # kaetemi stuff, ignore this
MakeSheetIdTool = "make_sheet_id" MakeSheetIdTool = "make_sheet_id"
BuildSheetsTool = "th_build_sheets" # BuildSheetsTool = "th_build_sheets" # kaetemi stuff, ignore this
BuildSoundTool = "th_build_sound" # BuildSoundTool = "th_build_sound" # kaetemi stuff, ignore this
BuildCoarseMeshTool = "build_coarse_mesh" BuildCoarseMeshTool = "build_coarse_mesh"
LightmapOptimizerTool = "lightmap_optimizer" LightmapOptimizerTool = "lightmap_optimizer"
BuildClodtexTool = "build_clodtex" BuildClodtexTool = "build_clodtex"

View file

@ -187,7 +187,7 @@ fn haveCoarseMesh node =
return false return false
) )
fn runNelMaxExport inputMaxFile = fn runNelMaxExportSub inputMaxFile retryCount =
( (
tagThisFile = false tagThisFile = false
@ -354,8 +354,39 @@ fn runNelMaxExport inputMaxFile =
( (
-- Error -- Error
nlerror("WARNING no shape exported from the file " + inputMaxFile) nlerror("WARNING no shape exported from the file " + inputMaxFile)
if tagThisFile then
(
if retryCount < 2 then
(
nlerror("INFO retry this file")
-- Free memory and file handles
gc()
heapfree
-- Reset 3dsmax
resetMAXFile #noprompt
if (loadMaxFile inputMaxFile quiet:true) == true then
(
tagThisFile = runNelMaxExportSub inputMaxFile (retryCount + 1)
)
else
(
-- Error
nlerror("ERROR exporting '%PreGenFileExtension%': can't open the file " + inputMaxFile)
nlerror("FAIL Mysterious error occured")
NelForceQuitRightNow()
)
)
)
) )
return tagThisFile return tagThisFile
) )
fn runNelMaxExport inputMaxFile =
(
return runNelMaxExportSub inputMaxFile 0
)

View file

@ -90,7 +90,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting '%PreGenFileExtension%' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting '%PreGenFileExtension%' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -24,8 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -60,6 +66,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName) os.chdir(processName)
try: try:
subprocess.call([ "python", "0_setup.py" ]) subprocess.call([ "python", "0_setup.py" ])
@ -74,6 +82,8 @@ for processName in ProcessToComplete:
except Exception, e: except Exception, e:
printLog(log, "<" + processName + "> " + str(e)) printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat") # subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -45,6 +50,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName) os.chdir(processName)
try: try:
subprocess.call([ "python", "1_export.py" ]) subprocess.call([ "python", "1_export.py" ])
@ -59,6 +66,8 @@ for processName in ProcessToComplete:
except Exception, e: except Exception, e:
printLog(log, "<" + processName + "> " + str(e)) printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat") # subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -45,6 +50,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName) os.chdir(processName)
try: try:
subprocess.call([ "python", "2_build.py" ]) subprocess.call([ "python", "2_build.py" ])
@ -59,6 +66,8 @@ for processName in ProcessToComplete:
except Exception, e: except Exception, e:
printLog(log, "<" + processName + "> " + str(e)) printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat") # subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -44,6 +49,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName) os.chdir(processName)
try: try:
subprocess.call([ "python", "3_install.py" ]) subprocess.call([ "python", "3_install.py" ])
@ -58,6 +65,8 @@ for processName in ProcessToComplete:
except Exception, e: except Exception, e:
printLog(log, "<" + processName + "> " + str(e)) printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat") # subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export anim # \brief Export anim
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export anim # Export anim

View file

@ -224,7 +224,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'anim' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'anim' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export clodbank # \brief Export clodbank
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export clodbank # Export clodbank

View file

@ -279,7 +279,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'clod' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'clod' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -328,7 +328,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'ig' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'ig' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export rbank # \brief Export rbank
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export rbank # Export rbank

View file

@ -215,7 +215,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'cmb' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'cmb' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -253,7 +253,7 @@ fn haveCoarseMesh node =
return false return false
) )
fn runNelMaxExport inputMaxFile = fn runNelMaxExportSub inputMaxFile retryCount =
( (
tagThisFile = false tagThisFile = false
@ -420,11 +420,42 @@ fn runNelMaxExport inputMaxFile =
( (
-- Error -- Error
nlerror("WARNING no shape exported from the file " + inputMaxFile) nlerror("WARNING no shape exported from the file " + inputMaxFile)
if tagThisFile then
(
if retryCount < 2 then
(
nlerror("INFO retry this file")
-- Free memory and file handles
gc()
heapfree
-- Reset 3dsmax
resetMAXFile #noprompt
if (loadMaxFile inputMaxFile quiet:true) == true then
(
tagThisFile = runNelMaxExportSub inputMaxFile (retryCount + 1)
)
else
(
-- Error
nlerror("ERROR exporting 'shape': can't open the file " + inputMaxFile)
nlerror("FAIL Mysterious error occured")
NelForceQuitRightNow()
)
)
)
) )
return tagThisFile return tagThisFile
) )
fn runNelMaxExport inputMaxFile =
(
return runNelMaxExportSub inputMaxFile 0
)
removeRunningTag = true removeRunningTag = true
@ -517,7 +548,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'shape' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'shape' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -49,6 +49,7 @@ mkPath(log, installPath)
printLog(log, ">>> Install sheets <<<") printLog(log, ">>> Install sheets <<<")
mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed_sheets") copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed_sheets")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed")
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export veget # \brief Export veget
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export veget # Export veget

View file

@ -269,7 +269,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'veget' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'veget' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -68,6 +68,8 @@ public:
/// Get the ContextHelp for this control. Default is to return _ContextHelp /// Get the ContextHelp for this control. Default is to return _ContextHelp
virtual void getContextHelp(ucstring &help) const {help= _ContextHelp;} virtual void getContextHelp(ucstring &help) const {help= _ContextHelp;}
/// Get the ContextHelp for this control, with tooltip specific code. Default behaviour is identical to getContextHelp.
virtual void getContextHelpToolTip(ucstring &help) const { getContextHelp(help); }
// Get the name of the context help window. Default to "context_help" // Get the name of the context help window. Default to "context_help"
virtual std::string getContextHelpWindowName() const; virtual std::string getContextHelpWindowName() const;
/// Get the ContextHelp ActionHandler. If "", noop /// Get the ContextHelp ActionHandler. If "", noop

View file

@ -2977,30 +2977,7 @@ void CDBCtrlSheet::getContextHelp(ucstring &help) const
{ {
const CItemSheet *item = asItemSheet(); const CItemSheet *item = asItemSheet();
if (item) if (item)
{
if (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL || item->Family == ITEMFAMILY::JEWELRY || item->Family == ITEMFAMILY::ARMOR)
{
string luaMethodName = ( (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ? "updateCrystallizedSpellTooltip" : "updateBuffItemTooltip");
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
if ( ! getInventory().isItemInfoUpToDate(getInventory().getItemSlotId(ctrlSheet)))
{
// Prepare the waiter
ControlSheetTooltipUpdater.ItemSheet= ctrlSheet->getSheetId();
ControlSheetTooltipUpdater.LuaMethodName = luaMethodName;
ControlSheetTooltipUpdater.ItemSlotId= getInventory().getItemSlotId(ctrlSheet);
ControlSheetTooltipUpdater.CtrlSheet = ctrlSheet;
// Add the waiter
getInventory().addItemInfoWaiter(&ControlSheetTooltipUpdater);
}
help = ControlSheetTooltipUpdater.infoValidated(ctrlSheet, luaMethodName);
}
else
help = getItemActualName(); help = getItemActualName();
}
else else
help= _ContextHelp; help= _ContextHelp;
} }
@ -3106,6 +3083,42 @@ void CDBCtrlSheet::getContextHelp(ucstring &help) const
} }
} }
// ***************************************************************************
void CDBCtrlSheet::getContextHelpToolTip(ucstring &help) const
{
// Special case for buff items and spell crystals, only for tooltips
if (getType() == CCtrlSheetInfo::SheetType_Item)
{
const CItemSheet *item = asItemSheet();
if (item)
{
if (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL
|| item->Family == ITEMFAMILY::JEWELRY || item->Family == ITEMFAMILY::ARMOR)
{
string luaMethodName = (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ? "updateCrystallizedSpellTooltip" : "updateBuffItemTooltip";
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
if ( ! getInventory().isItemInfoUpToDate(getInventory().getItemSlotId(ctrlSheet)))
{
// Prepare the waiter
ControlSheetTooltipUpdater.ItemSheet= ctrlSheet->getSheetId();
ControlSheetTooltipUpdater.LuaMethodName = luaMethodName;
ControlSheetTooltipUpdater.ItemSlotId= getInventory().getItemSlotId(ctrlSheet);
ControlSheetTooltipUpdater.CtrlSheet = ctrlSheet;
// Add the waiter
getInventory().addItemInfoWaiter(&ControlSheetTooltipUpdater);
}
help = ControlSheetTooltipUpdater.infoValidated(ctrlSheet, luaMethodName);
return;
}
}
}
// Default
getContextHelp(help);
}
// *************************************************************************** // ***************************************************************************
bool CDBCtrlSheet::canDropItem(CDBCtrlSheet *src) const bool CDBCtrlSheet::canDropItem(CDBCtrlSheet *src) const
{ {

View file

@ -355,6 +355,9 @@ public:
/// Special ContextHelp for ctrl sheet. /// Special ContextHelp for ctrl sheet.
virtual void getContextHelp(ucstring &help) const; virtual void getContextHelp(ucstring &help) const;
/// Special ContextHelp for ctrl sheet.
virtual void getContextHelpToolTip(ucstring &help) const;
/** true if an item of another ctrlSheet can be dropped on this slot. /** true if an item of another ctrlSheet can be dropped on this slot.
* also return true if src is 0, or if _ItemSlot==UNDEFINED * also return true if src is 0, or if _ItemSlot==UNDEFINED
*/ */

View file

@ -2372,7 +2372,7 @@ void CInterfaceManager::drawContextHelp ()
if(newCtrl) if(newCtrl)
{ {
// get the text // get the text
newCtrl->getContextHelp(_ContextHelpText); newCtrl->getContextHelpToolTip(_ContextHelpText);
// UserDefined context help // UserDefined context help
if( !newCtrl->getContextHelpActionHandler().empty() ) if( !newCtrl->getContextHelpActionHandler().empty() )
{ {

View file

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<FORM Revision="" State="modified">
<STRUCT>
<ATOM Name="builded_ig" Value="gen_bt_tourgarde.ig"/>
<ATOM Name="name" Value="uiBuildingGuardTower"/>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<LOG></LOG>
</FORM>

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<FORM Revision="" State="modified">
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<LOG></LOG>
</FORM>

View file

@ -0,0 +1,136 @@
<?xml version="1.0"?>
<FORM Revision="$Revision: 1.1 $" State="modified">
<STRUCT>
<ARRAY Name="Include_patats">
<ATOM Value="flora_test-forest-002"/>
</ARRAY>
<ARRAY Name="Plants">
<STRUCT>
<ATOM Name="File name" Value="Fo_s3_buissonaepine.plant"/>
<ATOM Name="Density" Value="VeryRare"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="fo_S3_champignou_A.plant"/>
<ATOM Name="Density" Value="0.005"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="fo_S3_champignou_B.plant"/>
<ATOM Name="Density" Value="0.005"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-bugsA.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-bugsB.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-bugsC.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-Ju-ColibrisB.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-SolBirthA.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="fo_s2_arbragrelot.plant"/>
</STRUCT>
</ARRAY>
<ATOM Name="Jitter_Pos" Value="1"/>
<ATOM Name="Scale_Min" Value="0.5"/>
<ATOM Name="Scale_Max" Value="1.5"/>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<LOG>Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[0] = verdant_heights-forest-001
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[1] = verdant_heights-forest-002
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[2] = verdant_heights-forest-003
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[3] = verdant_heights-forest-004
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[4] = verdant_heights-forest-005
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[5] = verdant_heights-forest-006
Wed Oct 23 14:44:00 2002 (Schnittger) Form Parents =
Wed Oct 23 14:44:00 2002 (Schnittger) formName Resized = 6
Wed Oct 23 14:44:51 2002 (Schnittger) .Jitter_Pos = 1
Wed Oct 23 15:41:42 2002 (Schnittger) Form Parents =
Wed Oct 23 17:47:20 2002 (Schnittger) .Include_patats[0] = verdant_heights-bush-001
Wed Oct 23 17:47:20 2002 (Schnittger) formName Resized = 1
Wed Oct 23 17:47:40 2002 (Schnittger) Form Parents =
Wed Oct 23 18:02:27 2002 (Schnittger) .Include_patats[0] = verdant_heights-forest_edge-001
Wed Oct 23 18:10:50 2002 (Schnittger) .Include_patats[0] = verdant_heights-bush-001
Thu Oct 31 16:59:51 2002 (Schnittger) .Include_patats[0] = flora_test-forest-002
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[0].File name = Fo_s3_buissonaepine.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[1].Density = Rare
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[1].File name = fo_S3_champignou_A.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[2].Density = Rare
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[2].File name = fo_S3_champignou_B.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[3].Density = Normal
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[3].File name = FO_S3_fougere.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Scale_Max = 1.5
Thu Oct 31 16:59:51 2002 (Schnittger) .Scale_Min = 0.5
Thu Oct 31 16:59:51 2002 (Schnittger) Form Parents =
Thu Oct 31 16:59:51 2002 (Schnittger) formName Resized = 4
Thu Oct 31 17:32:24 2002 (Schnittger) .Plants[1].Density = VeryRare
Thu Oct 31 17:32:24 2002 (Schnittger) .Plants[2].Density = VeryRare
Tue Nov 05 12:03:12 2002 (Schnittger) .Include_patats[0] = flora_test-forest-007
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[0].File name = Fo_s1_giant_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[10].File name = fo_S3_champignou_A.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[11].File name = fo_S3_champignou_B.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[12].File name = fo_S3_dead_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[13].File name = FO_S3_fougere.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[14].File name = fo_s3_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[15].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[15].File name = FX_Fo-bugsA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[16].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[16].File name = FX_Fo-bugsB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[17].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[17].File name = FX_Fo-bugsC.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[18].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[18].File name = FX_Fo-Ju-ColibrisB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[19].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[19].File name = FX_Fo-SolBirthA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[1].File name = Fo_S1_giant_trunk.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[20].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[20].File name = FX_Fo-treefallA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[21].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[21].File name = FX_Fo-treefallB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[22].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[22].File name = FX_Fo-treefallC.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[23].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[23].File name = FX_Fo-treefallD.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[24].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[24].File name = FX_Fo-treefallE.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[2].File name = fo_s2_arbragrelot.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[3].File name = Fo_s2_big_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[4].File name = FO_S2_bigroot_A.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[5].File name = FO_S2_bigroot_B.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[6].File name = FO_S2_bigroot_C.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[7].File name = FO_S2_birch.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[8].File name = FO_S2_spiketree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[9].File name = Fo_s3_buissonaepine.plant
Tue Nov 05 12:03:12 2002 (Schnittger) formName Resized = 25
Tue Nov 05 12:13:16 2002 (Schnittger) .Include_patats[0] = flora_test-forest-002
Tue Nov 05 12:13:16 2002 (Schnittger) formName Deleted =
Tue Nov 05 12:29:21 2002 (Schnittger) .Plants[2].Density = VeryRare
Tue Nov 05 12:29:21 2002 (Schnittger) .Plants[3].Density = VeryRare
Tue Nov 05 13:10:58 2002 (Schnittger) formName Deleted =
Tue Nov 05 13:27:23 2002 (Schnittger) .Plants[0].Density = VeryRare
Tue Nov 05 13:27:23 2002 (Schnittger) .Plants[8].File name = fo_s2_arbragrelot.plant
Tue Nov 05 13:27:23 2002 (Schnittger) formName Resized = 9
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[10].Density = Rare
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[10].File name = FO_S2_bigroot_B.plant
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[11].Density = Rare
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[11].File name = FO_S2_bigroot_C.plant
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[9].Density = Rare
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[9].File name = FO_S2_bigroot_A.plant
Tue Nov 05 13:39:03 2002 (Schnittger) formName Resized = 12
Tue Nov 05 13:39:33 2002 (Schnittger) formName Deleted =
Tue Nov 05 13:52:17 2002 (Schnittger) .Plants[1].Density = 0.005
Tue Nov 05 13:52:17 2002 (Schnittger) .Plants[2].Density = 0.005</LOG>
</FORM>

View file

@ -0,0 +1,147 @@
<?xml version="1.0"?>
<FORM Revision="$Revision: 1.1 $" State="modified">
<STRUCT>
<ARRAY Name="Include_patats">
<ATOM Value="flora_test-zone-006"/>
</ARRAY>
<ARRAY Name="Plants">
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-bugsA.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-bugsB.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Fo-bugsC.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="FX_Ju-SolbirthA.plant"/>
<ATOM Name="Density" Value="FX"/>
</STRUCT>
</ARRAY>
<ATOM Name="Jitter_Pos" Value="1"/>
<ATOM Name="Scale_Min" Value="0.5"/>
<ATOM Name="Scale_Max" Value="0.75"/>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<LOG>Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[0] = verdant_heights-forest-001
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[1] = verdant_heights-forest-002
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[2] = verdant_heights-forest-003
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[3] = verdant_heights-forest-004
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[4] = verdant_heights-forest-005
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[5] = verdant_heights-forest-006
Wed Oct 23 14:44:00 2002 (Schnittger) Form Parents =
Wed Oct 23 14:44:00 2002 (Schnittger) formName Resized = 6
Wed Oct 23 14:44:51 2002 (Schnittger) .Jitter_Pos = 1
Wed Oct 23 15:41:42 2002 (Schnittger) Form Parents =
Wed Oct 23 17:47:20 2002 (Schnittger) .Include_patats[0] = verdant_heights-bush-001
Wed Oct 23 17:47:20 2002 (Schnittger) formName Resized = 1
Wed Oct 23 17:47:40 2002 (Schnittger) Form Parents =
Wed Oct 23 18:02:27 2002 (Schnittger) .Include_patats[0] = verdant_heights-forest_edge-001
Wed Oct 23 18:10:50 2002 (Schnittger) .Include_patats[0] = verdant_heights-bush-001
Thu Oct 31 16:59:51 2002 (Schnittger) .Include_patats[0] = flora_test-zone-002
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[0].File name = Fo_s3_buissonaepine.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[1].Density = Rare
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[1].File name = fo_S3_champignou_A.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[2].Density = Rare
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[2].File name = fo_S3_champignou_B.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[3].Density = Normal
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[3].File name = FO_S3_fougere.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Scale_Max = 1.5
Thu Oct 31 16:59:51 2002 (Schnittger) .Scale_Min = 0.5
Thu Oct 31 16:59:51 2002 (Schnittger) Form Parents =
Thu Oct 31 16:59:51 2002 (Schnittger) formName Resized = 4
Thu Oct 31 17:32:24 2002 (Schnittger) .Plants[1].Density = VeryRare
Thu Oct 31 17:32:24 2002 (Schnittger) .Plants[2].Density = VeryRare
Tue Nov 05 12:03:12 2002 (Schnittger) .Include_patats[0] = flora_test-zone-007
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[0].File name = Fo_s1_giant_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[10].File name = fo_S3_champignou_A.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[11].File name = fo_S3_champignou_B.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[12].File name = fo_S3_dead_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[13].File name = FO_S3_fougere.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[14].File name = fo_s3_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[15].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[15].File name = FX_Fo-bugsA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[16].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[16].File name = FX_Fo-bugsB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[17].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[17].File name = FX_Fo-bugsC.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[18].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[18].File name = FX_Fo-Ju-ColibrisB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[19].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[19].File name = FX_Fo-SolBirthA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[1].File name = Fo_S1_giant_trunk.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[20].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[20].File name = FX_Fo-treefallA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[21].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[21].File name = FX_Fo-treefallB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[22].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[22].File name = FX_Fo-treefallC.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[23].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[23].File name = FX_Fo-treefallD.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[24].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[24].File name = FX_Fo-treefallE.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[2].File name = fo_s2_arbragrelot.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[3].File name = Fo_s2_big_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[4].File name = FO_S2_bigroot_A.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[5].File name = FO_S2_bigroot_B.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[6].File name = FO_S2_bigroot_C.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[7].File name = FO_S2_birch.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[8].File name = FO_S2_spiketree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[9].File name = Fo_s3_buissonaepine.plant
Tue Nov 05 12:03:12 2002 (Schnittger) formName Resized = 25
Tue Nov 05 12:13:16 2002 (Schnittger) .Include_patats[0] = flora_test-zone-002
Tue Nov 05 12:13:16 2002 (Schnittger) formName Deleted =
Tue Nov 05 12:29:21 2002 (Schnittger) .Plants[2].Density = VeryRare
Tue Nov 05 12:29:21 2002 (Schnittger) .Plants[3].Density = VeryRare
Tue Nov 05 13:10:58 2002 (Schnittger) formName Deleted =
Tue Nov 05 13:27:23 2002 (Schnittger) .Plants[0].Density = VeryRare
Tue Nov 05 13:27:23 2002 (Schnittger) .Plants[8].File name = fo_s2_arbragrelot.plant
Tue Nov 05 13:27:23 2002 (Schnittger) formName Resized = 9
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[10].Density = Rare
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[10].File name = FO_S2_bigroot_B.plant
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[11].Density = Rare
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[11].File name = FO_S2_bigroot_C.plant
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[9].Density = Rare
Tue Nov 05 13:39:03 2002 (Schnittger) .Plants[9].File name = FO_S2_bigroot_A.plant
Tue Nov 05 13:39:03 2002 (Schnittger) formName Resized = 12
Tue Nov 05 13:40:13 2002 (Schnittger) .Include_patats[0] = flora_test-zone-003
Tue Nov 05 13:52:07 2002 (Schnittger) .Plants[10].Density = VeryRare
Tue Nov 05 13:52:07 2002 (Schnittger) .Plants[11].Density = VeryRare
Tue Nov 05 13:52:07 2002 (Schnittger) .Plants[1].Density = 0.005
Tue Nov 05 13:52:07 2002 (Schnittger) .Plants[2].Density = 0.005
Tue Nov 05 13:52:07 2002 (Schnittger) .Plants[9].Density = VeryRare
Tue Nov 05 13:56:09 2002 (Schnittger) .Include_patats[0] = flora_test-zone-004
Tue Nov 05 13:56:09 2002 (Schnittger) .Plants[8].File name = Fo_s3_buissonaepine.plant
Tue Nov 05 13:56:09 2002 (Schnittger) formName Deleted =
Tue Nov 05 13:56:09 2002 (Schnittger) formName Resized = 9
Tue Nov 05 14:16:57 2002 (Schnittger) .Plants[8].Density = 0.005
Tue Nov 05 14:16:57 2002 (Schnittger) .Plants[8].File name = fo_S3_champignou_A.plant
Tue Nov 05 14:16:57 2002 (Schnittger) .Plants[9].Density = 0.005
Tue Nov 05 14:16:57 2002 (Schnittger) .Plants[9].File name = fo_S3_champignou_B.plant
Tue Nov 05 14:16:57 2002 (Schnittger) formName Resized = 10
Tue Nov 05 14:17:05 2002 (Schnittger) .Include_patats[0] = flora_test-zone-005
Tue Nov 05 14:37:05 2002 (Schnittger) .Plants[8].Density = Normal
Tue Nov 05 14:37:05 2002 (Schnittger) .Plants[8].File name = fo_s2_arbragrelot.plant
Tue Nov 05 14:37:05 2002 (Schnittger) formName Deleted =
Tue Nov 05 14:37:17 2002 (Schnittger) .Include_patats[0] = flora_test-zone-006
Tue Nov 05 16:43:23 2002 (Schnittger) .Plants[5].Density = Rare
Tue Nov 05 16:43:23 2002 (Schnittger) .Plants[5].File name = FO_S2_spiketree.plant
Tue Nov 05 16:43:23 2002 (Schnittger) .Plants[6].Density = Rare
Tue Nov 05 16:43:23 2002 (Schnittger) .Plants[6].File name = Ju_S3_bamboo.plant
Tue Nov 05 16:43:23 2002 (Schnittger) .Plants[7].Density = Rare
Tue Nov 05 16:43:23 2002 (Schnittger) .Plants[7].File name = Ju_S1_bamboo.plant
Tue Nov 05 16:43:23 2002 (Schnittger) formName Deleted =
Tue Nov 05 16:43:23 2002 (Schnittger) formName Resized = 8
Tue Nov 05 17:18:13 2002 (Schnittger) .Plants[5].Density = VeryRare
Tue Nov 05 17:18:13 2002 (Schnittger) .Plants[6].Density = VeryRare
Wed Nov 06 17:40:11 2002 (Schnittger) .Scale_Max = 0.75
Wed Dec 18 14:40:49 2002 (Schnittger) formName Deleted =
Wed Dec 18 14:40:49 2002 (Schnittger) formName Pasted = </LOG>
</FORM>

View file

@ -0,0 +1,148 @@
<?xml version="1.0"?>
<FORM Revision="$Revision: 1.2 $" State="modified">
<STRUCT>
<ARRAY Name="Include_patats">
<ATOM Value="flora_test-forest-001"/>
</ARRAY>
<ARRAY Name="Plants">
<STRUCT>
<ATOM Name="File name" Value="tr_s2_palmtree_a.plant"/>
<ATOM Name="Density" Value="0.001"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="tr_s2_palmtree_b.plant"/>
<ATOM Name="Density" Value="0.001"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="tr_s2_palmtree_c.plant"/>
<ATOM Name="Density" Value="0.001"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="tr_s2_palmtree_d.plant"/>
<ATOM Name="Density" Value="0.001"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="tr_s2_palmtree_e.plant"/>
<ATOM Name="Density" Value="0.001"/>
</STRUCT>
<STRUCT>
<ATOM Name="File name" Value="tr_s2_palmtree_f.plant"/>
<ATOM Name="Density" Value="0.001"/>
</STRUCT>
</ARRAY>
<ATOM Name="Jitter_Pos" Value="1"/>
<ATOM Name="Scale_Min" Value="0.5"/>
<ATOM Name="Scale_Max" Value="1.2"/>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<LOG>Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[0] = verdant_heights-forest-001
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[1] = verdant_heights-forest-002
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[2] = verdant_heights-forest-003
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[3] = verdant_heights-forest-004
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[4] = verdant_heights-forest-005
Wed Oct 23 14:44:00 2002 (Schnittger) .Include_patats[5] = verdant_heights-forest-006
Wed Oct 23 14:44:00 2002 (Schnittger) Form Parents =
Wed Oct 23 14:44:00 2002 (Schnittger) formName Resized = 6
Wed Oct 23 14:44:51 2002 (Schnittger) .Jitter_Pos = 1
Wed Oct 23 15:41:42 2002 (Schnittger) Form Parents =
Wed Oct 23 17:47:20 2002 (Schnittger) .Include_patats[0] = verdant_heights-bush-001
Wed Oct 23 17:47:20 2002 (Schnittger) formName Resized = 1
Wed Oct 23 17:47:40 2002 (Schnittger) Form Parents =
Wed Oct 23 18:02:27 2002 (Schnittger) .Include_patats[0] = verdant_heights-forest_edge-001
Wed Oct 23 18:10:50 2002 (Schnittger) .Include_patats[0] = verdant_heights-bush-001
Thu Oct 31 16:59:51 2002 (Schnittger) .Include_patats[0] = flora_test-forest-002
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[0].File name = Fo_s3_buissonaepine.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[1].Density = Rare
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[1].File name = fo_S3_champignou_A.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[2].Density = Rare
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[2].File name = fo_S3_champignou_B.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[3].Density = Normal
Thu Oct 31 16:59:51 2002 (Schnittger) .Plants[3].File name = FO_S3_fougere.plant
Thu Oct 31 16:59:51 2002 (Schnittger) .Scale_Max = 1.5
Thu Oct 31 16:59:51 2002 (Schnittger) .Scale_Min = 0.5
Thu Oct 31 16:59:51 2002 (Schnittger) Form Parents =
Thu Oct 31 16:59:51 2002 (Schnittger) formName Resized = 4
Thu Oct 31 17:32:24 2002 (Schnittger) .Plants[1].Density = VeryRare
Thu Oct 31 17:32:24 2002 (Schnittger) .Plants[2].Density = VeryRare
Tue Nov 05 12:03:12 2002 (Schnittger) .Include_patats[0] = flora_test-forest-007
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[0].File name = Fo_s1_giant_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[10].File name = fo_S3_champignou_A.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[11].File name = fo_S3_champignou_B.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[12].File name = fo_S3_dead_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[13].File name = FO_S3_fougere.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[14].File name = fo_s3_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[15].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[15].File name = FX_Fo-bugsA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[16].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[16].File name = FX_Fo-bugsB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[17].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[17].File name = FX_Fo-bugsC.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[18].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[18].File name = FX_Fo-Ju-ColibrisB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[19].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[19].File name = FX_Fo-SolBirthA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[1].File name = Fo_S1_giant_trunk.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[20].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[20].File name = FX_Fo-treefallA.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[21].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[21].File name = FX_Fo-treefallB.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[22].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[22].File name = FX_Fo-treefallC.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[23].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[23].File name = FX_Fo-treefallD.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[24].Density = FX
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[24].File name = FX_Fo-treefallE.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[2].File name = fo_s2_arbragrelot.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[3].File name = Fo_s2_big_tree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[4].File name = FO_S2_bigroot_A.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[5].File name = FO_S2_bigroot_B.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[6].File name = FO_S2_bigroot_C.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[7].File name = FO_S2_birch.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[8].File name = FO_S2_spiketree.plant
Tue Nov 05 12:03:12 2002 (Schnittger) .Plants[9].File name = Fo_s3_buissonaepine.plant
Tue Nov 05 12:03:12 2002 (Schnittger) formName Resized = 25
Tue Nov 05 12:14:30 2002 (Schnittger) .Include_patats[0] = flora_test-forest-001
Tue Nov 05 12:14:30 2002 (Schnittger) formName Deleted =
Fri Jan 10 16:30:17 2003 (mauduit) .Plants[0].File name = FY_S2_palmtree_A.plant
Fri Jan 10 16:30:17 2003 (mauduit) .Plants[1].File name = FY_S2_palmtree_B.plant
Fri Jan 10 16:30:17 2003 (mauduit) .Plants[2].File name = FY_S2_palmtree_C.plant
Fri Jan 10 16:30:17 2003 (mauduit) .Plants[3].File name = FY_S2_palmtree_D.plant
Fri Jan 10 16:30:17 2003 (mauduit) .Plants[4].File name = FY_S2_palmtree_E.plant
Fri Jan 10 16:30:17 2003 (mauduit) formName Resized = 5
Fri Jan 10 16:34:55 2003 (mauduit) .Plants[0].Density = 0.2
Fri Jan 10 16:34:55 2003 (mauduit) .Plants[1].Density = 0.2
Fri Jan 10 16:34:55 2003 (mauduit) .Plants[2].Density = 0.2
Fri Jan 10 16:34:55 2003 (mauduit) .Plants[3].Density = 0.2
Fri Jan 10 16:34:55 2003 (mauduit) .Plants[4].Density = 0.2
Wed Jan 15 16:55:00 2003 (mauduit) .Plants[0].Density = 0.01
Wed Jan 15 16:55:00 2003 (mauduit) .Plants[0].File name = FY_S1_baobab_C.plant
Wed Jan 15 16:55:00 2003 (mauduit) formName Deleted =
Thu Jan 16 15:10:15 2003 (mauduit) .Plants[1].File name = FY_S1_baobab_B.plant
Thu Jan 16 15:10:15 2003 (mauduit) .Plants[2].File name = FY_S1_baobab_A.plant
Thu Jan 16 15:10:15 2003 (mauduit) formName Pasted =
Thu Jan 16 15:10:15 2003 (mauduit) formName Resized = 3
Thu Jan 16 15:11:12 2003 (mauduit) .Plants[0].Density = 0.1
Thu Jan 16 15:11:12 2003 (mauduit) .Plants[1].Density = 0.1
Thu Jan 16 15:11:12 2003 (mauduit) .Plants[2].Density = 0.1
Mon Mar 03 10:41:45 2003 (mauduit) .Plants[0].Density = 0.001
Mon Mar 03 10:41:45 2003 (mauduit) .Plants[1].Density = 0.001
Mon Mar 03 10:41:45 2003 (mauduit) .Plants[2].Density = 0.001
Mon Mar 03 10:41:45 2003 (mauduit) .Scale_Max = 1.2
Mon Jun 30 11:14:59 2003 (mauduit) .Plants[0].File name = tr_s2_palmtree_a.plant
Mon Jun 30 11:14:59 2003 (mauduit) .Plants[1].File name = tr_s2_palmtree_b.plant
Mon Jun 30 11:14:59 2003 (mauduit) .Plants[2].File name = tr_s2_palmtree_c.plant
Mon Jun 30 11:14:59 2003 (mauduit) .Plants[3] Renamed =
Mon Jun 30 11:14:59 2003 (mauduit) .Plants[3].File name = tr_s2_palmtree_d.plant
Mon Jun 30 11:14:59 2003 (mauduit) .Plants[4].File name = tr_s2_palmtree_e.plant
Mon Jun 30 11:14:59 2003 (mauduit) formName Deleted =
Mon Jun 30 11:14:59 2003 (mauduit) formName Pasted =
Mon Jun 30 11:14:59 2003 (mauduit) formName Resized = 5
Mon Jun 30 16:39:08 2003 (mauduit) .Plants[5].File name = tr_s2_palmtree_f.plant
Mon Jun 30 16:39:08 2003 (mauduit) formName Pasted =
Mon Jun 30 16:39:08 2003 (mauduit) formName Resized = 6</LOG>
</FORM>

View file

@ -0,0 +1,64 @@
<?xml version="1.0"?>
<FORM Revision="$Revision: 1.3 $" State="modified">
<STRUCT>
<ATOM Name="Plant Name" Value="Leaves"/>
<ATOM Name="Comment" Value="This is an FX"/>
<STRUCT Name="3D">
<ATOM Name="Bounding Radius" Value="0.5"/>
<ATOM Name="LOD 0 min"/>
<ATOM Name="Collision Radius" Value="0.5"/>
<STRUCT Name="SpringFX">
<ATOM Name="FXName" Value="Fo-Ju-ColibrisB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
<STRUCT Name="SummerFX">
<ATOM Name="FXName" Value="Fo-Ju-ColibrisB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
<STRUCT Name="AutomnFX">
<ATOM Name="FXName" Value="Fo-Ju-ColibrisB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
<STRUCT Name="WinterFX">
<ATOM Name="FXName" Value="Fo-Ju-ColibrisB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
</STRUCT>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<COMMENTS>Converted from old format</COMMENTS>
<LOG>Fri May 17 15:17:45 2002 (corvazier) File converted from old format
Wed Aug 06 10:25:21 2003 (firroloni) .3D.Shape =
Wed Aug 06 10:25:21 2003 (firroloni) .3D.SummerFX.EndHourMax = 20
Wed Aug 06 10:25:21 2003 (firroloni) .3D.SummerFX.EndHourMin = 18
Wed Aug 06 10:25:21 2003 (firroloni) .3D.SummerFX.FXName = Fo-Ju-ColibrisB.ps
Wed Aug 06 10:25:21 2003 (firroloni) .3D.SummerFX.Mode = UseEndHour
Wed Aug 06 10:25:21 2003 (firroloni) .3D.SummerFX.StartHourMax = 10
Wed Aug 06 10:25:21 2003 (firroloni) .3D.SummerFX.StartHourMin = 8
Wed Aug 06 10:26:12 2003 (firroloni) .3D.WinterFX.EndHourMax = 14
Wed Aug 06 10:26:12 2003 (firroloni) .3D.WinterFX.EndHourMin = 13.5
Wed Aug 06 10:26:12 2003 (firroloni) .3D.WinterFX.FXName =
Wed Aug 06 10:26:12 2003 (firroloni) .3D.WinterFX.StartHourMax = 12.5
Wed Aug 06 10:26:12 2003 (firroloni) .3D.WinterFX.StartHourMin = 12
Wed Aug 06 10:26:12 2003 (firroloni) formName Pasted =
Thu Mar 04 16:28:02 2004 (millas) formName Pasted = </LOG>
</FORM>

View file

@ -0,0 +1,87 @@
<?xml version="1.0"?>
<FORM Revision="$Revision: 1.3 $" State="modified">
<STRUCT>
<ATOM Name="Plant Name" Value="Leaves"/>
<ATOM Name="Comment" Value="This is an FX"/>
<STRUCT Name="3D">
<ATOM Name="Bounding Radius" Value="0.5"/>
<ATOM Name="LOD 0 min"/>
<ATOM Name="Collision Radius" Value="0.5"/>
<STRUCT Name="SpringFX">
<ATOM Name="FXName" Value="Fo-SolBirthA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="17"/>
<ATOM Name="StartHourMax" Value="17.1"/>
<ATOM Name="EndHourMin" Value="19"/>
<ATOM Name="EndHourMax" Value="19.9"/>
</STRUCT>
<STRUCT Name="SummerFX">
<ATOM Name="FXName" Value="Fo-SolBirthA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="17"/>
<ATOM Name="StartHourMax" Value="17.1"/>
<ATOM Name="EndHourMin" Value="19"/>
<ATOM Name="EndHourMax" Value="19.9"/>
</STRUCT>
<STRUCT Name="AutomnFX">
<ATOM Name="FXName" Value="Fo-SolBirthA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="17"/>
<ATOM Name="StartHourMax" Value="17.1"/>
<ATOM Name="EndHourMin" Value="19"/>
<ATOM Name="EndHourMax" Value="19.9"/>
</STRUCT>
<STRUCT Name="WinterFX">
<ATOM Name="FXName" Value="Fo-SolBirthA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="17"/>
<ATOM Name="StartHourMax" Value="17.1"/>
<ATOM Name="EndHourMin" Value="19"/>
<ATOM Name="EndHourMax" Value="19.9"/>
</STRUCT>
</STRUCT>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<COMMENTS>Converted from old format</COMMENTS>
<LOG>Fri May 17 15:17:46 2002 (corvazier) File converted from old format
Wed Aug 06 10:29:31 2003 (firroloni) .3D.AutomnFX.FXName = Fo-SolBirthA.ps
Wed Aug 06 10:29:31 2003 (firroloni) .3D.Shape =
Wed Aug 06 10:29:31 2003 (firroloni) .3D.SpringFX.FXName = Fo-SolBirthA.ps
Wed Aug 06 10:29:31 2003 (firroloni) .3D.SummerFX.FXName = Fo-SolBirthA.ps
Wed Aug 06 10:29:31 2003 (firroloni) .3D.WinterFX.FXName = Fo-SolBirthA.ps
Wed Aug 06 10:37:39 2003 (firroloni) .3D.SpringFX.EndHourMax = 17
Wed Aug 06 10:37:39 2003 (firroloni) .3D.SpringFX.EndHourMin = 16
Wed Aug 06 10:37:39 2003 (firroloni) .3D.SpringFX.StartHourMax = 7
Wed Aug 06 10:37:39 2003 (firroloni) .3D.SpringFX.StartHourMin = 5
Wed Aug 06 10:37:39 2003 (firroloni) formName Pasted =
Wed Aug 06 10:44:39 2003 (firroloni) .3D.AutomnFX.Mode = UseEndHour
Wed Aug 06 10:44:39 2003 (firroloni) .3D.SpringFX.Mode = UseEndHour
Wed Aug 06 10:44:39 2003 (firroloni) .3D.SummerFX.Mode = UseEndHour
Wed Aug 06 10:44:39 2003 (firroloni) .3D.WinterFX.Mode = UseEndHour
Tue Mar 02 16:47:39 2004 (millas) .3D.SpringFX.EndHourMax = 20
Tue Mar 02 16:47:39 2004 (millas) .3D.SpringFX.EndHourMin = 19
Tue Mar 02 16:47:39 2004 (millas) .3D.WinterFX.StartHourMin = 6
Tue Mar 02 16:47:39 2004 (millas) formName Pasted =
Tue Mar 02 18:15:48 2004 (millas) .3D.SpringFX.EndHourMax = 20.1
Tue Mar 02 18:15:48 2004 (millas) .3D.SpringFX.EndHourMin = 20
Tue Mar 02 18:15:48 2004 (millas) .3D.SpringFX.StartHourMax = 19.1
Tue Mar 02 18:15:48 2004 (millas) .3D.SpringFX.StartHourMin = 19
Tue Mar 02 18:15:48 2004 (millas) .3D.WinterFX.FXName = Fo-SolBirthA.ps
Tue Mar 02 18:15:48 2004 (millas) formName Pasted =
Tue Mar 02 19:03:49 2004 (millas) .3D.SpringFX.Mode = UseEndHour
Tue Mar 02 19:03:49 2004 (millas) .3D.WinterFX.EndHourMax = 19.1
Tue Mar 02 19:03:49 2004 (millas) .3D.WinterFX.EndHourMin = 19
Tue Mar 02 19:03:49 2004 (millas) .3D.WinterFX.StartHourMax = 18.1
Tue Mar 02 19:03:49 2004 (millas) .3D.WinterFX.StartHourMin = 18
Tue Mar 02 19:06:00 2004 (millas) formName Pasted =
Wed Mar 03 14:58:10 2004 (millas) .3D.SpringFX.EndHourMin = 19.0
Wed Mar 03 14:58:10 2004 (millas) .3D.SpringFX.StartHourMax = 17.1
Wed Mar 03 14:58:10 2004 (millas) .3D.SpringFX.StartHourMin = 17.0
Wed Mar 03 15:01:14 2004 (millas) .3D.SpringFX.EndHourMax = 19.9
Wed Mar 03 15:01:14 2004 (millas) .3D.WinterFX.EndHourMin = 19
Wed Mar 03 15:01:14 2004 (millas) .3D.WinterFX.StartHourMin = 17
Wed Mar 03 15:01:14 2004 (millas) formName Pasted = </LOG>
</FORM>

View file

@ -0,0 +1,61 @@
<?xml version="1.0"?>
<FORM Revision="$Revision: 1.2 $" State="modified">
<STRUCT>
<ATOM Name="Plant Name" Value="bugs"/>
<ATOM Name="Comment" Value="This is an FX"/>
<STRUCT Name="3D">
<ATOM Name="Bounding Radius" Value="0.5"/>
<ATOM Name="LOD 0 min"/>
<ATOM Name="Collision Radius" Value="0.5"/>
<STRUCT Name="SpringFX">
<ATOM Name="FXName" Value="Fo-BugsA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
<STRUCT Name="SummerFX">
<ATOM Name="FXName" Value="Fo-BugsA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
<STRUCT Name="AutomnFX">
<ATOM Name="FXName" Value="Fo-BugsA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
<STRUCT Name="WinterFX">
<ATOM Name="FXName" Value="Fo-BugsA.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="8"/>
<ATOM Name="StartHourMax" Value="10"/>
<ATOM Name="EndHourMin" Value="18"/>
<ATOM Name="EndHourMax" Value="20"/>
</STRUCT>
</STRUCT>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<COMMENTS>Converted from old format</COMMENTS>
<LOG>Fri May 17 15:17:45 2002 (corvazier) File converted from old format
Tue Aug 05 16:50:05 2003 (firroloni) .3D.AutomnFX.FXName = Fo-BugsA.ps
Tue Aug 05 16:50:05 2003 (firroloni) .3D.Shape =
Tue Aug 05 16:50:05 2003 (firroloni) .3D.SpringFX.FXName = Fo-BugsA.ps
Tue Aug 05 16:50:05 2003 (firroloni) .3D.SummerFX.FXName = Fo-BugsA.ps
Tue Aug 05 16:50:05 2003 (firroloni) .3D.WinterFX.FXName = Fo-BugsA.ps
Wed Aug 06 10:22:14 2003 (firroloni) .3D.SpringFX.EndHourMax = 20
Wed Aug 06 10:22:14 2003 (firroloni) .3D.SpringFX.EndHourMin = 18
Wed Aug 06 10:22:14 2003 (firroloni) .3D.SpringFX.Mode = UseEndHour
Wed Aug 06 10:22:14 2003 (firroloni) .3D.SpringFX.StartHourMax = 10
Wed Aug 06 10:22:14 2003 (firroloni) .3D.SpringFX.StartHourMin = 8
Wed Aug 06 10:22:14 2003 (firroloni) formName Pasted = </LOG>
</FORM>

View file

@ -0,0 +1,61 @@
<?xml version="1.0"?>
<FORM Revision="$Revision: 1.2 $" State="modified">
<STRUCT>
<ATOM Name="Plant Name" Value="bugs"/>
<ATOM Name="Comment" Value="This is an FX"/>
<STRUCT Name="3D">
<ATOM Name="Bounding Radius" Value="0.5"/>
<ATOM Name="LOD 0 min"/>
<ATOM Name="Collision Radius" Value="0.5"/>
<STRUCT Name="SpringFX">
<ATOM Name="FXName" Value="Fo-BugsB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="5"/>
<ATOM Name="StartHourMax" Value="8"/>
<ATOM Name="EndHourMin" Value="20"/>
<ATOM Name="EndHourMax" Value="22"/>
</STRUCT>
<STRUCT Name="SummerFX">
<ATOM Name="FXName" Value="Fo-BugsB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="5"/>
<ATOM Name="StartHourMax" Value="8"/>
<ATOM Name="EndHourMin" Value="20"/>
<ATOM Name="EndHourMax" Value="22"/>
</STRUCT>
<STRUCT Name="AutomnFX">
<ATOM Name="FXName" Value="Fo-BugsB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="5"/>
<ATOM Name="StartHourMax" Value="8"/>
<ATOM Name="EndHourMin" Value="20"/>
<ATOM Name="EndHourMax" Value="22"/>
</STRUCT>
<STRUCT Name="WinterFX">
<ATOM Name="FXName" Value="Fo-BugsB.ps"/>
<ATOM Name="Mode" Value="UseEndHour"/>
<ATOM Name="StartHourMin" Value="5"/>
<ATOM Name="StartHourMax" Value="8"/>
<ATOM Name="EndHourMin" Value="20"/>
<ATOM Name="EndHourMax" Value="22"/>
</STRUCT>
</STRUCT>
</STRUCT>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<STRUCT/>
<COMMENTS>Converted from old format</COMMENTS>
<LOG>Fri May 17 15:17:45 2002 (corvazier) File converted from old format
Wed Aug 06 10:23:00 2003 (firroloni) .3D.SpringFX.EndHourMax = 22
Wed Aug 06 10:23:00 2003 (firroloni) .3D.SpringFX.EndHourMin = 20
Wed Aug 06 10:23:00 2003 (firroloni) .3D.SpringFX.StartHourMax = 8
Wed Aug 06 10:23:00 2003 (firroloni) .3D.SpringFX.StartHourMin = 5
Wed Aug 06 10:23:00 2003 (firroloni) formName Pasted =
Wed Aug 06 10:23:48 2003 (firroloni) .3D.AutomnFX.FXName = Fo-BugsB.ps
Wed Aug 06 10:23:48 2003 (firroloni) .3D.Shape =
Wed Aug 06 10:23:48 2003 (firroloni) .3D.SpringFX.FXName = Fo-BugsB.ps
Wed Aug 06 10:23:48 2003 (firroloni) .3D.SpringFX.Mode = UseEndHour
Wed Aug 06 10:23:48 2003 (firroloni) .3D.SummerFX.FXName = Fo-BugsB.ps
Wed Aug 06 10:23:48 2003 (firroloni) formName Pasted = </LOG>
</FORM>

Some files were not shown because too many files have changed in this diff Show more