示例#1
0
void init_filetypes(){
	char **ext;
	for ( ext = supportedmodelformats; *ext != NULL; ext++ )
	{
		GetFileTypeRegistry()->addType( MODEL_MAJOR, filetype_t( "sprite", *ext ) );
	}
}
示例#2
0
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";
}
示例#3
0
 bool save ()
 {
     if (!mapSaved()) {
         const std::string moduleName = findModuleName(GetFileTypeRegistry(), MapFormat::Name(), m_type);
         if (!moduleName.empty()) {
             const MapFormat* format = ReferenceAPI_getMapModules().findModule(moduleName);
             if (format != 0 && MapResource_save(*format, m_model.get(), m_path, m_name)) {
                 mapSave();
                 return true;
             }
         }
     }
     return false;
 }
示例#4
0
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 ) );
			}
		}
	}
}
示例#5
0
 FiletypesAPI()
 {
   m_filetypes = GetFileTypeRegistry();
 }