Guest User

Untitled

a guest
Jul 4th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.71 KB | None | 0 0
  1. #define PBLOCK_REF 0
  2.  
  3. ////////
  4. // ClassDesc2 defined below
  5. ////////
  6.  
  7. class CyclesCameraPanoramaClassDesc : public ClassDesc2
  8. {
  9. public:
  10.     virtual int IsPublic() { return 1; }
  11.     virtual const TCHAR* ClassName() { return _T("Cycles Pano Camera"); }
  12.     virtual SClass_ID SuperClassID() { return CAMERA_CLASS_ID; }
  13.     virtual Class_ID ClassID() { return CYCLES_CAMERA_PANORAMIC_CLASS; }
  14.     virtual const TCHAR* Category() { return _T("Cycles"); }
  15.     virtual const TCHAR* InternalName() { return _T("camera_cycles_panorama"); }
  16.  
  17.     virtual void* Create(BOOL loading = FALSE);
  18. };
  19.  
  20. CyclesCameraPanoramaClassDesc* GetCyclesCameraPanoramaClassDesc()
  21. {
  22.     static CyclesCameraPanoramaClassDesc panoramic_camera_desc;
  23.     return &panoramic_camera_desc;
  24. }
  25.  
  26. ////////
  27. // ParamBlockDesc2 defined below
  28. ////////
  29.  
  30. // Pblock enum
  31. enum { cam_pano_pblock };
  32.  
  33. // Pblock params
  34. enum { param_dummy };
  35.  
  36. static ParamBlockDesc2 pano_cam_pblock_desc(
  37.     // Pblock data
  38.     cam_pano_pblock,
  39.     _T("pblock"),
  40.     0,
  41.     GetCyclesCameraPanoramaClassDesc(),
  42.     P_AUTO_CONSTRUCT + P_AUTO_UI,
  43.     PBLOCK_REF,
  44.     // Interface stuff
  45.     IDD_PANEL_CAM_PANO_PARAM,
  46.     _T("test panel"),
  47.     0,
  48.     0,
  49.     NULL,
  50.         // Dummy float
  51.         param_dummy,
  52.         _T("dummy"),
  53.         TYPE_FLOAT,
  54.         P_ANIMATABLE,
  55.         IDS_ROUGHNESS,
  56.         p_default, 0.0f,
  57.         p_range, 0.0f, 1.0f,
  58.         p_end,
  59.     p_end
  60.     );
  61.  
  62. ////////
  63. // Functions to make rollouts appear/disappear
  64. ////////
  65.  
  66. void CyclesPanoramaCamera::BeginEditParams(IObjParam* ip, ULONG flags, Animatable* prev)
  67. {
  68.     GetCyclesCameraPanoramaClassDesc()->BeginEditParams(ip, this, flags, prev);
  69. }
  70.  
  71. void CyclesPanoramaCamera::EndEditParams(IObjParam* ip, ULONG flags, Animatable* next)
  72. {
  73.     GetCyclesCameraPanoramaClassDesc()->EndEditParams(ip, this, flags, next);
  74. }
Advertisement
Add Comment
Please, Sign In to add comment