-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhoudiniAsset.cpp
More file actions
37 lines (32 loc) · 1.08 KB
/
houdiniAsset.cpp
File metadata and controls
37 lines (32 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "daHoudiniEngine/houdiniAsset.h"
using namespace houdiniEngine;
///////////////////////////////////////////////////////////////////////////////////////////////////
HoudiniAsset* HoudiniAsset::create(const String& modelName)
{
return new HoudiniAsset(SceneManager::instance(), modelName);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
HoudiniAsset::HoudiniAsset(SceneManager* scene, const String& modelName):
Entity(scene)
{
myModel = scene->getModel(modelName);
if(myModel != NULL && myModel->nodes.size() > 0)
{
initialize(myModel->nodes[0]);
// use getPiece() on listPieces() items to break asset up?
// set materials based on node names..
}
else
{
ofwarn("[HoudiniAsset] could not create static object: model not found - %1%", %modelName);
}
}
void HoudiniAsset::getCounts() {
// for (int i = 0; i < myModel->getObjectCount(); i++) {
// for (int j = 0; j < myModel->getGeoCount(i); j++) {
// for (int k = 0; j < myModel->getPartCount(j, i); j++) {
// ofmsg("%1%:%2%:%3%", %i %j %k);
// }
// }
// }
}