mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Untangle MaxConvert
Fix compilation as a result of hsWindows. Also, add precompiled header support (this shaves off 9 seconds on my machine) and fix some warnings. As we saw in the PCH-ization of pfPython, includes were untangled (to some extent) and forward declarations were introduced where appropriate.
This commit is contained in:
@ -48,6 +48,7 @@ set(MaxConvert_SOURCES
|
||||
UserPropMgr.cpp
|
||||
)
|
||||
|
||||
use_precompiled_header(Pch.h Pch.cpp MaxConvert_HEADERS MaxConvert_SOURCES)
|
||||
add_library(MaxConvert STATIC ${MaxConvert_HEADERS} ${MaxConvert_SOURCES})
|
||||
|
||||
source_group("Header Files" FILES ${MaxConvert_HEADERS})
|
||||
|
51
Sources/Tools/MaxConvert/Pch.cpp
Normal file
51
Sources/Tools/MaxConvert/Pch.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "Pch.h"
|
||||
|
||||
/**
|
||||
* \file Pch.cpp
|
||||
* \brief Precompiled Header object for MaxConvert
|
||||
*
|
||||
* This file prompts MSVC to generate a PCH file for the MaxConvert project. It
|
||||
* has no function if precompiled headers are disabled in cmake.
|
||||
*/
|
101
Sources/Tools/MaxConvert/Pch.h
Normal file
101
Sources/Tools/MaxConvert/Pch.h
Normal file
@ -0,0 +1,101 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#ifndef _MaxConvert_Pch_inc_
|
||||
#define _MaxConvert_Pch_inc_
|
||||
|
||||
/**
|
||||
* \file Pch.h
|
||||
* \brief Precompiled Header for MaxConvert
|
||||
*/
|
||||
|
||||
// Standard Library
|
||||
#include <algorithm>
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
// Core Plasma
|
||||
#include "HeadSpin.h"
|
||||
#include "hsBitVector.h"
|
||||
#include "hsColorRGBA.h"
|
||||
#include "plgDispatch.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsFastMath.h"
|
||||
#include "hsGeometry3.h"
|
||||
#include "hsMatrix44.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "plString.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "plTweak.h"
|
||||
|
||||
// Windows
|
||||
#include "hsWindows.h"
|
||||
#include <CommCtrl.h>
|
||||
#include <commdlg.h>
|
||||
|
||||
// MaxComponent
|
||||
#include "MaxComponent/plComponent.h"
|
||||
|
||||
// 3ds Max SDK
|
||||
// This stuff should ALWAYS come after hsWindows.h
|
||||
#include <bmmlib.h>
|
||||
#include <dummy.h>
|
||||
#include <keyreduc.h>
|
||||
#include <INode.h>
|
||||
#include <ISkin.h>
|
||||
#include <istdplug.h>
|
||||
#include <iparamm2.h>
|
||||
#include <maxversion.h>
|
||||
#include <meshdlib.h>
|
||||
#include <modstack.h>
|
||||
#include <notify.h>
|
||||
#include <stdmat.h>
|
||||
#include <texutil.h>
|
||||
|
||||
#if MAX_VERSION_MAJOR >= 13
|
||||
# include <INamedSelectionSetManager.h>
|
||||
#endif
|
||||
|
||||
#endif // _MaxConvert_Pch_inc_
|
@ -39,10 +39,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
// StringTokenizer.cpp
|
||||
|
||||
#include <string.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
#include "string.h"
|
||||
|
||||
// String Tokenizer routines
|
||||
StringTokenizer::StringTokenizer() {
|
||||
@ -81,7 +82,7 @@ char *StringTokenizer::next() {
|
||||
};
|
||||
bool StringTokenizer::isSep(char c) {
|
||||
if (!qAsTok || !inQuote) {
|
||||
for (int32_t i=0; i<numSeps; i++) {
|
||||
for (int i=0; i<numSeps; i++) {
|
||||
if (seps[i] == c) return true;
|
||||
}
|
||||
}
|
||||
|
@ -43,14 +43,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef _STRING_TOKENIZER_H_
|
||||
#define _STRING_TOKENIZER_H_
|
||||
|
||||
#include "Headspin.h"
|
||||
|
||||
class StringTokenizer {
|
||||
private:
|
||||
char *seps;
|
||||
char *tok;
|
||||
bool isSep(char c);
|
||||
int32_t numSeps;
|
||||
int numSeps;
|
||||
bool qAsTok;
|
||||
bool inQuote;
|
||||
public:
|
||||
|
@ -39,12 +39,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
// UserPropMgr.cpp
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsWindows.h"
|
||||
#include <max.h>
|
||||
#include "UserPropMgr.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
|
||||
#include "hsHashTable.h"
|
||||
|
||||
#define REFMSG_USERPROP (REFMSG_USER + 1)
|
||||
@ -69,7 +69,7 @@ UserPropMgr::~UserPropMgr()
|
||||
CloseQuickTable();
|
||||
}
|
||||
|
||||
void UserPropMgr::SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const int32_t hFlag)
|
||||
void UserPropMgr::SetUserPropFlag(INode *node, const char *name, const bool setFlag, const int32_t hFlag)
|
||||
{
|
||||
if (setFlag) SetUserProp(node,name,NULL,hFlag);
|
||||
else ClearUserProp(node,name,hFlag);
|
||||
@ -83,7 +83,7 @@ void UserPropMgr::ClearUserPropALL(const char *name, const int32_t hFlag)
|
||||
}
|
||||
}
|
||||
|
||||
void UserPropMgr::SelectUserPropFlagALL(INode *node, const char *name, const BOOL flag) {
|
||||
void UserPropMgr::SelectUserPropFlagALL(INode *node, const char *name, const bool flag) {
|
||||
if (node)
|
||||
{
|
||||
if (UserPropExists(node,name) == flag) ip->SelectNode(node,false);
|
||||
@ -96,7 +96,7 @@ void UserPropMgr::SelectUserPropFlagALL(INode *node, const char *name, const BOO
|
||||
|
||||
|
||||
void UserPropMgr::DeSelectWithOut(const char *name, const char *value) {
|
||||
BOOL oldProps = vProps;
|
||||
bool oldProps = vProps;
|
||||
vProps=false;
|
||||
TSTR val;
|
||||
INode *nodes[1];
|
||||
@ -169,7 +169,7 @@ ip->ThawSelection();
|
||||
|
||||
|
||||
|
||||
int UserPropMgr::RecursiveCountAlike(INode *node, BOOL MatchAll) {
|
||||
int UserPropMgr::RecursiveCountAlike(INode *node, bool MatchAll) {
|
||||
int count=0;
|
||||
if (node) {
|
||||
if (!node->IsNodeHidden() && !node->IsFrozen() && IsAlike(node,MatchAll)) count++;
|
||||
@ -182,18 +182,18 @@ int UserPropMgr::RecursiveCountAlike(INode *node, BOOL MatchAll) {
|
||||
}
|
||||
|
||||
|
||||
int UserPropMgr::CountAlike(BOOL MatchAll) {
|
||||
int UserPropMgr::CountAlike(bool MatchAll) {
|
||||
return RecursiveCountAlike(NULL, MatchAll);
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::IsMatch(const char *val1, const char *val2) {
|
||||
bool UserPropMgr::IsMatch(const char *val1, const char *val2) {
|
||||
if (!stricmp(val1,val2)) return true;
|
||||
hsStringTokenizer toker(val1," ,@");
|
||||
char *tok;
|
||||
|
||||
while (tok=toker.next()) {
|
||||
hsStringTokenizer toker2(val2," ,@");
|
||||
BOOL found = false;
|
||||
bool found = false;
|
||||
char *tok2;
|
||||
while ((tok2=toker2.next()) && !found) {
|
||||
if (tok[0] >= '1' && tok[0] <= '0') {
|
||||
@ -210,11 +210,11 @@ BOOL UserPropMgr::IsMatch(const char *val1, const char *val2) {
|
||||
}
|
||||
|
||||
|
||||
BOOL UserPropMgr::IsAlike(INode *node, BOOL MatchAll) {
|
||||
bool UserPropMgr::IsAlike(INode *node, bool MatchAll) {
|
||||
TSTR buf;
|
||||
GetUserPropBuffer(node,buf);
|
||||
|
||||
BOOL oldProps = vProps;
|
||||
bool oldProps = vProps;
|
||||
vProps=false;
|
||||
|
||||
hsStringTokenizer toker(buf," \r\n");
|
||||
@ -223,7 +223,7 @@ BOOL UserPropMgr::IsAlike(INode *node, BOOL MatchAll) {
|
||||
TSTR name;
|
||||
TSTR value;
|
||||
TSTR tval;
|
||||
BOOL match = MatchAll;
|
||||
bool match = MatchAll;
|
||||
bool isName = true;
|
||||
tok = toker.next();
|
||||
while (tok && (match==MatchAll)) {
|
||||
@ -304,14 +304,14 @@ void UserPropMgr::SetUserPropBuffer(INode *node, const TSTR &buf)
|
||||
}
|
||||
}
|
||||
|
||||
void UserPropMgr::SetUserPropFlagALL(const char *name, const BOOL setFlag, const int32_t hFlag)
|
||||
void UserPropMgr::SetUserPropFlagALL(const char *name, const bool setFlag, const int32_t hFlag)
|
||||
{
|
||||
for (int i=0; i<GetSelNodeCount();i++)
|
||||
{
|
||||
SetUserPropFlag(GetSelNode(i),name,setFlag,hFlag);
|
||||
}
|
||||
}
|
||||
BOOL UserPropMgr::GetUserPropFlagALL(const char *name, BOOL &isSet, const int32_t hFlag)
|
||||
bool UserPropMgr::GetUserPropFlagALL(const char *name, bool &isSet, const int32_t hFlag)
|
||||
{
|
||||
isSet = UserPropMgr::UserPropExists(GetSelNode(0),name,hFlag);
|
||||
|
||||
@ -419,7 +419,7 @@ void UserPropMgr::ClearUserProp(INode *node, const char *name, const int32_t hFl
|
||||
}
|
||||
};
|
||||
|
||||
BOOL UserPropMgr::GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag)
|
||||
bool UserPropMgr::GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag)
|
||||
{
|
||||
node = GetAncestorIfNeeded(node,hFlag);
|
||||
|
||||
@ -575,7 +575,7 @@ void UserPropMgr::SetUserProp(INode *node, const char *name, const char *value,
|
||||
}
|
||||
|
||||
|
||||
BOOL UserPropMgr::GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag)
|
||||
bool UserPropMgr::GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag)
|
||||
{
|
||||
return GetUserProp(node,name,value,hFlag);
|
||||
}
|
||||
@ -583,7 +583,7 @@ void UserPropMgr::SetUserPropString(INode *node, const char *name, const char *v
|
||||
{
|
||||
SetUserProp(node,name,value,hFlag);
|
||||
}
|
||||
BOOL UserPropMgr::GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag)
|
||||
bool UserPropMgr::GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag)
|
||||
{
|
||||
TSTR valStr;
|
||||
if (GetUserProp(node,name,valStr,hFlag))
|
||||
@ -598,7 +598,7 @@ void UserPropMgr::SetUserPropFloat(INode *node, const char *name, const float va
|
||||
char valStr[50];
|
||||
if (sprintf(valStr,"%g",value)) SetUserProp(node,name,valStr,hFlag);
|
||||
}
|
||||
BOOL UserPropMgr::GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag)
|
||||
bool UserPropMgr::GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag)
|
||||
{
|
||||
TSTR valStr;
|
||||
if (GetUserProp(node,name,valStr,hFlag)) {
|
||||
@ -613,13 +613,13 @@ void UserPropMgr::SetUserPropInt(INode *node, const char *name, const int value,
|
||||
if (sprintf(valStr,"%d",value)) SetUserProp(node,name,valStr,hFlag);
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::UserPropExists(INode *node, const char *name, const int32_t hFlag)
|
||||
bool UserPropMgr::UserPropExists(INode *node, const char *name, const int32_t hFlag)
|
||||
{
|
||||
TSTR value;
|
||||
return GetUserProp(node,name,value,hFlag);
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetUserPropStringList(INode *node, const char *name, int &num, TSTR list[]) {
|
||||
bool UserPropMgr::GetUserPropStringList(INode *node, const char *name, int &num, TSTR list[]) {
|
||||
TSTR sdata;
|
||||
if (UserPropMgr::GetUserPropString(node,name,sdata)) {
|
||||
num=0;
|
||||
@ -633,7 +633,7 @@ BOOL UserPropMgr::GetUserPropStringList(INode *node, const char *name, int &num,
|
||||
} else return false;
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetUserPropIntList(INode *node, const char *name, int &num, int list[]) {
|
||||
bool UserPropMgr::GetUserPropIntList(INode *node, const char *name, int &num, int list[]) {
|
||||
TSTR sdata;
|
||||
if (UserPropMgr::GetUserPropString(node,name,sdata)) {
|
||||
num=0;
|
||||
@ -647,7 +647,7 @@ BOOL UserPropMgr::GetUserPropIntList(INode *node, const char *name, int &num, in
|
||||
} else return false;
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetUserPropFloatList(INode *node, const char *name, int &num, float list[]) {
|
||||
bool UserPropMgr::GetUserPropFloatList(INode *node, const char *name, int &num, float list[]) {
|
||||
TSTR sdata;
|
||||
if (UserPropMgr::GetUserPropString(node,name,sdata)) {
|
||||
num=0;
|
||||
@ -661,13 +661,13 @@ BOOL UserPropMgr::GetUserPropFloatList(INode *node, const char *name, int &num,
|
||||
} else return false;
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag)
|
||||
bool UserPropMgr::GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag)
|
||||
{
|
||||
BOOL propSet = UserPropMgr::GetUserPropString(GetSelNode(0),name,value,hFlag);
|
||||
bool propSet = UserPropMgr::GetUserPropString(GetSelNode(0),name,value,hFlag);
|
||||
|
||||
TSTR tvalue;
|
||||
int i=1;
|
||||
BOOL propMixed = FALSE;
|
||||
bool propMixed = FALSE;
|
||||
while (i < GetSelNodeCount() && !propMixed) {
|
||||
if (propSet ^ UserPropMgr::GetUserPropString(GetSelNode(i),name,tvalue,hFlag)) propMixed = TRUE;
|
||||
propMixed = (!(value == tvalue));
|
||||
@ -683,25 +683,25 @@ void UserPropMgr::SetUserPropStringALL(const char *name, const char *value, cons
|
||||
}
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetUserPropStringListALL(const char *name, int &num, TSTR list[]) {
|
||||
bool UserPropMgr::GetUserPropStringListALL(const char *name, int &num, TSTR list[]) {
|
||||
TSTR val;
|
||||
GetUserPropStringList(GetSelNode(0),name,num,list);
|
||||
return GetUserPropStringALL(name,val);
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetUserPropIntListALL(const char *name, int &num, int *list) {
|
||||
bool UserPropMgr::GetUserPropIntListALL(const char *name, int &num, int *list) {
|
||||
TSTR val;
|
||||
GetUserPropIntList(GetSelNode(0),name,num,list);
|
||||
return GetUserPropStringALL(name,val);
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetUserPropFloatListALL(const char *name, int &num, float *list) {
|
||||
bool UserPropMgr::GetUserPropFloatListALL(const char *name, int &num, float *list) {
|
||||
TSTR val;
|
||||
GetUserPropFloatList(GetSelNode(0),name,num,list);
|
||||
return GetUserPropStringALL(name,val);
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::GetNodeNameALL(TSTR &name) {
|
||||
bool UserPropMgr::GetNodeNameALL(TSTR &name) {
|
||||
if (vProps) name = vname;
|
||||
else if (ip->GetSelNodeCount() == 1) name = ip->GetSelNode(0)->GetName();
|
||||
else return false;
|
||||
@ -725,7 +725,7 @@ void UserPropMgr::SetNodeNameALL(const char *name) {
|
||||
}
|
||||
|
||||
|
||||
void UserPropMgr::LoadVirtualProps(BOOL reset) {
|
||||
void UserPropMgr::LoadVirtualProps(bool reset) {
|
||||
if (reset)
|
||||
{
|
||||
vbuf = "";
|
||||
@ -736,7 +736,7 @@ void UserPropMgr::LoadVirtualProps(BOOL reset) {
|
||||
void UserPropMgr::DestroyVirtualProps() {
|
||||
vProps = false;
|
||||
}
|
||||
BOOL UserPropMgr::IsVirtual() {
|
||||
bool UserPropMgr::IsVirtual() {
|
||||
return vProps;
|
||||
}
|
||||
|
||||
@ -837,7 +837,7 @@ void UserPropMgr::IBuildQuickTable(INode* node)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL UserPropMgr::ICheckQuickEntry(const char *key, TSTR &value)
|
||||
bool UserPropMgr::ICheckQuickEntry(const char *key, TSTR &value)
|
||||
{
|
||||
QuickPair q;
|
||||
q.SetKey(key);
|
||||
|
@ -44,10 +44,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef _USERPROPMGR_H_
|
||||
#define _USERPROPMGR_H_
|
||||
|
||||
#include "Max.h"
|
||||
#include "HeadSpin.h"
|
||||
|
||||
template <class T> class hsHashTable;
|
||||
class Interface;
|
||||
class NameMaker;
|
||||
class INode;
|
||||
|
||||
class UserPropMgr {
|
||||
public:
|
||||
@ -64,40 +66,40 @@ public:
|
||||
|
||||
NameMaker *nm;
|
||||
|
||||
void SetUserPropFlag(INode *node, const char *name, const BOOL setFlag, const int32_t hFlag=kMe);
|
||||
void SetUserPropFlag(INode *node, const char *name, const bool setFlag, const int32_t hFlag=kMe);
|
||||
|
||||
void SelectUserPropFlagALL(INode *node, const char *name, const BOOL flag);
|
||||
void SelectUserPropFlagALL(INode *node, const char *name, const bool flag);
|
||||
void ClearUserProp(INode *node, const char *name, const int32_t hFlag=kMe);
|
||||
void ClearUserPropALL(const char *name, const int32_t hFlag=kMe);
|
||||
void SetUserPropFlagALL(const char *name, const BOOL setFlag, const int32_t hFlag=kMe);
|
||||
BOOL GetUserPropFlagALL(const char *name, BOOL &isSet, const int32_t hFlag=kMe);
|
||||
void SetUserPropFlagALL(const char *name, const bool setFlag, const int32_t hFlag=kMe);
|
||||
bool GetUserPropFlagALL(const char *name, bool &isSet, const int32_t hFlag=kMe);
|
||||
|
||||
BOOL GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe);
|
||||
bool GetUserProp(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe);
|
||||
void SetUserProp(INode *node, const char *name, const char *value, const int32_t hFlag=kMe);
|
||||
BOOL UserPropExists(INode *node, const char *name, const int32_t hFlag=kMe);
|
||||
bool UserPropExists(INode *node, const char *name, const int32_t hFlag=kMe);
|
||||
|
||||
BOOL GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe);
|
||||
bool GetUserPropString(INode *node, const char *name, TSTR &value, const int32_t hFlag=kMe);
|
||||
void SetUserPropString(INode *node, const char *name, const char *value, const int32_t hFlag=kMe);
|
||||
BOOL GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag=kMe);
|
||||
bool GetUserPropFloat(INode *node, const char *name, float &value, const int32_t hFlag=kMe);
|
||||
void SetUserPropFloat(INode *node, const char *name, const float value, const int32_t hFlag=kMe);
|
||||
BOOL GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag=kMe);
|
||||
bool GetUserPropInt(INode *node, const char *name, int &value, const int32_t hFlag=kMe);
|
||||
void SetUserPropInt(INode *node, const char *name, const int value, const int32_t hFlag=kMe);
|
||||
BOOL GetUserPropStringList(INode *node, const char *name, int &num, TSTR list[]);
|
||||
BOOL GetUserPropIntList(INode *node, const char *name, int &num, int list[]);
|
||||
BOOL GetUserPropFloatList(INode *node, const char *name, int &num, float list[]);
|
||||
bool GetUserPropStringList(INode *node, const char *name, int &num, TSTR list[]);
|
||||
bool GetUserPropIntList(INode *node, const char *name, int &num, int list[]);
|
||||
bool GetUserPropFloatList(INode *node, const char *name, int &num, float list[]);
|
||||
|
||||
BOOL GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag=kMe);
|
||||
bool GetUserPropStringALL(const char *name, TSTR &value, const int32_t hFlag=kMe);
|
||||
void SetUserPropStringALL(const char *name, const char *value, const int32_t hFlag=kMe);
|
||||
BOOL GetUserPropStringListALL(const char *name, int &num, TSTR list[]);
|
||||
BOOL GetUserPropIntListALL(const char *name, int &num, int *list);
|
||||
BOOL GetUserPropFloatListALL(const char *name, int &num, float *list);
|
||||
bool GetUserPropStringListALL(const char *name, int &num, TSTR list[]);
|
||||
bool GetUserPropIntListALL(const char *name, int &num, int *list);
|
||||
bool GetUserPropFloatListALL(const char *name, int &num, float *list);
|
||||
|
||||
BOOL GetNodeNameALL(TSTR &name);
|
||||
bool GetNodeNameALL(TSTR &name);
|
||||
void SetNodeNameALL(const char *name);
|
||||
|
||||
void LoadVirtualProps(BOOL reset=true);
|
||||
void LoadVirtualProps(bool reset=true);
|
||||
void DestroyVirtualProps();
|
||||
BOOL IsVirtual();
|
||||
bool IsVirtual();
|
||||
|
||||
int GetSelNodeCount();
|
||||
INode *GetSelNode(int i);
|
||||
@ -106,8 +108,8 @@ public:
|
||||
void GetUserPropBuffer(INode *node, TSTR &buf);
|
||||
void SetUserPropBuffer(INode *node, const TSTR &buf);
|
||||
|
||||
BOOL IsAlike(INode *node, BOOL MatchAll=true);
|
||||
int CountAlike(BOOL MatchAll=true);
|
||||
bool IsAlike(INode *node, bool MatchAll=true);
|
||||
int CountAlike(bool MatchAll=true);
|
||||
void DeSelectUnAlike(INode *node=NULL);
|
||||
|
||||
Interface *GetInterface() { return ip; }
|
||||
@ -119,9 +121,9 @@ private:
|
||||
INode* GetAncestorIfNeeded(INode* node, const int32_t hFlag);
|
||||
void DeSelectWithOut(const char *name, const char *value);
|
||||
void RecursiveSelectAll(INode *node = NULL);
|
||||
int RecursiveCountAlike(INode *node = NULL, BOOL MatchAll=true);
|
||||
BOOL IsMatch(const char *val1, const char *val2);
|
||||
BOOL vProps;
|
||||
int RecursiveCountAlike(INode *node = NULL, bool MatchAll=true);
|
||||
bool IsMatch(const char *val1, const char *val2);
|
||||
bool vProps;
|
||||
TSTR vbuf;
|
||||
TSTR vname;
|
||||
|
||||
@ -150,7 +152,7 @@ private:
|
||||
static const uint32_t kQuickSize;
|
||||
INode* fQuickNode;
|
||||
void IBuildQuickTable(INode* node);
|
||||
BOOL ICheckQuickEntry(const char *key, TSTR &value);
|
||||
bool ICheckQuickEntry(const char *key, TSTR &value);
|
||||
|
||||
Interface *ip;
|
||||
|
||||
|
@ -41,18 +41,21 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
#include <commdlg.h>
|
||||
#include <math.h>
|
||||
#include <stdmat.h>
|
||||
#include <bmmlib.h>
|
||||
#include <istdplug.h>
|
||||
#include <texutil.h>
|
||||
#include <iparamb2.h>
|
||||
#include <modstack.h>
|
||||
#include <keyreduc.h>
|
||||
#pragma hdrstop
|
||||
|
||||
//#include "Max.h"
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
#include "stdmat.h"
|
||||
#include "bmmlib.h"
|
||||
#include "istdplug.h"
|
||||
#include "texutil.h"
|
||||
#include "iparamb2.h"
|
||||
#include "modstack.h"
|
||||
#include "keyreduc.h"
|
||||
|
||||
#include "hsMaxLayerBase.h"
|
||||
#include "plInterp/plController.h"
|
||||
@ -62,7 +65,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsControlConverter.h"
|
||||
#include "hsMaterialConverter.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "MaxExport/plErrorMsg.h"
|
||||
#include "MaxComponent/plNoteTrackAnim.h"
|
||||
#include "MaxComponent/plCameraComponents.h"
|
||||
@ -2100,11 +2102,8 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray <hsG
|
||||
{
|
||||
TimeValue t = TimeValue(GetTicksPerFrame() * (kfArray[0][i].fFrame));
|
||||
theCam = (GenCamera *) obj->ConvertToType(t, Class_ID(LOOKAT_CAM_CLASS_ID, 0));
|
||||
float FOVvalue= 0.0; //Currently in Radians
|
||||
// radians
|
||||
FOVvalue = theCam->GetFOV(t);
|
||||
// convert
|
||||
FOVvalue = FOVvalue*(180/3.141592);
|
||||
float FOVvalue= theCam->GetFOV(t); // in radians
|
||||
FOVvalue *= (float)(180.f / M_PI); // to degrees
|
||||
int FOVType = theCam->GetFOVType();
|
||||
float wDeg, hDeg;
|
||||
switch(FOVType)
|
||||
|
@ -42,18 +42,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef __HSCONTROLCONVERTER_H
|
||||
#define __HSCONTROLCONVERTER_H
|
||||
|
||||
#include <commdlg.h>
|
||||
#include <math.h>
|
||||
|
||||
//#include "Max.h"
|
||||
#include "stdmat.h"
|
||||
#include "bmmlib.h"
|
||||
#include "istdplug.h"
|
||||
#include "texutil.h"
|
||||
#include "plInterp/hsKeys.h"
|
||||
#include "hsTemplates.h"
|
||||
|
||||
class Animatable;
|
||||
class plCompoundController;
|
||||
class Control;
|
||||
class plController;
|
||||
class hsConverterUtils;
|
||||
class plErrorMsg;
|
||||
class Interface;
|
||||
struct hsKeyFrame;
|
||||
class plLeafController;
|
||||
class Matrix3;
|
||||
class plMaxNode;
|
||||
class IParamBlock2;
|
||||
class plSceneObject;
|
||||
class StdUVGen;
|
||||
|
||||
enum ControllerType
|
||||
{
|
||||
@ -75,13 +79,6 @@ enum ControllerType
|
||||
ctrlTypeRollAngle,
|
||||
};
|
||||
|
||||
class plController;
|
||||
class plLeafController;
|
||||
class plCompoundController;
|
||||
struct hsKeyFrame;
|
||||
class hsConverterUtils;
|
||||
class plSceneObject;
|
||||
|
||||
class hsControlConverter
|
||||
{
|
||||
private:
|
||||
|
@ -41,35 +41,33 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsHashTable.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <max.h>
|
||||
#include <stdmat.h>
|
||||
#if MAX_VERSION_MAJOR >= 13
|
||||
# include <INamedSelectionSetManager.h>
|
||||
#endif
|
||||
#pragma hdrstop
|
||||
|
||||
#include "hsConverterUtils.h"
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#include "hsMaxLayerBase.h"
|
||||
#include "plInterp/plController.h"
|
||||
|
||||
#include "MaxExport/plErrorMsg.h"
|
||||
#include "UserPropMgr.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
//#include "hsDXTDirectXCodec.h"
|
||||
//#include "hsDXTSoftwareCodec.h"
|
||||
#include "plGImage/hsCodecManager.h"
|
||||
///#include "SwitchUtil.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsHashTable.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "pnKeyedObject/hsKeyedObject.h"
|
||||
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#if MAX_VERSION_MAJOR >= 13
|
||||
#include <INamedSelectionSetManager.h>
|
||||
#endif
|
||||
|
||||
const char hsConverterUtils::fTagSeps[] = " ,\t\n=:;";
|
||||
|
||||
extern UserPropMgr gUserPropMgr;
|
||||
@ -577,5 +575,3 @@ bool hsConverterUtils::CacheNode::operator==(const CacheNode& other) const
|
||||
else
|
||||
return !_stricmp(k1,k2);
|
||||
}
|
||||
|
||||
#endif // HS_BUILD_FOR_WIN32
|
||||
|
@ -42,20 +42,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef __HSCONVERTERUTILS_H
|
||||
#define __HSCONVERTERUTILS_H
|
||||
|
||||
#include "Max.h"
|
||||
#include "stdmat.h"
|
||||
#include <commdlg.h>
|
||||
#include "bmmlib.h"
|
||||
#include "istdplug.h"
|
||||
#include "texutil.h"
|
||||
|
||||
#include "Headspin.h"
|
||||
|
||||
class INode;
|
||||
class Control;
|
||||
class INode;
|
||||
class Interface;
|
||||
template <class T> class hsHashTable;
|
||||
|
||||
template <class T> class hsHashTable;
|
||||
class hsMaxLayerBase;
|
||||
class plSimplePosController;
|
||||
class plScalarController;
|
||||
@ -120,7 +111,7 @@ private:
|
||||
plErrorMsg *fErrorMsg;
|
||||
|
||||
bool fSuppressMangling;
|
||||
uint32_t fWarned;
|
||||
uint32_t fWarned;
|
||||
bool fSave;
|
||||
|
||||
struct CacheNode
|
||||
|
@ -40,21 +40,30 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsMaterialConverter.h"
|
||||
#include <commdlg.h>
|
||||
#include "HeadSpin.h"
|
||||
#include "plgDispatch.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
#include "hsTemplates.h"
|
||||
|
||||
#include "MaxComponent/plComponent.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "Max.h"
|
||||
#include "stdmat.h"
|
||||
#include "bmmlib.h"
|
||||
#include "istdplug.h"
|
||||
#include "texutil.h"
|
||||
#include <commdlg.h>
|
||||
#include <bmmlib.h>
|
||||
#include <istdplug.h>
|
||||
#include <pbbitmap.h>
|
||||
#include <stdmat.h>
|
||||
#include <texutil.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "hsMaterialConverter.h"
|
||||
#include "plLayerConverter.h"
|
||||
#include "MaxComponent/plMaxAnimUtils.h"
|
||||
#include "plResMgr/plKeyFinder.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "pnKeyedObject/plUoid.h"
|
||||
|
||||
#include "hsMaxLayerBase.h"
|
||||
@ -70,15 +79,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "MaxMain/MaxCompat.h"
|
||||
|
||||
#include "plInterp/plController.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
#include "plSurface/plLayerInterface.h"
|
||||
#include "plSurface/plLayer.h"
|
||||
#include "plSurface/plLayerAnimation.h"
|
||||
#include "plGImage/plMipmap.h"
|
||||
|
||||
#include "plgDispatch.h"
|
||||
|
||||
#include "pnMessage/plRefMsg.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "pnKeyedObject/plKeyImp.h"
|
||||
@ -1124,8 +1129,6 @@ hsGMaterial *hsMaterialConverter::ICreateMaterial(Mtl *mtl, plMaxNode *node, con
|
||||
hsGuardEnd;
|
||||
}
|
||||
|
||||
#include "MaxPlasmaMtls/Materials/plMultipassMtl.h"
|
||||
|
||||
//
|
||||
// Handle materials for normal non-light, non-particle nodes.
|
||||
//
|
||||
@ -2369,7 +2372,7 @@ bool hsMaterialConverter::IProcessPlasmaMaterial(Mtl *mtl, plMaxNode *node, hsGM
|
||||
if (passBase->GetUseSpec())
|
||||
{
|
||||
shadeFlags |= hsGMatState::kShadeSpecular;
|
||||
shine = passBase->GetShine();
|
||||
shine = (float)passBase->GetShine();
|
||||
specColor = passBase->GetSpecularColor();
|
||||
}
|
||||
|
||||
@ -2630,7 +2633,6 @@ void hsMaterialConverter::IAddLayerToMaterial(hsGMaterial *mat, plLayerInterface
|
||||
//
|
||||
// Functions called by the converters up above...
|
||||
//
|
||||
#include "MaxPlasmaMtls/Layers/plLayerTex.h"
|
||||
|
||||
//// IMustBeUniqueMaterial ////////////////////////////////////////////////////
|
||||
// Fun stuff here. If one of the layers of the material is a dynamic EnvMap,
|
||||
@ -4246,7 +4248,7 @@ bool hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation(plMaxNode* nod
|
||||
{
|
||||
plPassMtlBase* passMtl = (plPassMtlBase*)subMtl;
|
||||
if( plPassMtlBase::kBlendAlpha == passMtl->GetOutputBlend() )
|
||||
baseOpac = passMtl->GetOpacity();
|
||||
baseOpac = (float)passMtl->GetOpacity();
|
||||
}
|
||||
int iMtl;
|
||||
for( iMtl = 1; iMtl < mtl->NumSubMtls(); iMtl++ )
|
||||
@ -4259,7 +4261,7 @@ bool hsMaterialConverter::HasMaterialDiffuseOrOpacityAnimation(plMaxNode* nod
|
||||
{
|
||||
if( baseOpac >= 0 )
|
||||
return true;
|
||||
baseOpac = passMtl->GetOpacity();
|
||||
baseOpac = (float)passMtl->GetOpacity();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4536,12 +4538,12 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co
|
||||
|
||||
Color tint1 = mtl->GetDefaultTint1();
|
||||
Color tint2 = mtl->GetDefaultTint2();
|
||||
cloth->fDefaultTint1[0] = tint1.r * 255;
|
||||
cloth->fDefaultTint1[1] = tint1.g * 255;
|
||||
cloth->fDefaultTint1[2] = tint1.b * 255;
|
||||
cloth->fDefaultTint2[0] = tint2.r * 255;
|
||||
cloth->fDefaultTint2[1] = tint2.g * 255;
|
||||
cloth->fDefaultTint2[2] = tint2.b * 255;
|
||||
cloth->fDefaultTint1[0] = (uint8_t)(tint1.r * 255.f);
|
||||
cloth->fDefaultTint1[1] = (uint8_t)(tint1.g * 255.f);
|
||||
cloth->fDefaultTint1[2] = (uint8_t)(tint1.b * 255.f);
|
||||
cloth->fDefaultTint2[0] = (uint8_t)(tint2.r * 255.f);
|
||||
cloth->fDefaultTint2[1] = (uint8_t)(tint2.g * 255.f);
|
||||
cloth->fDefaultTint2[2] = (uint8_t)(tint2.b * 255.f);
|
||||
|
||||
clothKeyName = plString::Format("CItm_%s", cloth->fName);
|
||||
hsgResMgr::ResMgr()->NewKey(clothKeyName, cloth, loc);
|
||||
|
@ -43,11 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#define __HSMATERIALCONVERTER_H
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsTemplates.h"
|
||||
|
||||
#include "Max.h"
|
||||
|
||||
class Interface;
|
||||
|
||||
class hsStream;
|
||||
class hsScene;
|
||||
@ -64,19 +59,21 @@ class plBitmap;
|
||||
class plMipmap;
|
||||
class plErrorMsg;
|
||||
class plString;
|
||||
|
||||
class Mtl;
|
||||
class Texmap;
|
||||
class plMaxNode;
|
||||
class StdUVGen;
|
||||
class BitmapTex;
|
||||
class StdMat;
|
||||
class TSTR;
|
||||
class Animatable;
|
||||
class Bitmap;
|
||||
class plLocation;
|
||||
|
||||
class Animatable;
|
||||
struct BMM_Color_64;
|
||||
class Bitmap;
|
||||
class BitmapTex;
|
||||
class Color;
|
||||
class Interface;
|
||||
class Mtl;
|
||||
class Point3;
|
||||
class StdMat;
|
||||
class StdUVGen;
|
||||
class Texmap;
|
||||
|
||||
class plMaxNode;
|
||||
class plLayerTex;
|
||||
class plBitmapData;
|
||||
class plCubicRenderTarget;
|
||||
|
@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef __HSMAXLAYERBASE_H
|
||||
#define __HSMAXLAYERBASE_H
|
||||
|
||||
#include "stdmat.h"
|
||||
|
||||
#define HSMAX_LAYER_CLASS_ID 0x41990fe7
|
||||
|
||||
const Class_ID hsMaxLayerClassID(HSMAX_LAYER_CLASS_ID, 0x72404998);
|
||||
|
@ -52,18 +52,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#include "Max.h"
|
||||
#include "stdmat.h"
|
||||
#include "istdplug.h"
|
||||
#include "dummy.h"
|
||||
#include "notetrck.h"
|
||||
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
#include "hsBitVector.h"
|
||||
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsMatrix44.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include <Max.h>
|
||||
#include <stdmat.h>
|
||||
#include <istdplug.h>
|
||||
#include <dummy.h>
|
||||
#include <notetrck.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
#include "plSurface/hsGMaterial.h"
|
||||
|
||||
#include "UserPropMgr.h"
|
||||
@ -72,7 +74,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsControlConverter.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "plSurface/hsGMaterial.h"
|
||||
#include "plSurface/plLayerInterface.h"
|
||||
|
||||
|
@ -39,10 +39,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "max.h"
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include <Max.h>
|
||||
#include <commdlg.h>
|
||||
#include "bmmlib.h"
|
||||
#include <bmmlib.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "plGImage/plMipmap.h"
|
||||
#include "hsExceptionStack.h"
|
||||
|
@ -39,16 +39,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include "HeadSpin.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
|
||||
class BitmapInfo;
|
||||
class Bitmap;
|
||||
class plBitmap;
|
||||
class plErrorMsg;
|
||||
class plKey;
|
||||
class plLocation;
|
||||
class plMipmap;
|
||||
class hsMaxLayerBase;
|
||||
class plLocation;
|
||||
class plErrorMsg;
|
||||
|
||||
|
||||
class plBitmapData
|
||||
|
@ -41,21 +41,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include <commdlg.h>
|
||||
#include "hsColorRGBA.h"
|
||||
#include "hsGeometry3.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "plTweak.h"
|
||||
|
||||
#include "Max.h"
|
||||
#include "stdmat.h"
|
||||
#include "bmmlib.h"
|
||||
#include "iparamb2.h"
|
||||
#include "meshdlib.h"
|
||||
#include "MaxComponent/plComponent.h"
|
||||
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <commdlg.h>
|
||||
#include <stdmat.h>
|
||||
#include <bmmlib.h>
|
||||
#include <iparamm2.h>
|
||||
#include <meshdlib.h>
|
||||
#include <vector>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
#include "MaxComponent/plComponent.h"
|
||||
#include "MaxComponent/plLightGrpComponent.h"
|
||||
#include "MaxComponent/plSoftVolumeComponent.h"
|
||||
|
||||
@ -76,13 +78,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsVertexShader.h"
|
||||
#include "plLightMapGen.h"
|
||||
|
||||
#include "hsResMgr.h"
|
||||
#include "pnKeyedObject/plUoid.h"
|
||||
|
||||
#include "pnMessage/plNodeRefMsg.h"
|
||||
|
||||
#include "plTweak.h"
|
||||
|
||||
plConst(int) kDefMinFaces(200);
|
||||
plConst(int) kDefMaxFaces(1000);
|
||||
plConst(float) kDefMinSize(50.f);
|
||||
|
@ -43,17 +43,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plClusterUtil_inc
|
||||
#define plClusterUtil_inc
|
||||
|
||||
#include "hsGeometry3.h"
|
||||
#include "hsColorRGBA.h"
|
||||
|
||||
#include "plDrawable/plSpanInstance.h"
|
||||
|
||||
class plMaxNode;
|
||||
class plClusterGroup;
|
||||
class plSpanTemplateB;
|
||||
class hsBounds3Ext;
|
||||
class plCluster;
|
||||
class plClusterGroup;
|
||||
class hsGMaterial;
|
||||
class plMaxNode;
|
||||
class Point3;
|
||||
class plSpanEncoding;
|
||||
class plSpanTemplateB;
|
||||
struct hsVector3;
|
||||
|
||||
class plDeformVert
|
||||
{
|
||||
|
@ -44,16 +44,22 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// 3DSMax HeadSpin exporter
|
||||
//
|
||||
#include "HeadSpin.h"
|
||||
#include "Max.h"
|
||||
#include "istdplug.h"
|
||||
#include "Notify.h"
|
||||
#include "plgDispatch.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include <max.h>
|
||||
#include <istdplug.h>
|
||||
#include <Notify.h>
|
||||
#include <commdlg.h>
|
||||
#include "bmmlib.h"
|
||||
#include "INode.h"
|
||||
#include <bmmlib.h>
|
||||
#include <INode.h>
|
||||
#include <stdmat.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "plConvert.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsTemplates.h"
|
||||
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsControlConverter.h"
|
||||
@ -61,12 +67,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsMaterialConverter.h"
|
||||
#include "plLayerConverter.h"
|
||||
#include "UserPropMgr.h"
|
||||
#include "hsStringTokenizer.h"
|
||||
#include "MaxExport/plErrorMsg.h"
|
||||
#include "hsVertexShader.h"
|
||||
#include "plLightMapGen.h"
|
||||
#include "plBitmapCreator.h"
|
||||
#include "plgDispatch.h"
|
||||
|
||||
#include "pnMessage/plTimeMsg.h"
|
||||
#include "MaxComponent/plComponent.h"
|
||||
@ -76,6 +80,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "MaxComponent/plClusterComponent.h"
|
||||
|
||||
#include "plPhysX/plSimulationMgr.h"
|
||||
#include "MaxMain/plMaxMeshExtractor.h"
|
||||
#include "MaxMain/plPhysXCooking.h"
|
||||
#include "MaxExport/plExportProgressBar.h"
|
||||
|
||||
|
@ -43,11 +43,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plConvert_inc
|
||||
#define plConvert_inc
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
|
||||
class plErrorMsg;
|
||||
class plKey;
|
||||
class plLocation;
|
||||
class plMaxNode;
|
||||
class plMessage;
|
||||
|
@ -41,7 +41,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "Max.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
#include <Max.h>
|
||||
#pragma hdrstop
|
||||
|
||||
|
||||
#include "plDistTree.h"
|
||||
|
@ -43,8 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plDistTree_inc
|
||||
#define plDistTree_inc
|
||||
|
||||
#include "hsTemplates.h"
|
||||
|
||||
class plDistNode
|
||||
{
|
||||
public:
|
||||
|
@ -41,13 +41,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include <commdlg.h>
|
||||
#include "hsGeometry3.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include "Max.h"
|
||||
#include "stdmat.h"
|
||||
#include "bmmlib.h"
|
||||
#include "iparamb2.h"
|
||||
#include "meshdlib.h"
|
||||
#include <commdlg.h>
|
||||
#include <max.h>
|
||||
#include <stdmat.h>
|
||||
#include <bmmlib.h>
|
||||
#include <iparamb2.h>
|
||||
#include <meshdlib.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MaxExport/plExportProgressBar.h"
|
||||
#include "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h"
|
||||
@ -55,9 +59,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "hsMaterialConverter.h"
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsGeometry3.h"
|
||||
|
||||
#include "plMath/plTriUtils.h"
|
||||
|
||||
#include "plDistributor.h"
|
||||
|
@ -60,23 +60,25 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "Max.h"
|
||||
#include "stdmat.h"
|
||||
#include "istdplug.h"
|
||||
#include "iparamb2.h"
|
||||
#include "iparamm2.h"
|
||||
|
||||
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include <Max.h>
|
||||
#include <stdmat.h>
|
||||
#include <istdplug.h>
|
||||
#include <iparamb2.h>
|
||||
#include <iparamm2.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "plLayerConverter.h"
|
||||
|
||||
#include "MaxConvert/hsMaxLayerBase.h"
|
||||
#include "MaxConvert/hsConverterUtils.h"
|
||||
#include "MaxConvert/hsControlConverter.h"
|
||||
#include "MaxConvert/hsMaterialConverter.h"
|
||||
#include "MaxConvert/plBitmapCreator.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsMaxLayerBase.h"
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsControlConverter.h"
|
||||
#include "hsMaterialConverter.h"
|
||||
#include "plBitmapCreator.h"
|
||||
#include "MaxExport/plErrorMsg.h"
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
|
||||
@ -750,10 +752,11 @@ uint32_t *plLayerConverter::IGetInitBitmapBuffer( plDynamicTextLayer *layer ) c
|
||||
|
||||
for( int x = 0; x < width; x++ )
|
||||
{
|
||||
color.SetARGB( p64[ x ].a * 255.f / 65535.f,
|
||||
p64[ x ].r * 255.f / 65535.f,
|
||||
p64[ x ].g * 255.f / 65535.f,
|
||||
p64[ x ].b * 255.f / 65535.f );
|
||||
const float konst = 255.f / 65535.f;
|
||||
color.SetARGB((uint8_t)(p64[ x ].a * konst),
|
||||
(uint8_t)(p64[ x ].r * konst),
|
||||
(uint8_t)(p64[ x ].g * konst),
|
||||
(uint8_t)(p64[ x ].b * konst));
|
||||
buffPtr[ x ] = color;
|
||||
}
|
||||
|
||||
|
@ -53,10 +53,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef _plLayerConverter_h
|
||||
#define _plLayerConverter_h
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "Max.h"
|
||||
|
||||
|
||||
//// Class Definition /////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -40,12 +40,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
//#define MF_NEW_RGC
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "Max.h"
|
||||
#include "dummy.h"
|
||||
#include "notify.h"
|
||||
#include "hsFastMath.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include "MaxComponent/plComponent.h"
|
||||
|
||||
#include <dummy.h>
|
||||
#include <notify.h>
|
||||
#include <vector>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "plLightMapGen.h"
|
||||
#include "plGImage/plMipmap.h"
|
||||
@ -57,7 +62,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plSurface/hsGMaterial.h"
|
||||
#include "MaxMain/plPluginResManager.h"
|
||||
#include "plDrawable/plGeometrySpan.h"
|
||||
#include "hsFastMath.h"
|
||||
#include "hsControlConverter.h"
|
||||
#include "plBitmapCreator.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
@ -968,7 +972,7 @@ bool plLightMapGen::ISpotAffectsNode(plLightMapInfo* liInfo, LightObject* liObj,
|
||||
liObj->EvalLightState(TimeValue(0), FOREVER, &ls);
|
||||
|
||||
float coneRad[2];
|
||||
coneRad[0] = ls.fallsize * M_PI / 180.f;
|
||||
coneRad[0] = (float)(ls.fallsize * M_PI / 180.f);
|
||||
coneRad[1] = coneRad[0];
|
||||
if( ls.shape == RECT_LIGHT )
|
||||
coneRad[1] /= ls.aspect;
|
||||
@ -1567,7 +1571,7 @@ bool plLightMapGen::ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2
|
||||
|
||||
if( duDr > 0 )
|
||||
{
|
||||
fWidth = kTexPerFoot / duDr;
|
||||
fWidth = (int)(kTexPerFoot / duDr);
|
||||
|
||||
if( fWidth > kMaxSize )
|
||||
fWidth = kMaxSize;
|
||||
@ -1583,7 +1587,7 @@ bool plLightMapGen::ISelectBitmapDimension(plMaxNode* node, const hsMatrix44& l2
|
||||
|
||||
if( dvDr > 0 )
|
||||
{
|
||||
fHeight = kTexPerFoot / duDr;
|
||||
fHeight = (int)(kTexPerFoot / duDr);
|
||||
|
||||
if( fHeight > kMaxSize )
|
||||
fHeight = kMaxSize;
|
||||
|
@ -43,10 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plLightMapGen_inc
|
||||
#define plLightMapGen_inc
|
||||
|
||||
#include "hsTemplates.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class plMaxLightContext;
|
||||
class plRenderGlobalContext;
|
||||
class plLayerInterface;
|
||||
|
@ -49,18 +49,23 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "Max.h"
|
||||
#include "iparamb2.h"
|
||||
#include "modstack.h"
|
||||
#include "ISkin.h"
|
||||
#include "meshdlib.h"
|
||||
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsBitVector.h"
|
||||
#include "plMeshConverter.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "plTweak.h"
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include <max.h>
|
||||
#include <iparamb2.h>
|
||||
#include <modstack.h>
|
||||
#include <ISkin.h>
|
||||
#include <meshdlib.h>
|
||||
#include <stdmat.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "plMeshConverter.h"
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
#include "MaxExport/plErrorMsg.h"
|
||||
#include "plSurface/hsGMaterial.h"
|
||||
@ -69,7 +74,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsConverterUtils.h"
|
||||
#include "hsMaterialConverter.h"
|
||||
#include "hsControlConverter.h"
|
||||
#include "hsExceptionStack.h"
|
||||
#include "MaxPlasmaMtls/Materials/plCompositeMtl.h"
|
||||
#include "MaxPlasmaMtls/Materials/plPassMtl.h"
|
||||
#include "MaxPlasmaMtls/Materials/plCompositeMtlPB.h"
|
||||
@ -85,8 +89,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "plStatusLog/plStatusLog.h"
|
||||
|
||||
#include "plTweak.h"
|
||||
|
||||
//// Static Members //////////////////////////////////////////////////////////
|
||||
|
||||
bool plMeshConverter::fWarnBadNormals = true;
|
||||
@ -1351,9 +1353,9 @@ uint32_t plMeshConverter::ICreateHexColor( float r, float g, float b )
|
||||
|
||||
|
||||
au = 0xff000000;
|
||||
ru = r * 255.0f;
|
||||
gu = g * 255.0f;
|
||||
bu = b * 255.0f;
|
||||
ru = (uint32_t)(r * 255.0f);
|
||||
gu = (uint32_t)(g * 255.0f);
|
||||
bu = (uint32_t)(b * 255.0f);
|
||||
return au | ( ru << 16 ) | ( gu << 8 ) | ( bu );
|
||||
}
|
||||
|
||||
|
@ -54,10 +54,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef _plMeshConverter_h
|
||||
#define _plMeshConverter_h
|
||||
|
||||
#include "Max.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsTemplates.h"
|
||||
|
||||
class plMaxNode;
|
||||
class plErrorMsg;
|
||||
class hsConverterUtils;
|
||||
|
@ -41,10 +41,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "Max.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
#include <Max.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MaxMain/plMaxNode.h"
|
||||
#include "plRenderGlobalContext.h"
|
||||
#include "plRenderInstance.h"
|
||||
|
||||
plRenderGlobalContext::plRenderGlobalContext(Interface* ip, TimeValue t)
|
||||
{
|
||||
@ -114,6 +118,14 @@ void plRenderGlobalContext::MakeRenderInstances(plMaxNode* root, TimeValue t)
|
||||
fInstList[i].SetNext(&fInstList[i+1]);
|
||||
}
|
||||
|
||||
RenderInstance* plRenderGlobalContext::GetRenderInstance(int i) const
|
||||
{
|
||||
if (fInstList.GetCount() > i)
|
||||
return &fInstList[i];
|
||||
else
|
||||
return nil;
|
||||
}
|
||||
|
||||
void plRenderGlobalContext::IMakeRenderInstances(plMaxNode* node, TimeValue t, bool isBarney)
|
||||
{
|
||||
const char* dbgNodeName = node->GetName();
|
||||
|
@ -43,8 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plRenderGlobalContext_inc
|
||||
#define plRenderGlobalContext_inc
|
||||
|
||||
#include "hsTemplates.h"
|
||||
#include "plRenderInstance.h"
|
||||
class plRenderInstance;
|
||||
|
||||
class plRenderGlobalContext : public RenderGlobalContext
|
||||
{
|
||||
@ -63,8 +62,8 @@ public:
|
||||
|
||||
void MakeRenderInstances(plMaxNode* root, TimeValue t);
|
||||
|
||||
virtual int NumRenderInstances() { return fInstList.GetCount(); }
|
||||
virtual RenderInstance* GetRenderInstance( int i ) { return i < fInstList.GetCount() ? &fInstList[i] : nil; }
|
||||
virtual int NumRenderInstances() const { return fInstList.GetCount(); }
|
||||
virtual RenderInstance* GetRenderInstance( int i ) const;
|
||||
|
||||
virtual void IntersectRay(RenderInstance *inst, Ray& ray, ISect &isct, ISectList &xpList, BOOL findExit);
|
||||
virtual BOOL IntersectWorld(Ray &ray, int skipID, ISect &hit, ISectList &xplist, int blurFrame = NO_MOTBLUR);
|
||||
|
@ -41,7 +41,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "Max.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsWindows.h"
|
||||
#include <Max.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "plRenderInstance.h"
|
||||
|
||||
|
@ -43,8 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plRenderInstance_inc
|
||||
#define plRenderInstance_inc
|
||||
|
||||
#include "hsTemplates.h"
|
||||
|
||||
class plRenderInstance : public RenderInstance
|
||||
{
|
||||
protected:
|
||||
|
@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef _PLASMA_MAXCOMPAT_H
|
||||
#define _PLASMA_MAXCOMPAT_H
|
||||
|
||||
#include "maxversion.h"
|
||||
#include <maxversion.h>
|
||||
|
||||
#if MAX_VERSION_MAJOR <= 9
|
||||
#define BMMCOLOR(x, y, z, w) \
|
||||
|
Reference in New Issue
Block a user