Object Plugin



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

    On 29/11/2005 at 23:10, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello ...

    I want to create an Object plugin like the sameple "RoundTube" ...
    But how do I have to handle the PolygonObject ...?
    Is there a place or any forum links to know more about the Object plugin ...
    I coded like that ... but it always make the program (C4D) crash ...

    static BaseObject *GenerateMyObj(BaseThread *bt)
    {
         LONG i;
         PolygonObject *ret = NULL;
         ret=PolygonObject::Alloc(1,4);
         Vector *vRet=ret->GetPoint();
         struct CPolygon *pRet=ret->GetPolygon();
         if(bt&&bt-;>TestBreak())
         {
              return NULL;
         }

    vRet[0]=Vector(0,-100,100);
         vRet[1]=Vector(0,-100,-100);
         vRet[2]=Vector(0,100,-100);
         vRet[3]=Vector(0,100,100);

    pRet[0]=CPolygon(0,1,2,3);
         ret->Message(MSG_UPDATE);
         return ret;
    }

    BaseObject *MyOBbj::GetVirtualObjects(PluginObject *op, HierarchyHelp *hh)
    {
         BaseObject *ret=NULL;
         Bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA);     
         if (!dirty) return op->GetCache(hh);

    if (hh->GetVFlags()&VFLAG;_POLYGONAL)
         {
              ret = GenerateMyObj(hh->GetThread());
              if (!ret) goto Error;
         }
         else
         {
              ret = PolygonObject::Alloc(0,0);
              if (!ret) goto Error;
         }

    ret->SetName(op->GetName());
         return ret;
    Error:
            return NULL;
    }

    Is there any information that you can tell me? At least what I need to study more to make an Object plugin.

    Thanks in advance ...
    ZawMinTun



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

    On 01/12/2005 at 04:25, xxxxxxxx wrote:

    Hello ...

    Now I want to know the other about Object Plugin ...
    My object plugin is a generator ...
    So let's say in the GetVirtualObjects I create the object that I want ... So the object may be the one with hierarchy ...
    Let's say ...
    A sweep obj under which is 2 splines ...

    In the object windows of C4D the hierarchy can't be seen ... It's good ... but when I make that object EDITABLE in C4D it shows its hierarchy ... in a editable form ...
    I want it only shows as an polygon object ...
    Am I understood ?
    I mean the final result of the MakeEditable then Connect ... I want it will be displayed when the user make it editable ...
    So I try to catch the message ... but no message is passed when the user make the object Editable ...
    Am I understood?
    If not, I want to explain it with code samples ...

    Hope you can help me ;-)
    Thanks in advance ...
    ZawMinTun



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

    On 10/12/2005 at 05:01, xxxxxxxx wrote:

    Sorry, I don't think that's possible. You will either have to instruct your users to use Make Editable then Connect, or you will have to make your own plugin that assists them in doing that.



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

    On 12/12/2005 at 23:46, xxxxxxxx wrote:

    I see ...
    Thank you ... Mikael ...

    With all my best wishes ...
    ZawMinTun


Log in to reply