- Wed Jul 08, 2015 1:57 pm
#387395
Hi all. I wrote little testing application for testing maxwell geometry modifier extension.
Application use only Qt4.8.7 and maxwell sdk (3.0.1 x64 in vs2012). It has only one pushbutton
2. in
What I doing wrong. please help.
Application use only Qt4.8.7 and maxwell sdk (3.0.1 x64 in vs2012). It has only one pushbutton
Code: Select all
1. In void MainWindow::on_pushButton_clicked(bool clicked)
{
Q_UNUSED(clicked);
//
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString MAXWELL3_ROOT = env.value("MAXWELL3_ROOT", "not founded");
std::cout<<MAXWELL3_ROOT.toUtf8().constData()<<std::endl;
QString MAXWELL3_LICENSE_SERVER = env.value("MAXWELL3_LICENSE_SERVER", "not founded");
std::cout<<MAXWELL3_LICENSE_SERVER.toUtf8().constData()<<std::endl;
QString MAXWELL3_MATERIALS_DATABASE = env.value("MAXWELL3_MATERIALS_DATABASE", "not founded");
std::cout<<MAXWELL3_MATERIALS_DATABASE.toUtf8().constData()<<std::endl;
CextensionManager::instance()->setExtensionsDirectory(QString("%1\\extensions").arg(MAXWELL3_ROOT).toUtf8().constData());
CextensionManager::instance()->loadAllExtensions();
std::cout<<CextensionManager::instance()->getMaterialModifierExtensionsCount();
Cmaxwell *previewScene = new Cmaxwell(error_callback);
previewScene->readMXS(QString("%1/test.mxs").arg("D:/").toUtf8().constData());
Cmaxwell::Cobject::Citerator it;
Cmaxwell::Cobject object = it.first( previewScene );
while ( !object.isNull() )
{
char *pName;
object.getName(&pName);
std::cout<<pName<<std::endl;
byte isMesh = 0;
object.isMesh(isMesh);
if(isMesh == 1)
{
MXparamList *pl = new MXparamList("SubdivisionModifier");
object.applyGeometryModifierExtension( pl );
pl->clear();
pl->free();
delete pl;
}
object = it.next();
}
previewScene->writeMXS("D:/test.mxs");
previewScene->freeGeometry();
previewScene->eraseUnusedMaterials();
previewScene->freeScene();
delete previewScene;
}
Code: Select all
line i get this for all extensions
CextensionManager::instance()->loadAllExtensions();
but all extension exists.Error in Loadlibrary.
Error loading library: C:\Program Files\Next Limit\Maxwell 3\extensions\subdivisionmodifier.win64.mxx
The specified module could not be found.
2. in
Code: Select all
application crash, with soemthing like this
delete pl;
.....
HEAP[Project1.exe]: Heap block at 0000000000489F10 modified at 0000000000489F21 past requested size of 1
Project1.exe has triggered a breakpoint.
HEAP[Project1.exe]: Invalid address specified to RtlFreeHeap( 0000000000390000, 0000000000489F20 )
...
What I doing wrong. please help.