forked from mirror/openmw-tes3mp
Reintroduce showMarkers flag
This commit is contained in:
parent
6d85444d26
commit
5a582e7eb7
3 changed files with 23 additions and 4 deletions
|
@ -9,6 +9,8 @@
|
||||||
#include <components/vfs/manager.hpp>
|
#include <components/vfs/manager.hpp>
|
||||||
#include <components/vfs/registerarchives.hpp>
|
#include <components/vfs/registerarchives.hpp>
|
||||||
|
|
||||||
|
#include <components/nifosg/nifloader.hpp>
|
||||||
|
|
||||||
#include "model/doc/document.hpp"
|
#include "model/doc/document.hpp"
|
||||||
#include "model/world/data.hpp"
|
#include "model/world/data.hpp"
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ CS::Editor::Editor ()
|
||||||
CSMSettings::UserSettings::instance().loadSettings ("opencs.ini");
|
CSMSettings::UserSettings::instance().loadSettings ("opencs.ini");
|
||||||
mSettings.setModel (CSMSettings::UserSettings::instance());
|
mSettings.setModel (CSMSettings::UserSettings::instance());
|
||||||
|
|
||||||
//NifOgre::Loader::setShowMarkers(true);
|
NifOsg::Loader::setShowMarkers(true);
|
||||||
|
|
||||||
mVFS.reset(new VFS::Manager(mFsStrict));
|
mVFS.reset(new VFS::Manager(mFsStrict));
|
||||||
|
|
||||||
|
|
|
@ -345,6 +345,13 @@ namespace
|
||||||
namespace NifOsg
|
namespace NifOsg
|
||||||
{
|
{
|
||||||
|
|
||||||
|
bool Loader::sShowMarkers = false;
|
||||||
|
|
||||||
|
void Loader::setShowMarkers(bool show)
|
||||||
|
{
|
||||||
|
sShowMarkers = show;
|
||||||
|
}
|
||||||
|
|
||||||
void Loader::loadKf(Nif::NIFFilePtr nif, osg::Node *rootNode, int sourceIndex, TextKeyMap& textKeys)
|
void Loader::loadKf(Nif::NIFFilePtr nif, osg::Node *rootNode, int sourceIndex, TextKeyMap& textKeys)
|
||||||
{
|
{
|
||||||
if(nif->numRoots() < 1)
|
if(nif->numRoots() < 1)
|
||||||
|
@ -511,7 +518,7 @@ namespace NifOsg
|
||||||
// String markers may contain important information
|
// String markers may contain important information
|
||||||
// affecting the entire subtree of this obj
|
// affecting the entire subtree of this obj
|
||||||
// TODO: implement show markers flag
|
// TODO: implement show markers flag
|
||||||
if(sd->string == "MRK" /*&& !sShowMarkers*/)
|
if(sd->string == "MRK" && !sShowMarkers)
|
||||||
{
|
{
|
||||||
// Marker objects. These meshes are only visible in the editor.
|
// Marker objects. These meshes are only visible in the editor.
|
||||||
skipMeshes = true;
|
skipMeshes = true;
|
||||||
|
|
|
@ -7,11 +7,14 @@
|
||||||
|
|
||||||
#include <components/vfs/manager.hpp>
|
#include <components/vfs/manager.hpp>
|
||||||
|
|
||||||
#include <osg/Group>
|
|
||||||
|
|
||||||
namespace osg
|
namespace osg
|
||||||
{
|
{
|
||||||
class Geometry;
|
class Geometry;
|
||||||
|
class Group;
|
||||||
|
class Node;
|
||||||
|
class MatrixTransform;
|
||||||
|
class StateSet;
|
||||||
|
class Geode;
|
||||||
}
|
}
|
||||||
namespace osgAnimation
|
namespace osgAnimation
|
||||||
{
|
{
|
||||||
|
@ -50,6 +53,11 @@ namespace NifOsg
|
||||||
/// which animation source a keyframe controller came from.
|
/// which animation source a keyframe controller came from.
|
||||||
void loadKf(Nif::NIFFilePtr kf, osg::Node* rootNode, int sourceIndex, TextKeyMap &textKeys);
|
void loadKf(Nif::NIFFilePtr kf, osg::Node* rootNode, int sourceIndex, TextKeyMap &textKeys);
|
||||||
|
|
||||||
|
/// Set whether or not nodes marked as "MRK" should be shown.
|
||||||
|
/// These should be hidden ingame, but visible in the editior.
|
||||||
|
/// Default: false.
|
||||||
|
static void setShowMarkers(bool show);
|
||||||
|
|
||||||
const VFS::Manager* resourceManager;
|
const VFS::Manager* resourceManager;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -92,6 +100,8 @@ namespace NifOsg
|
||||||
Nif::NIFFilePtr mNif;
|
Nif::NIFFilePtr mNif;
|
||||||
|
|
||||||
osg::Group* mRootNode;
|
osg::Group* mRootNode;
|
||||||
|
|
||||||
|
static bool sShowMarkers;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue