Advertisement
nux95

Untitled

Feb 1st, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.10 KB | None | 0 0
  1. /**
  2.  * Copyright (C) 2013, Niklas Rosenstein
  3.  * All rights reserved.
  4.  **/
  5.  
  6. #include <c4d.h>
  7.  
  8. class SplineCacheData : public ObjectData {
  9.  
  10.     public:
  11.  
  12.     static NodeData* Alloc() { return gNew SplineCacheData; }
  13.  
  14.     // Overrides: ObjectData
  15.  
  16.     SplineObject* GetContour(BaseObject* op, BaseDocument* doc, Real lod,
  17.             BaseThread* bt) {
  18.         if (!doc) {
  19.             GeDebugOut("WARNING: No document passed on GetContour()");
  20.             return NULL;
  21.         }
  22.         LONG frame = doc->GetTime().GetFrame(doc->GetFps());
  23.         String name = doc->GetDocumentName().GetString();
  24.  
  25.         String message = "GetContour() Document name: " +
  26.                          doc->GetDocumentName().GetString() + ", frame: " +
  27.                          LongToString(frame);
  28.         GeDebugOut(message);
  29.         return NULL;
  30.     }
  31.  
  32. };
  33.  
  34. Bool PluginStart() {
  35.     return RegisterObjectPlugin(
  36.         1000002, "Spline Cache Test", OBJECT_ISSPLINE, SplineCacheData::Alloc,
  37.         "", NULL, 0);
  38. }
  39.  
  40. Bool PluginMessage(LONG type, void*pData) {
  41.     return TRUE;
  42. }
  43.  
  44. void PluginEnd() {
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement