Added modelviewer.

Added neural network code(turned off by default).
Lots of editor and rendering fixes.
This commit is contained in:
Justin Marshall
2026-05-17 22:09:25 -07:00
parent 079442e7ba
commit 76f642286e
74 changed files with 101444 additions and 2227 deletions
+42 -29
View File
@@ -42,7 +42,7 @@ static idStr Maya_Error;
static exporterInterface_t Maya_ConvertModel = NULL;
static exporterShutdown_t Maya_Shutdown = NULL;
static int importDLL = 0;
static INT_PTR importDLL = 0;
bool idModelExport::initialized = false;
@@ -83,39 +83,51 @@ idModelExport::CheckMayaInstall
Determines if Maya is installed on the user's machine
=====================
*/
bool idModelExport::CheckMayaInstall( void ) {
bool idModelExport::CheckMayaInstall(void) {
#ifndef _WIN32
return false;
#elif 0
HKEY hKey;
long lres, lType;
lres = RegOpenKey( HKEY_LOCAL_MACHINE, "SOFTWARE\\Alias|Wavefront\\Maya\\4.5\\Setup\\InstallPath", &hKey );
if ( lres != ERROR_SUCCESS ) {
return false;
}
lres = RegQueryValueEx( hKey, "MAYA_INSTALL_LOCATION", NULL, (unsigned long*)&lType, (unsigned char*)NULL, (unsigned long*)NULL );
RegCloseKey( hKey );
if ( lres != ERROR_SUCCESS ) {
return false;
}
return true;
#else
HKEY hKey;
long lres;
struct mayaRegistryKey_t {
HKEY root;
const char* path;
};
// only check the non-version specific key so that we only have to update the maya dll when new versions are released
lres = RegOpenKey( HKEY_LOCAL_MACHINE, "SOFTWARE\\Alias|Wavefront\\Maya", &hKey );
RegCloseKey( hKey );
static const mayaRegistryKey_t mayaKeys[] = {
// Modern Maya installs
{ HKEY_LOCAL_MACHINE, "SOFTWARE\\Autodesk\\Maya" },
{ HKEY_CURRENT_USER, "SOFTWARE\\Autodesk\\Maya" },
if ( lres != ERROR_SUCCESS ) {
return false;
// Older Maya installs
{ HKEY_LOCAL_MACHINE, "SOFTWARE\\Alias|Wavefront\\Maya" },
{ HKEY_CURRENT_USER, "SOFTWARE\\Alias|Wavefront\\Maya" },
};
static const REGSAM views[] = {
KEY_READ | KEY_WOW64_64KEY,
KEY_READ | KEY_WOW64_32KEY,
KEY_READ
};
for (int i = 0; i < sizeof(mayaKeys) / sizeof(mayaKeys[0]); i++) {
for (int j = 0; j < sizeof(views) / sizeof(views[0]); j++) {
HKEY hKey = NULL;
LONG lres = RegOpenKeyExA(
mayaKeys[i].root,
mayaKeys[i].path,
0,
views[j],
&hKey
);
if (lres == ERROR_SUCCESS) {
RegCloseKey(hKey);
return true;
}
}
}
return true;
return false;
#endif
}
@@ -153,7 +165,7 @@ void idModelExport::LoadMayaDll( void ) {
}
// initialize the DLL
if ( !dllEntry( MD5_VERSION, common, sys ) ) {
if ( !dllEntry( MD5_VERSION, common, sys, fileSystem ) ) {
// init failed
Maya_ConvertModel = NULL;
Maya_Shutdown = NULL;
@@ -539,6 +551,7 @@ int idModelExport::ExportModels( const char *pathname, const char *extension ) {
if ( !CheckMayaInstall() ) {
// if Maya isn't installed, don't bother checking if we have anims to export
common->Warning("idModelExport::ExportModels: Maya Install not detected!\n");
return 0;
}