const char* QERPlug_Init(void* hApp, void* pMainWidget) { g_pRadiantWnd = (GtkWidget*)pMainWidget; // initialize cams for( int i = 0; i < MAX_CAMERAS; i++ ) { if( i == 0 ) { firstFreeCam = new CCamera( i ); firstCam = firstFreeCam; } else { firstCam->SetNext( new CCamera( i ) ); firstCam = firstCam->GetNext(); } } firstCam = NULL; if( !Renderer ) { Renderer = new CRenderer; } if( g_pCameraInspectorWnd == NULL ) g_pCameraInspectorWnd = CreateCameraInspectorDialog(); InitIglToQgl(&g_QglTable); GetFileTypeRegistry()->addType("camera", filetype_t("Camera file", "*.camera")); return "Camera for GtkRadiant"; }
void init_filetypes(){ char **ext; for ( ext = supportedmodelformats; *ext != NULL; ext++ ) { GetFileTypeRegistry()->addType( MODEL_MAJOR, filetype_t( "sprite", *ext ) ); } }
ModelPicoAPI(const char* extension, const picoModule_t* module) : m_modelLoader(module) { StringOutputStream filter(128); filter << "*." << extension; GlobalFiletypesModule::getTable().addType(Type::Name(), extension, filetype_t(module->displayName, filter.c_str())); }
ModelPicoAPI (const std::string& extension, const picoModule_t* module) : m_modelLoader(module) { std::string filter = "*." + extension; GlobalFiletypesModule::getTable().addType(Type::Name(), extension, filetype_t(module->displayName, filter)); }
filetype_pair_t GetTypeForGTKMask(const char *mask) const { std::vector<CopiedString>::const_iterator j = m_masks.begin(); for(FileTypeList::const_iterator i = m_types.begin(); i != m_types.end(); ++i, ++j) { if(string_equal((*j).c_str(), mask)) { return filetype_pair_t((*i).m_moduleName.c_str(), filetype_t((*i).m_name.c_str(), (*i).m_pattern.c_str())); } } return filetype_pair_t(); }
void init_filetypes(){ const picoModule_t **modules = PicoModuleList( NULL ); while ( *modules != NULL ) { const picoModule_t* module = *modules++; if ( module->canload && module->load ) { for ( char*const* ext = module->defaultExts; *ext != NULL; ++ext ) { char buf[16]; buf[0] = '*'; buf[1] = '.'; strcpy( buf + 2, *ext ); GetFileTypeRegistry()->addType( MODEL_MAJOR, filetype_t( module->displayName, buf ) ); } } } }
RadiantFileTypeRegistry() { addType("*", "*", filetype_t("All Files", "*.*")); }
filetype_t getType() const { return filetype_t(m_name.c_str(), m_pattern.c_str()); }
filetype_t getType () const { return filetype_t(m_name, m_pattern); }