Merge default
This commit is contained in:
commit
04095561cb
35 changed files with 389 additions and 303 deletions
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# NeL
|
||||
# Authors: Nevrax and the NeL Community
|
||||
# Version: 0.9.0
|
||||
# Version: 0.9.1
|
||||
#
|
||||
# Notes:
|
||||
# * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path
|
||||
|
@ -48,7 +48,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|||
PROJECT(RyzomCore CXX C)
|
||||
SET(NL_VERSION_MAJOR 0)
|
||||
SET(NL_VERSION_MINOR 9)
|
||||
SET(NL_VERSION_PATCH 0)
|
||||
SET(NL_VERSION_PATCH 1)
|
||||
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
|
|
@ -1178,9 +1178,6 @@ private:
|
|||
CPSMultiMap<uint32, CPSLocatedBindable *>::M TLBMap;
|
||||
TLBMap _LBMap;
|
||||
|
||||
float _AutoLODStartDistPercent;
|
||||
uint8 _AutoLODDegradationExponent;
|
||||
|
||||
CPSAttribMaker<NLMISC::CRGBA> *_ColorAttenuationScheme;
|
||||
NLMISC::CRGBA _GlobalColor;
|
||||
NLMISC::CRGBA _GlobalColorLighted;
|
||||
|
@ -1206,6 +1203,11 @@ private:
|
|||
bool _HiddenAtCurrentFrame : 1;
|
||||
bool _HiddenAtPreviousFrame : 1;
|
||||
|
||||
// The two following members have been moved after the bitfield to workaround a MSVC 64-bit compiler bug (fixed in VS2013)
|
||||
// For more info, see: http://connect.microsoft.com/VisualStudio/feedback/details/777184/c-compiler-bug-vtable-pointer-put-at-wrong-offset-in-64-bit-mode
|
||||
float _AutoLODStartDistPercent;
|
||||
uint8 _AutoLODDegradationExponent;
|
||||
|
||||
static bool _SerialIdentifiers;
|
||||
static bool _ForceDisplayBBox;
|
||||
|
||||
|
|
|
@ -178,6 +178,9 @@ private:
|
|||
|
||||
// Error message
|
||||
std::string _ErrorString;
|
||||
|
||||
// System dependant structure for locale
|
||||
void* _Locale;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2803,9 +2803,13 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType()
|
|||
else
|
||||
{
|
||||
GLuint result;
|
||||
nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result);
|
||||
OcclusionType = result != 0 ? NotOccluded : Occluded;
|
||||
VisibleCount = (uint) result;
|
||||
nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT_AVAILABLE, &result);
|
||||
if (result != GL_FALSE)
|
||||
{
|
||||
nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result);
|
||||
OcclusionType = result != 0 ? NotOccluded : Occluded;
|
||||
VisibleCount = (uint) result;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -94,7 +94,7 @@ const char *CProgramIndex::Names[NUM_UNIFORMS] =
|
|||
|
||||
void IProgram::buildInfo(CSource *source)
|
||||
{
|
||||
nlassert(!m_Source);
|
||||
// nlassert(!m_Source); // VALID: When deleting driver and creating new one.
|
||||
|
||||
m_Source = source;
|
||||
|
||||
|
|
|
@ -753,7 +753,13 @@ bool CInstanceGroup::addToSceneWhenAllShapesLoaded (CScene& scene, IDriver *driv
|
|||
{
|
||||
_Instances[i]->clipUnlinkFromAll();
|
||||
for (j = 0; j < _InstancesInfos[i].Clusters.size(); ++j)
|
||||
_ClusterInstances[_InstancesInfos[i].Clusters[j]]->clipAddChild( _Instances[i] );
|
||||
{
|
||||
uint32 clusterInst = _InstancesInfos[i].Clusters[j];
|
||||
if (clusterInst < _ClusterInstances.size())
|
||||
_ClusterInstances[clusterInst]->clipAddChild( _Instances[i] );
|
||||
else
|
||||
nlwarning("IG: BUG: Cluster infos size %u, indexing %u", (uint32)_ClusterInstances.size(), clusterInst);
|
||||
}
|
||||
// For the first time we have to set all the instances to NOT move (and not be rebinded)
|
||||
_Instances[i]->freeze();
|
||||
_Instances[i]->setClusterSystem (this);
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
// Include from libxml2
|
||||
#include <libxml/xmlerror.h>
|
||||
|
||||
#if defined(NL_OS_WINDOWS) && defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 80
|
||||
#define USE_LOCALE_SPRINTF
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifdef DEBUG_NEW
|
||||
|
@ -38,11 +43,22 @@ const char SEPARATOR = ' ';
|
|||
|
||||
// ***************************************************************************
|
||||
|
||||
#ifdef USE_LOCALE_SPRINTF
|
||||
|
||||
#define writenumber(src,format,digits) \
|
||||
char number_as_cstring [digits+1]; \
|
||||
_sprintf_l( number_as_cstring, format, (_locale_t)_Locale, src ); \
|
||||
serialSeparatedBufferOut( number_as_cstring );
|
||||
|
||||
#else
|
||||
|
||||
#define writenumber(src,format,digits) \
|
||||
char number_as_cstring [digits+1]; \
|
||||
sprintf( number_as_cstring, format, src ); \
|
||||
serialSeparatedBufferOut( number_as_cstring );
|
||||
|
||||
#endif
|
||||
|
||||
// ***************************************************************************
|
||||
// XML callbacks
|
||||
// ***************************************************************************
|
||||
|
@ -133,6 +149,13 @@ COXml::COXml () : IStream (false /* Output mode */)
|
|||
|
||||
// Push begin
|
||||
_PushBegin = false;
|
||||
|
||||
#ifdef USE_LOCALE_SPRINTF
|
||||
// create C numeric locale
|
||||
_Locale = _create_locale(LC_NUMERIC, "C");
|
||||
#else
|
||||
_Locale = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -192,6 +215,10 @@ COXml::~COXml ()
|
|||
{
|
||||
// Flush document to the internal stream
|
||||
flush ();
|
||||
|
||||
#ifdef USE_LOCALE_SPRINTF
|
||||
if (_Locale) _free_locale((_locale_t)_Locale);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -1,40 +1,42 @@
|
|||
|
||||
IF(WITH_NEL_TOOLS)
|
||||
|
||||
IF(WITH_3D)
|
||||
SUBDIRS(
|
||||
anim_builder
|
||||
animation_set_builder
|
||||
build_clod_bank
|
||||
build_clodtex
|
||||
build_coarse_mesh
|
||||
build_far_bank
|
||||
build_shadow_skin
|
||||
build_smallbank
|
||||
cluster_viewer
|
||||
file_info
|
||||
ig_add
|
||||
ig_elevation
|
||||
ig_info
|
||||
ig_lighter
|
||||
lightmap_optimizer
|
||||
zone_dependencies
|
||||
zone_ig_lighter
|
||||
zone_lighter
|
||||
zone_welder
|
||||
shapes_exporter
|
||||
shape2obj
|
||||
zone_check_bind
|
||||
zone_dump
|
||||
zviewer)
|
||||
ENDIF()
|
||||
|
||||
SUBDIRS(
|
||||
build_coarse_mesh
|
||||
build_far_bank
|
||||
build_smallbank
|
||||
ig_lighter
|
||||
ig_elevation
|
||||
lightmap_optimizer
|
||||
zone_dependencies
|
||||
zone_ig_lighter
|
||||
zone_lighter
|
||||
zone_welder
|
||||
animation_set_builder
|
||||
anim_builder
|
||||
build_clod_bank
|
||||
build_clodtex
|
||||
build_interface
|
||||
build_shadow_skin
|
||||
cluster_viewer
|
||||
file_info
|
||||
get_neighbors
|
||||
ig_add
|
||||
ig_info
|
||||
shapes_exporter
|
||||
tga_cut
|
||||
tga_resize
|
||||
shape2obj
|
||||
zone_check_bind
|
||||
zone_dump
|
||||
zviewer)
|
||||
|
||||
ENDIF(WITH_NEL_TOOLS)
|
||||
tga_resize)
|
||||
ENDIF()
|
||||
|
||||
# For tools selection of only max plugins
|
||||
IF(WIN32)
|
||||
IF(WIN32 AND WITH_3D)
|
||||
IF(MFC_FOUND)
|
||||
ADD_SUBDIRECTORY(object_viewer)
|
||||
IF(WITH_NEL_MAXPLUGIN)
|
||||
|
@ -44,9 +46,9 @@ IF(WIN32)
|
|||
ENDIF(MAXSDK_FOUND)
|
||||
ENDIF(WITH_NEL_MAXPLUGIN)
|
||||
ENDIF(MFC_FOUND)
|
||||
ENDIF(WIN32)
|
||||
ENDIF()
|
||||
|
||||
IF(WITH_NEL_TOOLS)
|
||||
IF(WITH_NEL_TOOLS AND WITH_3D)
|
||||
IF(WIN32)
|
||||
# ADD_SUBDIRECTORY(lightmap_optimizer)
|
||||
IF(MFC_FOUND)
|
||||
|
@ -70,5 +72,5 @@ IF(WITH_NEL_TOOLS)
|
|||
#crash_log_analyser
|
||||
#shapes_exporter
|
||||
|
||||
ENDIF(WITH_NEL_TOOLS)
|
||||
ENDIF()
|
||||
|
||||
|
|
|
@ -113,18 +113,17 @@ void putPixel(uint8 *dst, uint8 *src, bool alphaTransfert)
|
|||
// ***************************************************************************
|
||||
bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bool alphaTransfert=true)
|
||||
{
|
||||
uint32 a, b;
|
||||
|
||||
uint8 *rSrcPix = &pSrc->getPixels()[0];
|
||||
uint8 *rDstPix = &pDst->getPixels()[0];
|
||||
|
||||
uint wSrc= pSrc->getWidth();
|
||||
uint hSrc= pSrc->getHeight();
|
||||
for (b = 0; b < hSrc; ++b)
|
||||
for (a = 0; a < wSrc; ++a)
|
||||
for (uint b = 0; b < hSrc; ++b)
|
||||
for (uint a = 0; a < wSrc; ++a)
|
||||
{
|
||||
if (rDstPix[4*((x+a)+(y+b)*pDst->getWidth())+3] != 0)
|
||||
return false;
|
||||
|
||||
// write
|
||||
putPixel(rDstPix + 4*((x+a)+(y+b)*pDst->getWidth()), rSrcPix+ 4*(a+b*pSrc->getWidth()), alphaTransfert);
|
||||
}
|
||||
|
@ -135,9 +134,9 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bo
|
|||
// expand on W
|
||||
if(wSrc<wSrc4)
|
||||
{
|
||||
for(a=wSrc;a<wSrc4;a++)
|
||||
for(uint a=wSrc;a<wSrc4;a++)
|
||||
{
|
||||
for(b=0;b<hSrc4;b++)
|
||||
for(uint b=0;b<hSrc4;b++)
|
||||
{
|
||||
putPixel(rDstPix + 4*((x+a)+(y+b)*pDst->getWidth()), rDstPix + 4*((x+wSrc-1)+(y+b)*pDst->getWidth()), alphaTransfert);
|
||||
}
|
||||
|
@ -146,9 +145,9 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bo
|
|||
// expand on H
|
||||
if(hSrc<hSrc4)
|
||||
{
|
||||
for(b=hSrc;b<hSrc4;b++)
|
||||
for(uint b=hSrc;b<hSrc4;b++)
|
||||
{
|
||||
for(a=0;a<wSrc4;a++)
|
||||
for(uint a=0;a<wSrc4;a++)
|
||||
{
|
||||
putPixel(rDstPix + 4*((x+a)+(y+b)*pDst->getWidth()), rDstPix + 4*((x+a)+(y+hSrc-1)*pDst->getWidth()), alphaTransfert);
|
||||
}
|
||||
|
@ -252,30 +251,38 @@ int main(int nNbArg, char **ppArgs)
|
|||
}
|
||||
|
||||
vector<NLMISC::CBitmap*> AllMaps;
|
||||
sint32 i, j;
|
||||
sint32 j;
|
||||
|
||||
// Load all maps
|
||||
sint32 mapSize = (sint32)AllMapNames.size();
|
||||
AllMaps.resize( mapSize );
|
||||
for( i = 0; i < mapSize; ++i )
|
||||
for(sint i = 0; i < mapSize; ++i )
|
||||
{
|
||||
NLMISC::CBitmap *pBtmp = NULL;
|
||||
|
||||
try
|
||||
{
|
||||
NLMISC::CBitmap *pBtmp = new NLMISC::CBitmap;
|
||||
pBtmp = new NLMISC::CBitmap;
|
||||
NLMISC::CIFile inFile;
|
||||
inFile.open( AllMapNames[i] );
|
||||
pBtmp->load(inFile);
|
||||
if (!inFile.open( AllMapNames[i] )) throw NLMISC::Exception("Unable to open " + AllMapNames[i]);
|
||||
|
||||
uint8 colors = pBtmp->load(inFile);
|
||||
|
||||
if (colors != 32) throw NLMISC::Exception(AllMapNames[i] + " is using " + toString(colors) + " bits colors, only 32 bit supported!");
|
||||
|
||||
AllMaps[i] = pBtmp;
|
||||
}
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
if (pBtmp) delete pBtmp;
|
||||
|
||||
outString (string("ERROR :") + e.what());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Sort all maps by decreasing size
|
||||
for (i = 0; i < mapSize-1; ++i)
|
||||
for (sint i = 0; i < mapSize-1; ++i)
|
||||
for (j = i+1; j < mapSize; ++j)
|
||||
{
|
||||
NLMISC::CBitmap *pBI = AllMaps[i];
|
||||
|
@ -303,7 +310,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
vector<NLMISC::CUV> UVMin, UVMax;
|
||||
UVMin.resize (mapSize, NLMISC::CUV(0.0f, 0.0f));
|
||||
UVMax.resize (mapSize, NLMISC::CUV(0.0f, 0.0f));
|
||||
for (i = 0; i < mapSize; ++i)
|
||||
for (sint i = 0; i < mapSize; ++i)
|
||||
{
|
||||
sint32 x, y;
|
||||
while (!tryAllPos(AllMaps[i], &GlobalMask, x, y))
|
||||
|
@ -349,7 +356,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
}
|
||||
|
||||
// Convert UV from pixel to ratio
|
||||
for (i = 0; i < mapSize; ++i)
|
||||
for (sint i = 0; i < mapSize; ++i)
|
||||
{
|
||||
UVMin[i].U = UVMin[i].U / (float)GlobalTexture.getWidth();
|
||||
UVMin[i].V = UVMin[i].V / (float)GlobalTexture.getHeight();
|
||||
|
@ -394,7 +401,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
FILE *f = fopen (fmtName.c_str(), "wt");
|
||||
if (f != NULL)
|
||||
{
|
||||
for (i = 0; i < mapSize; ++i)
|
||||
for (sint i = 0; i < mapSize; ++i)
|
||||
{
|
||||
// get the string whitout path
|
||||
string fileName= CFile::getFilename(AllMapNames[i]);
|
||||
|
@ -442,6 +449,8 @@ int main(int nNbArg, char **ppArgs)
|
|||
nlwarning("Can't parse %s", bufTmp);
|
||||
continue;
|
||||
}
|
||||
|
||||
sint i;
|
||||
|
||||
sTGAname = toLower(string(tgaName));
|
||||
string findTGAName;
|
||||
|
|
|
@ -1392,9 +1392,9 @@ void CMainFrame::OnViewSetSceneRotation()
|
|||
if (sceneRotDlg.DoModal() == IDOK)
|
||||
{
|
||||
// read value.
|
||||
NLMISC::fromString(sceneRotDlg.RotX, _LastSceneRotX);
|
||||
NLMISC::fromString(sceneRotDlg.RotY, _LastSceneRotY);
|
||||
NLMISC::fromString(sceneRotDlg.RotZ, _LastSceneRotZ);
|
||||
_LastSceneRotX= (float)atof(sceneRotDlg.RotX);
|
||||
_LastSceneRotY= (float)atof(sceneRotDlg.RotY);
|
||||
_LastSceneRotZ= (float)atof(sceneRotDlg.RotZ);
|
||||
float rotx= degToRad(_LastSceneRotX);
|
||||
float roty= degToRad(_LastSceneRotY);
|
||||
float rotz= degToRad(_LastSceneRotZ);
|
||||
|
|
|
@ -598,7 +598,11 @@ bool CObjectViewer::initUI (HWND parent)
|
|||
|
||||
// initialize NeL context if needed
|
||||
if (!NLMISC::INelContext::isContextInitialised())
|
||||
new NLMISC::CApplicationContext;
|
||||
{
|
||||
new NLMISC::CApplicationContext();
|
||||
nldebug("NeL Object Viewer: initUI");
|
||||
NLMISC::CSheetId::initWithoutSheet();
|
||||
}
|
||||
|
||||
// The fonts manager
|
||||
_FontManager.setMaxMemory(2000000);
|
||||
|
@ -676,9 +680,12 @@ bool CObjectViewer::initUI (HWND parent)
|
|||
view->MainFrame = _MainFrame;
|
||||
|
||||
_MainFrame->ShowWindow (SW_SHOW);
|
||||
|
||||
RECT viewportRect;
|
||||
GetClientRect(view->m_hWnd, &viewportRect);
|
||||
|
||||
// Init NELU
|
||||
if (!CNELU::init (640, 480, viewport, 32, true, view->m_hWnd, false, _Direct3d))
|
||||
if (!CNELU::init (viewportRect.right, viewportRect.bottom, viewport, 32, true, view->m_hWnd, false, _Direct3d))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "nel/misc/app_context.h"
|
||||
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
|
||||
#include <maxversion.h>
|
||||
#include "nel/misc/sheet_id.h"
|
||||
|
||||
extern ClassDesc2* GetCNelExportDesc();
|
||||
|
||||
|
@ -34,6 +35,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
|||
{
|
||||
new NLMISC::CLibraryContext(GetSharedNelContext());
|
||||
nldebug("NeL Export: DllMain");
|
||||
NLMISC::CSheetId::initWithoutSheet();
|
||||
}
|
||||
|
||||
hInstance = hinstDLL; // Hang on to this DLL's instance handle.
|
||||
|
|
|
@ -575,8 +575,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1, 0, 0, 117
|
||||
PRODUCTVERSION 3,0,0,0
|
||||
FILEVERSION 0, 9, 1, 0
|
||||
PRODUCTVERSION 0, 9, 1, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -591,16 +591,16 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "TECH: \0"
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 117\0"
|
||||
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0"
|
||||
VALUE "CompanyName", "Ryzom Core\0"
|
||||
VALUE "FileVersion", "0.9.1\0"
|
||||
VALUE "InternalName", "CNelExport\0"
|
||||
VALUE "LegalCopyright", "\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "CNelExport.dlu\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "3D Studio MAX\0"
|
||||
VALUE "ProductVersion", "3.0.0.0\0"
|
||||
VALUE "ProductName", "Ryzom Core\0"
|
||||
VALUE "ProductVersion", "0.9.1\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -293,8 +293,11 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime)
|
|||
for (sint i = 0; i < exclusionList.Count(); ++i)
|
||||
{
|
||||
INode *exclNode = exclusionList[i];
|
||||
string tmp = exclNode->GetName();
|
||||
this->setExclusion.insert(tmp);
|
||||
if (exclNode) // Crashfix // FIXME: Why is this NULL?
|
||||
{
|
||||
string tmp = exclNode->GetName();
|
||||
this->setExclusion.insert(tmp);
|
||||
}
|
||||
}
|
||||
#endif // (MAX_RELEASE < 4000)
|
||||
|
||||
|
|
|
@ -508,14 +508,13 @@ std::string CExportNel::getName (MtlBase& mtl)
|
|||
// --------------------------------------------------
|
||||
|
||||
// Get the node name
|
||||
std::string CExportNel::getName (INode& mtl)
|
||||
std::string CExportNel::getName(INode& node)
|
||||
{
|
||||
// Return its name
|
||||
TCHAR* name=mtl.GetName();
|
||||
return std::string (name);
|
||||
MCHAR* name = node.GetName();
|
||||
return std::string(name);
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
|
||||
// Get the NEL node name
|
||||
|
|
|
@ -18,64 +18,17 @@
|
|||
#include "export_nel.h"
|
||||
#include "export_appdata.h"
|
||||
#include "nel/3d/skeleton_shape.h"
|
||||
#include "iskin.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
using namespace NL3D;
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
#define SKIN_INTERFACE 0x00010000
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
#define SKIN_CLASS_ID Class_ID(9815843,87654)
|
||||
#define PHYSIQUE_CLASS_ID Class_ID(PHYSIQUE_CLASS_ID_A, PHYSIQUE_CLASS_ID_B)
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
class ISkinContextData
|
||||
{
|
||||
public:
|
||||
virtual int GetNumPoints()=0;
|
||||
virtual int GetNumAssignedBones(int vertexIdx)=0;
|
||||
virtual int GetAssignedBone(int vertexIdx, int boneIdx)=0;
|
||||
virtual float GetBoneWeight(int vertexIdx, int boneIdx)=0;
|
||||
|
||||
virtual int GetSubCurveIndex(int vertexIdx, int boneIdx)=0;
|
||||
virtual int GetSubSegmentIndex(int vertexIdx, int boneIdx)=0;
|
||||
virtual float GetSubSegmentDistance(int vertexIdx, int boneIdx)=0;
|
||||
virtual Point3 GetTangent(int vertexIdx, int boneIdx)=0;
|
||||
virtual Point3 GetOPoint(int vertexIdx, int boneIdx)=0;
|
||||
|
||||
virtual void SetWeight(int vertexIdx, int boneIdx, float weight)=0;
|
||||
virtual void SetWeight(int vertexIdx, INode* bone, float weight)=0;
|
||||
virtual void SetWeights(int vertexIdx, Tab<int> boneIdx, Tab<float> weights)=0;
|
||||
virtual void SetWeights(int vertexIdx, INodeTab boneIdx, Tab<float> weights)=0;
|
||||
|
||||
};
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
class ISkin
|
||||
{
|
||||
public:
|
||||
ISkin() {}
|
||||
~ISkin() {}
|
||||
virtual int GetBoneInitTM(INode *pNode, Matrix3 &InitTM, bool bObjOffset = false)=0;
|
||||
virtual int GetSkinInitTM(INode *pNode, Matrix3 &InitTM, bool bObjOffset = false)=0;
|
||||
virtual int GetNumBones()=0;
|
||||
virtual INode *GetBone(int idx)=0;
|
||||
virtual DWORD GetBoneProperty(int idx)=0;
|
||||
virtual ISkinContextData *GetContextInterface(INode *pNode)=0;
|
||||
|
||||
virtual BOOL AddBone(INode *bone)=0;
|
||||
virtual BOOL AddBones(INodeTab *bones)=0;
|
||||
virtual BOOL RemoveBone(INode *bone)=0;
|
||||
virtual void Invalidate()=0;
|
||||
};
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
void CExportNel::buildSkeletonShape (CSkeletonShape& skeletonShape, INode& node, mapBoneBindPos* mapBindPos, TInodePtrInt& mapId,
|
||||
TimeValue time)
|
||||
{
|
||||
|
@ -410,7 +363,8 @@ void CExportNel::buildSkeleton (std::vector<CBoneBase>& bonesArray, INode& node,
|
|||
bonesArray.push_back (bone);
|
||||
|
||||
// **** Call on child
|
||||
for (int children=0; children<node.NumberOfChildren(); children++)
|
||||
const int numChildren = node.NumberOfChildren();
|
||||
for (int children=0; children<numChildren; children++)
|
||||
buildSkeleton (bonesArray, *node.GetChildNode(children), mapBindPos, mapId, nameSet, time, ++idCount, id);
|
||||
}
|
||||
|
||||
|
@ -422,7 +376,7 @@ bool CExportNel::isSkin (INode& node)
|
|||
bool ok=false;
|
||||
|
||||
// Get the skin modifier
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASS_ID);
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASSID);
|
||||
|
||||
// Found it ?
|
||||
if (skin)
|
||||
|
@ -431,7 +385,7 @@ bool CExportNel::isSkin (INode& node)
|
|||
//if (skin->IsEnabled())
|
||||
{
|
||||
// Get a com_skin2 interface
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE);
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN);
|
||||
|
||||
// Found com_skin2 ?
|
||||
if (comSkinInterface)
|
||||
|
@ -446,7 +400,7 @@ bool CExportNel::isSkin (INode& node)
|
|||
ok=true;
|
||||
|
||||
// Release the interface
|
||||
skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface);
|
||||
skin->ReleaseInterface (I_SKIN, comSkinInterface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +444,7 @@ uint CExportNel::buildSkinning (CMesh::CMeshBuild& buildMesh, const TInodePtrInt
|
|||
uint ok=NoError;
|
||||
|
||||
// Get the skin modifier
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASS_ID);
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASSID);
|
||||
|
||||
// Build a the name array
|
||||
buildMesh.BonesNames.resize (skeletonShape.size());
|
||||
|
@ -513,7 +467,7 @@ uint CExportNel::buildSkinning (CMesh::CMeshBuild& buildMesh, const TInodePtrInt
|
|||
// ********** COMSKIN EXPORT **********
|
||||
|
||||
// Get a com_skin2 interface
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE);
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN);
|
||||
|
||||
// Should been controled with isSkin before.
|
||||
nlassert (comSkinInterface);
|
||||
|
@ -645,7 +599,7 @@ uint CExportNel::buildSkinning (CMesh::CMeshBuild& buildMesh, const TInodePtrInt
|
|||
}
|
||||
|
||||
// Release the interface
|
||||
skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface);
|
||||
skin->ReleaseInterface (I_SKIN, comSkinInterface);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -881,13 +835,13 @@ INode* CExportNel::getSkeletonRootBone (INode& node)
|
|||
INode* ret=NULL;
|
||||
|
||||
// Get the skin modifier
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASS_ID);
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASSID);
|
||||
|
||||
// Found it ?
|
||||
if (skin)
|
||||
{
|
||||
// Get a com_skin2 interface
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE);
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN);
|
||||
|
||||
// Found com_skin2 ?
|
||||
if (comSkinInterface)
|
||||
|
@ -921,7 +875,7 @@ INode* CExportNel::getSkeletonRootBone (INode& node)
|
|||
}
|
||||
|
||||
// Release the interface
|
||||
skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface);
|
||||
skin->ReleaseInterface (I_SKIN, comSkinInterface);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -961,40 +915,47 @@ INode* CExportNel::getSkeletonRootBone (INode& node)
|
|||
// Get a vertex interface
|
||||
IPhyVertexExport *vertexInterface=localData->GetVertexInterface (vtx);
|
||||
|
||||
// Check if it is a rigid vertex or a blended vertex
|
||||
int type=vertexInterface->GetVertexType ();
|
||||
if (type==RIGID_TYPE)
|
||||
if (vertexInterface)
|
||||
{
|
||||
// this is a rigid vertex
|
||||
IPhyRigidVertex *rigidInterface=(IPhyRigidVertex*)vertexInterface;
|
||||
|
||||
// Get the bone
|
||||
INode *newBone=rigidInterface->GetNode();
|
||||
|
||||
// Get the root of the hierarchy
|
||||
ret=getRoot (newBone);
|
||||
found=true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// It must be a blendable vertex
|
||||
nlassert (type==RIGID_BLENDED_TYPE);
|
||||
IPhyBlendedRigidVertex *blendedInterface=(IPhyBlendedRigidVertex*)vertexInterface;
|
||||
|
||||
// For each bones
|
||||
uint bone;
|
||||
uint count=(uint)blendedInterface->GetNumberNodes ();
|
||||
for (bone=0; bone<count; bone++)
|
||||
// Check if it is a rigid vertex or a blended vertex
|
||||
int type=vertexInterface->GetVertexType ();
|
||||
if (type==RIGID_TYPE)
|
||||
{
|
||||
// Get the bone pointer
|
||||
INode *newBone=blendedInterface->GetNode(bone);
|
||||
// this is a rigid vertex
|
||||
IPhyRigidVertex *rigidInterface=(IPhyRigidVertex*)vertexInterface;
|
||||
|
||||
// Get the bone
|
||||
INode *newBone=rigidInterface->GetNode();
|
||||
|
||||
// Get the root of the hierarchy
|
||||
ret=getRoot (newBone);
|
||||
found=true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// It must be a blendable vertex
|
||||
nlassert (type==RIGID_BLENDED_TYPE);
|
||||
IPhyBlendedRigidVertex *blendedInterface=(IPhyBlendedRigidVertex*)vertexInterface;
|
||||
|
||||
// For each bones
|
||||
uint bone;
|
||||
uint count=(uint)blendedInterface->GetNumberNodes ();
|
||||
for (bone=0; bone<count; bone++)
|
||||
{
|
||||
// Get the bone pointer
|
||||
INode *newBone=blendedInterface->GetNode(bone);
|
||||
|
||||
// Get the root of the hierarchy
|
||||
ret=getRoot (newBone);
|
||||
found=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nlwarning("Physique vertex interface NULL");
|
||||
}
|
||||
|
||||
// Release vertex interfaces
|
||||
|
@ -1030,13 +991,13 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind
|
|||
uint ok=NoError;
|
||||
|
||||
// Get the skin modifier
|
||||
Modifier* skin=getModifier (&skinedNode, SKIN_CLASS_ID);
|
||||
Modifier* skin=getModifier (&skinedNode, SKIN_CLASSID);
|
||||
|
||||
// Found it ?
|
||||
if (skin)
|
||||
{
|
||||
// Get a com_skin2 interface
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE);
|
||||
ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN);
|
||||
|
||||
// Should been controled with isSkin before.
|
||||
nlassert (comSkinInterface);
|
||||
|
@ -1082,7 +1043,7 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind
|
|||
}
|
||||
|
||||
// Release the interface
|
||||
skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface);
|
||||
skin->ReleaseInterface (I_SKIN, comSkinInterface);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1267,7 +1228,7 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind
|
|||
}
|
||||
|
||||
// Release the interface
|
||||
skin->ReleaseInterface (SKIN_INTERFACE, physiqueInterface);
|
||||
skin->ReleaseInterface (I_SKIN, physiqueInterface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1279,7 +1240,7 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind
|
|||
void CExportNel::enableSkinModifier (INode& node, bool enable)
|
||||
{
|
||||
// Get the skin modifier
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASS_ID);
|
||||
Modifier* skin=getModifier (&node, SKIN_CLASSID);
|
||||
|
||||
// Found it ?
|
||||
if (skin)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "nel/misc/app_context.h"
|
||||
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
|
||||
#include <maxversion.h>
|
||||
#include "nel/misc/sheet_id.h"
|
||||
|
||||
extern ClassDesc2* GetPO2RPODesc();
|
||||
extern ClassDesc* GetRPODesc();
|
||||
|
@ -44,6 +45,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
|||
{
|
||||
new NLMISC::CLibraryContext(GetSharedNelContext());
|
||||
nldebug("NeL Export: DllMain");
|
||||
NLMISC::CSheetId::initWithoutSheet();
|
||||
}
|
||||
|
||||
if(fdwReason == DLL_PROCESS_ATTACH)
|
||||
|
|
|
@ -85,8 +85,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,6,0,0
|
||||
PRODUCTVERSION 0,6,0,0
|
||||
FILEVERSION 0, 9, 1, 0
|
||||
PRODUCTVERSION 0, 9, 1, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -101,14 +101,14 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "http://www.opennel.org/"
|
||||
VALUE "Comments", "http://www.ryzomcore.org/"
|
||||
VALUE "FileDescription", "PatchMesh to RykolPatchMesh"
|
||||
VALUE "FileVersion", "0.6.0"
|
||||
VALUE "FileVersion", "0.9.1"
|
||||
VALUE "InternalName", "PatchMesh to RykolPatchMesh"
|
||||
VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd."
|
||||
VALUE "OriginalFilename", "nel_convert_patch.dlm"
|
||||
VALUE "ProductName", "NeL Patch Converter"
|
||||
VALUE "ProductVersion", "0.6.0"
|
||||
VALUE "ProductVersion", "0.9.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -514,8 +514,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,50
|
||||
PRODUCTVERSION 3,0,0,0
|
||||
FILEVERSION 0, 9, 1, 0
|
||||
PRODUCTVERSION 0, 9, 1, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -530,15 +530,16 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Nevrax Ltd."
|
||||
VALUE "FileDescription", "Standard modifiers (plugin)"
|
||||
VALUE "FileVersion", "1, 0, 0, 50"
|
||||
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0"
|
||||
VALUE "CompanyName", "Ryzom Core"
|
||||
VALUE "FileDescription", "NeL Patch Edit"
|
||||
VALUE "FileVersion", "0.9.1"
|
||||
VALUE "InternalName", "neleditpatch"
|
||||
VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc."
|
||||
VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF."
|
||||
VALUE "OriginalFilename", "neleditpatch.dlm"
|
||||
VALUE "ProductName", "3D Studio MAX"
|
||||
VALUE "ProductVersion", "3.0.0.0"
|
||||
VALUE "ProductName", "Ryzom Core"
|
||||
VALUE "ProductVersion", "0.9.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
|
||||
|
||||
#include <maxversion.h>
|
||||
#include "nel/misc/sheet_id.h"
|
||||
|
||||
HINSTANCE hInstance;
|
||||
int controlsInit = FALSE;
|
||||
|
@ -32,6 +33,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
|||
{
|
||||
new NLMISC::CLibraryContext(GetSharedNelContext());
|
||||
nldebug("NeL Patch Edit: DllMain");
|
||||
NLMISC::CSheetId::initWithoutSheet();
|
||||
}
|
||||
|
||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "nel/misc/app_context.h"
|
||||
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
|
||||
#include <maxversion.h>
|
||||
#include "nel/misc/sheet_id.h"
|
||||
|
||||
HINSTANCE hInstance;
|
||||
int controlsInit = FALSE;
|
||||
|
@ -18,6 +19,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
|||
{
|
||||
new NLMISC::CLibraryContext(GetSharedNelContext());
|
||||
nldebug("NeL Patch Paint: DllMain");
|
||||
NLMISC::CSheetId::initWithoutSheet();
|
||||
}
|
||||
|
||||
hInstance = hinstDLL;
|
||||
|
|
|
@ -96,8 +96,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1, 0, 0, 51
|
||||
PRODUCTVERSION 3,0,0,0
|
||||
FILEVERSION 0, 9, 1, 0
|
||||
PRODUCTVERSION 0, 9, 1, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -112,17 +112,18 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0"
|
||||
VALUE "Comments", "TECH: cyril.corvazier\0"
|
||||
VALUE "CompanyName", "Nevrax Ltd\0"
|
||||
VALUE "FileDescription", "Standard modifiers (plugin)\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 51\0"
|
||||
VALUE "CompanyName", "Ryzom Core\0"
|
||||
VALUE "FileDescription", "NeL Patch Paint\0"
|
||||
VALUE "FileVersion", "0.9.1\0"
|
||||
VALUE "InternalName", "mods\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1998 Nevrax Ltd\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "nelpatchpaint.dlm\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "3D Studio MAX\0"
|
||||
VALUE "ProductVersion", "3.0.0.0\0"
|
||||
VALUE "ProductName", "Ryzom Core\0"
|
||||
VALUE "ProductVersion", "0.9.1\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "vertex_tree_paint.h"
|
||||
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
|
||||
#include <maxversion.h>
|
||||
#include "nel/misc/sheet_id.h"
|
||||
|
||||
HINSTANCE hInstance;
|
||||
|
||||
|
@ -12,6 +13,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
|||
{
|
||||
new NLMISC::CLibraryContext(GetSharedNelContext());
|
||||
nldebug("NeL Vertex Tree Paint: DllMain");
|
||||
NLMISC::CSheetId::initWithoutSheet();
|
||||
}
|
||||
|
||||
hInstance = hinstDLL; // Hang on to this DLL's instance handle.
|
||||
|
|
|
@ -125,8 +125,8 @@ IDC_DROPPER_CURSOR CURSOR DISCARDABLE "dropcurs.cur"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,1,0,0
|
||||
PRODUCTVERSION 3,1,0,0
|
||||
FILEVERSION 0, 9, 1, 0
|
||||
PRODUCTVERSION 0, 9, 1, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -141,16 +141,17 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "TECH: Christer Janson\0"
|
||||
VALUE "CompanyName", "Kinetix, a division of Autodesk, Inc.\0"
|
||||
VALUE "FileDescription", "Vertex Color Paint (plugin)\0"
|
||||
VALUE "FileVersion", "3.1.0.0\0"
|
||||
VALUE "InternalName", "VertexPaint\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1998 Autodesk Inc.\0"
|
||||
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.1 plugin sample\0"
|
||||
VALUE "Comments", "TECH: \0"
|
||||
VALUE "CompanyName", "Ryzom Core\0"
|
||||
VALUE "FileDescription", "Vertex Tree Paint\0"
|
||||
VALUE "FileVersion", "0.9.1\0"
|
||||
VALUE "InternalName", "VertexTreePaint\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0"
|
||||
VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0"
|
||||
VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0"
|
||||
VALUE "ProductName", "3D Studio MAX\0"
|
||||
VALUE "ProductVersion", "3.1.0.0\0"
|
||||
VALUE "ProductName", "Ryzom Core\0"
|
||||
VALUE "ProductVersion", "0.9.1\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -545,7 +545,7 @@ plugin material NelMaterial
|
|||
rollout nelBasicParameters "NeL Basic Parameters" rolledUp:false
|
||||
(
|
||||
Label lblNlbpA "NeL Material" align:#center across:3
|
||||
Label lblNlbpB "http://dev.ryzom.com/" align:#center
|
||||
Label lblNlbpB "http://www.ryzomcore.org/" align:#center
|
||||
CheckBox cbTwoSided "2-Sided" checked:false align:#right
|
||||
|
||||
group "Standard Lighting"
|
||||
|
@ -595,7 +595,7 @@ plugin material NelMaterial
|
|||
cpSelfIllumColor.visible = bUseSelfIllumColor
|
||||
)
|
||||
else
|
||||
(
|
||||
(
|
||||
bTwoSided = cbTwoSided.checked
|
||||
cAmbient = cpAmbient.color
|
||||
cDiffuse = cpDiffuse.color
|
||||
|
@ -607,6 +607,9 @@ plugin material NelMaterial
|
|||
pSelfIllumAmount = spSelfIllumAmount.value
|
||||
bUseSelfIllumColor = cbUseSelfIllumColor.checked
|
||||
|
||||
spSelfIllumAmount.visible = not cbUseSelfIllumColor.checked
|
||||
cpSelfIllumColor.visible = cbUseSelfIllumColor.checked
|
||||
|
||||
delegate.twoSided = bTwoSided
|
||||
delegate.ambient = cAmbient
|
||||
delegate.diffuse = cDiffuse
|
||||
|
@ -2211,6 +2214,18 @@ plugin material NelMaterial
|
|||
|
||||
on create do
|
||||
(
|
||||
-- Load from Standard
|
||||
bTwoSided = delegate.twoSided
|
||||
cAmbient = delegate.ambient
|
||||
cDiffuse = delegate.diffuse
|
||||
pOpacity = delegate.opacity
|
||||
cSpecular = delegate.specular
|
||||
pSpecularLevel = delegate.specularLevel
|
||||
pGlossiness = delegate.glossiness
|
||||
cSelfIllumColor = delegate.selfIllumColor
|
||||
pSelfIllumAmount = delegate.selfIllumAmount
|
||||
bUseSelfIllumColor = delegate.useSelfIllumColor
|
||||
|
||||
-- Single shader
|
||||
loadShader ShaderSingleTexture
|
||||
)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
|
||||
#include <vector>
|
||||
#include <maxversion.h>
|
||||
#include "nel/misc/sheet_id.h"
|
||||
|
||||
extern ClassDesc2* GetTile_utilityDesc();
|
||||
extern ClassDesc* GetRGBAddDesc();
|
||||
|
@ -41,6 +42,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
|||
{
|
||||
new NLMISC::CLibraryContext(GetSharedNelContext());
|
||||
nldebug("NeL Tile Utility: DllMain");
|
||||
NLMISC::CSheetId::initWithoutSheet();
|
||||
}
|
||||
|
||||
hInstance = hinstDLL; // Hang on to this DLL's instance handle.
|
||||
|
|
|
@ -124,8 +124,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1, 0, 0, 56
|
||||
PRODUCTVERSION 3,0,0,0
|
||||
FILEVERSION 0, 9, 1, 0
|
||||
PRODUCTVERSION 0, 9, 1, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -140,13 +140,14 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 56\0"
|
||||
VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0"
|
||||
VALUE "CompanyName", "Ryzom Core\0"
|
||||
VALUE "FileVersion", "0.9.1\0"
|
||||
VALUE "InternalName", "Tile_utility\0"
|
||||
VALUE "LegalCopyright", "\0"
|
||||
VALUE "OriginalFilename", "Tile_utility.dlu\0"
|
||||
VALUE "ProductName", "3D Studio MAX\0"
|
||||
VALUE "ProductVersion", "3.0.0.0\0"
|
||||
VALUE "ProductName", "Ryzom Core\0"
|
||||
VALUE "ProductVersion", "0.9.1\0"
|
||||
VALUE "FileDescription", "Create material for tiles\0"
|
||||
VALUE "Comments", "TECH: \0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
|
|
|
@ -6,9 +6,7 @@ IF(WITH_NEL_TOOLS)
|
|||
ENDIF(WITH_NEL_TOOLS)
|
||||
|
||||
# Max plugins are under the 3d directory as well.
|
||||
IF(WITH_3D)
|
||||
ADD_SUBDIRECTORY(3d)
|
||||
ENDIF(WITH_3D)
|
||||
ADD_SUBDIRECTORY(3d)
|
||||
|
||||
# Don't add other subdirectories if only max plugins are selected.
|
||||
IF(WITH_NEL_TOOLS)
|
||||
|
|
|
@ -282,6 +282,26 @@ def findFilesNoSubdir(log, dir_where, file_ext):
|
|||
printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull)
|
||||
return result
|
||||
|
||||
def findFilesNoSubdirFiltered(log, dir_where, file_ext, filter):
|
||||
if len(filter) == 0:
|
||||
return findFilesNoSubdir(log, dir_where, file_ext)
|
||||
result = [ ]
|
||||
files = os.listdir(dir_where)
|
||||
len_file_ext = len(file_ext)
|
||||
for fileName in files:
|
||||
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
|
||||
fileFull = dir_where + "/" + fileName
|
||||
if os.path.isfile(fileFull):
|
||||
if fileName[-len_file_ext:].lower() == file_ext.lower():
|
||||
fileNameLower = fileName.lower()
|
||||
for filterWord in filter:
|
||||
if filterWord in fileNameLower:
|
||||
result += [ fileName ]
|
||||
break
|
||||
elif not os.path.isdir(fileFull):
|
||||
printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull)
|
||||
return result
|
||||
|
||||
def findFile(log, dir_where, file_name):
|
||||
files = os.listdir(dir_where)
|
||||
for fileName in files:
|
||||
|
@ -323,6 +343,31 @@ def needUpdateDirByLowercaseTagLog(log, dir_source, ext_source, dir_dest, ext_de
|
|||
printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles)))
|
||||
return 0
|
||||
|
||||
def needUpdateDirByTagLogFiltered(log, dir_source, ext_source, dir_dest, ext_dest, filter):
|
||||
updateCount = 0
|
||||
skipCount = 0
|
||||
lenSrcExt = len(ext_source)
|
||||
sourceFiles = findFilesNoSubdirFiltered(log, dir_source, ext_source, filter)
|
||||
destFiles = findFilesNoSubdir(log, dir_dest, ext_dest)
|
||||
for file in sourceFiles:
|
||||
sourceFile = dir_source + "/" + file
|
||||
tagFile = dir_dest + "/" + file[0:-lenSrcExt] + ext_dest
|
||||
if os.path.isfile(tagFile):
|
||||
sourceTime = os.stat(sourceFile).st_mtime
|
||||
tagTime = os.stat(tagFile).st_mtime
|
||||
if (sourceTime > tagTime):
|
||||
updateCount = updateCount + 1
|
||||
else:
|
||||
skipCount = skipCount + 1
|
||||
else:
|
||||
updateCount = updateCount + 1
|
||||
if updateCount > 0:
|
||||
printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles)))
|
||||
return 1
|
||||
else:
|
||||
printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles)))
|
||||
return 0
|
||||
|
||||
def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest):
|
||||
updateCount = 0
|
||||
skipCount = 0
|
||||
|
|
|
@ -62,7 +62,7 @@ if LigoExportLand == "" or LigoExportOnePass == 1:
|
|||
mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory)
|
||||
mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0])
|
||||
mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory)
|
||||
if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory, ".max.tag")):
|
||||
if (needUpdateDirByTagLogFiltered(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory, ".max.tag", [ "zonematerial", "zonetransition", "zonespecial" ])):
|
||||
printLog(log, "WRITE " + ligoIniPath)
|
||||
ligoIni = open(ligoIniPath, "w")
|
||||
ligoIni.write("[LigoConfig]\n")
|
||||
|
|
|
@ -233,6 +233,15 @@ fn exportCollisionsFromZone outputNelDir filename =
|
|||
if (isToBeExportedCollision m) == true then
|
||||
selectmore m
|
||||
)
|
||||
for node in objects where classOf node == XRefObject do
|
||||
(
|
||||
sourceObject = node.GetSourceObject false
|
||||
if (superclassOf sourceObject == GeometryClass) then
|
||||
(
|
||||
if (isToBeExportedCollision node) == true then
|
||||
selectmore node
|
||||
)
|
||||
)
|
||||
|
||||
-- Export the collision
|
||||
if (NelExportCollision ($selection as array) outputNelDir) == false then
|
||||
|
@ -311,10 +320,10 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi
|
|||
|
||||
-- Scan all the ig in this project
|
||||
nlerror("Scan all the ig in this project")
|
||||
for node in geometry do
|
||||
for node in objects do
|
||||
(
|
||||
ig = getIg node
|
||||
nlerror("geometry node")
|
||||
nlerror("object node")
|
||||
if ( (ig != undefined) and (ig != "") and ( (igName == "") or (ig == igName) ) ) then
|
||||
(
|
||||
nlerror("Found something with an IG name")
|
||||
|
@ -347,71 +356,6 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi
|
|||
)
|
||||
)
|
||||
|
||||
for node in lights do
|
||||
(
|
||||
ig = getIg node
|
||||
|
||||
if ( (ig != undefined) and (ig != "") and ( (igName == "") or ( ig == igName) ) ) then
|
||||
(
|
||||
-- Transition ?
|
||||
if ( ig == IgName) then
|
||||
(
|
||||
-- Transform the object
|
||||
node.transform = buildTransitionMatrixObj node.transform transitionZone cellSize
|
||||
)
|
||||
|
||||
-- Found ?
|
||||
found = false
|
||||
|
||||
-- Already found ?
|
||||
for j = 1 to ig_array.count do
|
||||
(
|
||||
if (ig_array[j]==ig) then
|
||||
(
|
||||
found = true
|
||||
)
|
||||
)
|
||||
|
||||
-- Found ?
|
||||
if (found == false) then
|
||||
(
|
||||
append ig_array ig
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
for node in helpers do
|
||||
(
|
||||
ig = getIg node
|
||||
if ( (ig != undefined) and (ig != "") and ( (igName == "") or (ig == igName) ) ) then
|
||||
(
|
||||
-- Transition ?
|
||||
if (ig == IgName) then
|
||||
(
|
||||
-- Transform the object
|
||||
node.transform = buildTransitionMatrixObj node.transform transitionZone cellSize
|
||||
)
|
||||
|
||||
-- Found ?
|
||||
found = false
|
||||
-- Already found ?
|
||||
for j = 1 to ig_array.count do
|
||||
(
|
||||
if (ig_array[j]==ig) then
|
||||
(
|
||||
found = true
|
||||
)
|
||||
)
|
||||
-- Found ?
|
||||
if (found == false) then
|
||||
(
|
||||
append ig_array ig
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- Have some ig ?
|
||||
if (ig_array.count != 0) then
|
||||
(
|
||||
|
@ -429,6 +373,29 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi
|
|||
-- Select none
|
||||
max select none
|
||||
|
||||
for node in objects where classOf node == XRefObject do
|
||||
(
|
||||
if ((getIg node) == ig_array[ig]) then
|
||||
(
|
||||
sourceObject = node.GetSourceObject false
|
||||
if (classOf sourceObject == XRefObject) then
|
||||
(
|
||||
nlerror("FAIL XREF STILL XREF " + node.name)
|
||||
)
|
||||
else if (superclassOf sourceObject == GeometryClass) then
|
||||
(
|
||||
selectmore node
|
||||
)
|
||||
else if (superclassOf sourceObject == Helper) then
|
||||
(
|
||||
selectmore node
|
||||
)
|
||||
else if (superclassOf sourceObject == Light) then
|
||||
(
|
||||
selectmore node
|
||||
)
|
||||
)
|
||||
)
|
||||
-- Select all node in this ig
|
||||
for node in geometry do
|
||||
(
|
||||
|
@ -508,8 +475,8 @@ try
|
|||
for curFileName in MaxFilesList do
|
||||
(
|
||||
-- Free memory and file handles
|
||||
gc ()
|
||||
resetMAXFile #noprompt
|
||||
-- gc ()
|
||||
-- resetMAXFile #noprompt
|
||||
|
||||
|
||||
tokenArray = filterString (getFilenameFile curFileName) "-"
|
||||
|
@ -528,6 +495,7 @@ try
|
|||
|
||||
nlerror ("Scanning file "+curFileName+" ...")
|
||||
mergeMaxFile curFileName quiet:true
|
||||
objXRefMgr.UpdateAllRecords()
|
||||
|
||||
-- Unhide category
|
||||
unhidecategory()
|
||||
|
@ -622,6 +590,8 @@ try
|
|||
)
|
||||
|
||||
resetMAXFile #noprompt
|
||||
gc ()
|
||||
resetMAXFile #noprompt
|
||||
)
|
||||
else
|
||||
(
|
||||
|
@ -635,10 +605,10 @@ try
|
|||
for curFileName in MaxFilesList do
|
||||
(
|
||||
-- Free memory and file handles
|
||||
gc ()
|
||||
-- gc ()
|
||||
|
||||
-- Reset 3dsmax
|
||||
resetMAXFile #noprompt
|
||||
-- resetMAXFile #noprompt
|
||||
|
||||
tokenArray = filterString (getFilenameFile curFileName) "-"
|
||||
if (tokenArray.count == 4) and (tokenArray[1] == "zonetransition") then
|
||||
|
@ -672,6 +642,7 @@ try
|
|||
|
||||
nlerror ("Scanning file "+curFileName+" ...")
|
||||
mergeMaxFile curFileName quiet:true
|
||||
objXRefMgr.UpdateAllRecords()
|
||||
|
||||
-- Unhide category
|
||||
unhidecategory()
|
||||
|
@ -852,6 +823,8 @@ try
|
|||
)
|
||||
|
||||
resetMAXFile #noprompt
|
||||
gc ()
|
||||
resetMAXFile #noprompt
|
||||
)
|
||||
else
|
||||
(
|
||||
|
@ -865,8 +838,8 @@ try
|
|||
for curFileName in MaxFilesList do
|
||||
(
|
||||
-- Free memory and file handles
|
||||
gc ()
|
||||
resetMAXFile #noprompt
|
||||
-- gc ()
|
||||
-- resetMAXFile #noprompt
|
||||
|
||||
tokenArray = filterString (getFilenameFile curFileName) "-"
|
||||
if (tokenArray.count == 2) and (tokenArray[1] == "zonespecial") then
|
||||
|
@ -884,6 +857,7 @@ try
|
|||
|
||||
nlerror ("Scanning file "+curFileName+" ...")
|
||||
mergeMaxFile curFileName quiet:true
|
||||
objXRefMgr.UpdateAllRecords()
|
||||
|
||||
-- Unhide category
|
||||
unhidecategory()
|
||||
|
@ -971,6 +945,8 @@ try
|
|||
)
|
||||
|
||||
resetMAXFile #noprompt
|
||||
gc ()
|
||||
resetMAXFile #noprompt
|
||||
)
|
||||
else
|
||||
(
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
SUBDIRS(build_ig_boxes build_indoor_rbank build_rbank)
|
||||
IF(WITH_3D)
|
||||
ADD_SUBDIRECTORY(build_ig_boxes)
|
||||
|
||||
IF(WITH_LIGO)
|
||||
ADD_SUBDIRECTORY(build_rbank)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(build_indoor_rbank)
|
||||
|
|
|
@ -688,22 +688,27 @@ void updateWeather()
|
|||
}
|
||||
#endif
|
||||
|
||||
// FIXME: temporary fix for teleportation crash
|
||||
// Update new sky
|
||||
if (ContinentMngr.cur() && Driver->getPolygonMode() == UDriver::Filled && Filter3D[FilterSky])
|
||||
s_SkyMode = NoSky;
|
||||
if (ContinentMngr.cur() && !ContinentMngr.cur()->Indoor)
|
||||
{
|
||||
CSky &sky = ContinentMngr.cur()->CurrentSky;
|
||||
|
||||
if (!ContinentMngr.cur()->Indoor && sky.getScene())
|
||||
if(Driver->getPolygonMode() == UDriver::Filled)
|
||||
{
|
||||
s_SkyMode = NewSky;
|
||||
sky.getScene()->animate(TimeInSec-FirstTimeInSec);
|
||||
// Setup the sky camera
|
||||
preRenderNewSky();
|
||||
}
|
||||
else
|
||||
{
|
||||
s_SkyMode = OldSky;
|
||||
if (Filter3D[FilterSky])
|
||||
{
|
||||
CSky &sky = ContinentMngr.cur()->CurrentSky;
|
||||
if (sky.getScene())
|
||||
{
|
||||
s_SkyMode = NewSky;
|
||||
sky.getScene()->animate(TimeInSec-FirstTimeInSec);
|
||||
// Setup the sky camera
|
||||
preRenderNewSky();
|
||||
}
|
||||
else
|
||||
{
|
||||
s_SkyMode = OldSky;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2895,13 +2895,13 @@ uint32 CGameItem::maxDurability() const
|
|||
|
||||
// tools
|
||||
// SHEARS = pick for forage
|
||||
case ITEM_TYPE::SHEARS: return (uint32)CWeaponCraftParameters::ForageToolDurability;
|
||||
case ITEM_TYPE::AmmoTool: return (uint32)CWeaponCraftParameters::AmmoCraftingToolDurability;
|
||||
case ITEM_TYPE::ArmorTool: return (uint32)CWeaponCraftParameters::ArmorCraftingToolDurability;
|
||||
case ITEM_TYPE::JewelryTool: return (uint32)CWeaponCraftParameters::JewelryCraftingToolDurability;
|
||||
case ITEM_TYPE::MeleeWeaponTool:return (uint32)CWeaponCraftParameters::MeleeWeaponCraftingToolDurability;
|
||||
case ITEM_TYPE::RangeWeaponTool:return (uint32)CWeaponCraftParameters::RangeWeaponCraftingToolDurability;
|
||||
case ITEM_TYPE::ToolMaker: return (uint32)CWeaponCraftParameters::ToolCraftingToolDurability;
|
||||
case ITEM_TYPE::SHEARS: d = CWeaponCraftParameters::ForageToolDurability; break;
|
||||
case ITEM_TYPE::AmmoTool: d = CWeaponCraftParameters::AmmoCraftingToolDurability; break;
|
||||
case ITEM_TYPE::ArmorTool: d = CWeaponCraftParameters::ArmorCraftingToolDurability; break;
|
||||
case ITEM_TYPE::JewelryTool: d = CWeaponCraftParameters::JewelryCraftingToolDurability; break;
|
||||
case ITEM_TYPE::MeleeWeaponTool: d = CWeaponCraftParameters::MeleeWeaponCraftingToolDurability; break;
|
||||
case ITEM_TYPE::RangeWeaponTool: d = CWeaponCraftParameters::RangeWeaponCraftingToolDurability; break;
|
||||
case ITEM_TYPE::ToolMaker: d = CWeaponCraftParameters::ToolCraftingToolDurability; break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake
|
||||
* @subpackage cake.cake.libs.model.datasources.dbo
|
||||
* @since CakePHP(tm) v 0.9.0
|
||||
* @since CakePHP(tm) v 0.9.1
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue