Added a quick warning message macro. KRSceneManager updates to del with NULL scenes.
--HG-- branch : nfb
This commit is contained in:
@@ -35,6 +35,8 @@
|
|||||||
#define IOS_REF (*(pSdkManager->GetIOSettings()))
|
#define IOS_REF (*(pSdkManager->GetIOSettings()))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define warning(e,s) if(!(e))printf("WARNING: %s\n",s)
|
||||||
|
|
||||||
void InitializeSdkObjects(FbxManager*& pSdkManager, FbxScene*& pScene);
|
void InitializeSdkObjects(FbxManager*& pSdkManager, FbxScene*& pScene);
|
||||||
void DestroySdkObjects(FbxManager* pSdkManager);
|
void DestroySdkObjects(FbxManager* pSdkManager);
|
||||||
bool LoadScene(FbxManager* pSdkManager, FbxDocument* pScene, const char* pFilename);
|
bool LoadScene(FbxManager* pSdkManager, FbxDocument* pScene, const char* pFilename);
|
||||||
@@ -893,10 +895,10 @@ void LoadNode(FbxScene* pFbxScene, KRNode *parent_node, FbxGeometryConverter *pG
|
|||||||
FbxVector4 lZero(0.0, 0.0, 0.0);
|
FbxVector4 lZero(0.0, 0.0, 0.0);
|
||||||
FbxVector4 lOne(1.0, 1.0, 1.0);
|
FbxVector4 lOne(1.0, 1.0, 1.0);
|
||||||
|
|
||||||
assert(geometric_rotation == lZero);
|
warning((geometric_rotation == lZero), "Geometric Rotation not supported .. 3DSMax file??");
|
||||||
assert(geometric_translation == lZero);
|
warning((geometric_translation == lZero), "Geometric Rotation not supported .. 3DSMax file??");
|
||||||
assert(geometric_scaling == lOne);
|
warning((geometric_scaling == lOne), "Geometric Rotation not supported .. 3DSMax file??");
|
||||||
assert(rotation_order == eEulerXYZ);
|
warning((rotation_order == eEulerXYZ), "Geometric Rotation not supported .. 3DSMax file??");
|
||||||
|
|
||||||
// FINDME - node_key_frame_position contains the key frame (start location) for an animation node
|
// FINDME - node_key_frame_position contains the key frame (start location) for an animation node
|
||||||
// node_has_n_points
|
// node_has_n_points
|
||||||
|
|||||||
@@ -65,15 +65,20 @@ KRScene *KRSceneManager::getScene(const std::string &name) {
|
|||||||
std::transform(lowerName.begin(), lowerName.end(),
|
std::transform(lowerName.begin(), lowerName.end(),
|
||||||
lowerName.begin(), ::tolower);
|
lowerName.begin(), ::tolower);
|
||||||
|
|
||||||
return m_scenes[lowerName];
|
static unordered_map<std::string, KRScene *>::iterator scene_itr = m_scenes.find(lowerName);
|
||||||
|
if(scene_itr != m_scenes.end()) {
|
||||||
|
return (*scene_itr).second;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KRScene *KRSceneManager::getFirstScene() {
|
KRScene *KRSceneManager::getFirstScene() {
|
||||||
static unordered_map<std::string, KRScene *>::iterator scene_itr = m_scenes.begin();
|
static unordered_map<std::string, KRScene *>::iterator scene_itr = m_scenes.begin();
|
||||||
if(scene_itr == m_scenes.end()) {
|
if(scene_itr != m_scenes.end()) {
|
||||||
return NULL;
|
|
||||||
} else {
|
|
||||||
return (*scene_itr).second;
|
return (*scene_itr).second;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user