active change



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 05/08/2007 at 02:30, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   V9.5 
    Platform:      
    Language(s) :

    ---------
      when I was change the viewport that one viewport to others( top => front ) using :
     static void SetActiveViewProjection( LONG iNUM = 0 )
    {
     BaseDocument* doc = GetActiveDocument();
     LONG lngIndex = 0;
     lngIndex = iNUM;
      
     BaseDraw *bd = doc->GetActiveBaseDraw();
     
     
     switch( lngIndex )
     {
     case 0:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 0);
       GeData da(BASEDRAW_PROJECTION_PERSPECTIVE);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
           break;
     case 1:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 1 );
       GeData da(BASEDRAW_PROJECTION_TOP);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 2:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 2);
       GeData da(BASEDRAW_PROJECTION_RIGHT);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      
      break;
     case 3:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_FRONT);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 4:
     {
      //BaseDraw *bd = doc->GetBaseDraw( 3);
      GeData da(BASEDRAW_PROJECTION_LEFT);
      bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
     }
     break;
     case 5:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_BOTTOM);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 6:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_PARALLEL);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 7:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_BACK);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 8:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_MILITARY);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 9:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_FROG);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 10:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_BIRD);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 11:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_GENTLEMAN);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     case 12:
      {
       //BaseDraw *bd = doc->GetBaseDraw( 3);
       GeData da(BASEDRAW_PROJECTION_DIMETRIC);
       bd->SetParameter(DescLevel(BASEDRAW_DATA_PROJECTION),da,NULL);
      }
      break;
     }
     //DrawViews(DA_ONLY_ACTIVE_VIEW|DA_NO_THREAD|DA_NO_ANIMATION );
     
     //EventAdd();
     EventAdd(EVENT_FORCEREDRAW);

    }
     
    but the result is not I want that reset the setting positon and lost my  effects viewport as have been  setted .
    how to get myviewport like f1, f2, f3, f4.


Log in to reply