Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    MULTIPASS_CHANNELS

    SDK Help
    0
    5
    392
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

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

      On 01/04/2008 at 04:13, xxxxxxxx wrote:

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

      ---------
      Hi
      I want to add Object Buffer into Multipass Channel in C++.
      but it could't be going@well.
      i don't know how to do it.
      RenderData* pRenderData = doc->GetActiveRenderData();
        BaseContainer* pCont = pRenderData->GetDataInstance();
        BaseContainer* pMultPass = pCont->GetContainerInstance( RDATA_MULTIPASS_CHANNELS );//This is NULL
      //and i want add [object buffer:1,2,......]
       
      Colud you give me an example,Please?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

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

        On 02/04/2008 at 04:27, xxxxxxxx wrote:

        You have to set the channel containers within the multipass container of the RenderData container.

        here an example that adds an object buffer channel:

        > \> Bool MenuTest::Execute(BaseDocument \*doc) \> { \>      RenderData \*rdata = doc->GetActiveRenderData(); \>      if(!rdata) return FALSE; \> \>      BaseContainer \*rbc = rdata->GetDataInstance(); \>      if(!rbc) return FALSE; \> \>      BaseContainer cbc; \>      cbc.SetBool(RDATA_MULTIPASS_ACTIVE, TRUE); \>      cbc.SetLong(RDATA_MULTIPASS_SPECIALGROUP, 2); \> \>      BaseContainer mpbc; \>      mpbc.SetContainer(VPBUFFER_OBJECTBUFFER, cbc); \> \>      doc->StartUndo(); \> \>      doc->AddUndo(UNDO_CHANGE, rdata); \> \>      rbc->SetContainer(RDATA_MULTIPASS_CHANNELS, mpbc); \> \>      doc->EndUndo(); \> \>      rdata->Message(MSG_UPDATE); \> \>      EventAdd(); \> \>      return TRUE; \> } \>

        cheers,
        Matthias

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          On 02/04/2008 at 18:29, xxxxxxxx wrote:

          Thank you for your example!!
          I could add object buffer into multipass.
          But I want to add multiple object buffers into multipass.
          For example 1, 2, .. and more. 
          Is it possible in C++ sdk?

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

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

            On 03/04/2008 at 01:45, xxxxxxxx wrote:

            ok, I modifed the code a bit, it now adds two object buffer channels:

            > \> Bool MenuTest::Execute(BaseDocument \*doc) \> { \>      RenderData \*rdata = doc->GetActiveRenderData(); \>      if(!rdata) return FALSE; \> \>      BaseContainer \*rbc = rdata->GetDataInstance(); \>      if(!rbc) return FALSE; \> \>      BaseContainer mpbc; \>      BaseContainer subbc; \>       \>      subbc.SetBool(RDATA_MULTIPASS_ACTIVE, TRUE); \>      subbc.SetLong(RDATA_MULTIPASS_SPECIALGROUP, 1); \>      mpbc.InsData(VPBUFFER_OBJECTBUFFER, GeData(subbc)); \>      subbc.SetLong(RDATA_MULTIPASS_SPECIALGROUP, 2); \>      mpbc.InsData(VPBUFFER_OBJECTBUFFER, GeData(subbc)); \> \>      doc->StartUndo(); \> \>      doc->AddUndo(UNDO_CHANGE, rdata); \> \>      rbc->SetContainer(RDATA_MULTIPASS_CHANNELS, mpbc); \> \>      doc->EndUndo(); \> \>      rdata->Message(MSG_UPDATE); \> \>      EventAdd(); \> \>      return TRUE; \> } \>

            cheers,
            Matthias

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

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

              On 03/04/2008 at 02:02, xxxxxxxx wrote:

              Thank you for your help!
              it could be going@well!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post