Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    AllocateBufferFX

    Scheduled Pinned Locked Moved SDK Help
    11 Posts 0 Posters 937 Views
    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 Offline
      Helper
      last edited by

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

      On 04/10/2007 at 10:12, xxxxxxxx wrote:

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

      ---------
      Hi all,

      what's the way to get the AllocateBufferFX?

      > _
      > nbuffer = render- >AllocateBufferFX(videoBufferStatusAndDepth[rIndex].mult, geResource.LoadString(i), videoBufferStatusAndDepth[rIndex].depth, TRUE);
      >
      > nbuffer is ok, because return me incremented number.
      >
      > then:
      >
      > videoBufferStatusAndDepth[rIndex].vpbuffers = render->GetBuffer(VPBUFFER_POSTEFFECT,nbuffer);
      >
      > or
      >
      > videoBufferStatusAndDepth[rIndex].vpbuffers = render->GetBuffer(nbuffer,0);_

      but still my vpBuffers == 0x000000;

      Any help ?

      Renato

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

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

        On 04/10/2007 at 14:58, xxxxxxxx wrote:

        Did you add the "Post Effect" Buffer in the multipass settings in cinema 4d? This is necessary, otherwise it will be NULL.

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

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

          On 04/10/2007 at 16:08, xxxxxxxx wrote:

          Yes, i added it and i see all custom buffers added in the picture viewer.. but still i can't get VPBuffers * except the first.

          Cheers
          Renato

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

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

            On 04/10/2007 at 18:56, xxxxxxxx wrote:

            Really i have no chance 🙂

            > _
            > LONG rIndex;
            >           for (bufId = MULTIPASS_ATMOSPHERE; bufId < MULTIPASS_RAWTOTALLIGHT + 1; bufId++) {
            >
            >                rIndex = bufId - MULTIPASS_ATMOSPHERE;
            >
            >                if (bc->GetBool(bufId)) {
            >
            >                     LONG postEffectType = videoBufferStatusAndDepth[rIndex].mult;
            >                     LONG depth = videoBufferStatusAndDepth[rIndex].depth;
            >
            >                     nbuffer = render->AllocateBufferFX(postEffectType, geResource.LoadString(bufId), depth, TRUE);
            >                     videoBufferStatusAndDepth[rIndex].vpbuffers = render->GetBuffer(postEffectType, nbuffer);
            >                     videoBufferStatusAndDepth[rIndex].Id = nbuffer;
            >                }
            >                else
            >                     videoBufferStatusAndDepth[rIndex].vpbuffers = NULL;
            >           }
            > _

            This Code always return
            videoBufferStatusAndDepth[rIndex].vpbuffers == NULL 😞

            Cheers
            Renato

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

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

              On 05/10/2007 at 01:44, xxxxxxxx wrote:

              Are you allocating the buffer in VideoPostData::AllocateBuffers()? And if so, why are you also calling GetBuffer in the same virtual routine? You should call GetBuffer in Execute if I remember correctly. Definetly not inside AllocateBuffers()!

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

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

                On 05/10/2007 at 03:01, xxxxxxxx wrote:

                Hello Kataki,

                ok.. this can be ok to me 🙂

                Because there are no apparent reason to not work.

                Trying and notifying you if will work.

                Thanks 😉
                Renato

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

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

                  On 05/10/2007 at 04:37, xxxxxxxx wrote:

                  who is Kataki? ;-D

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

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

                    On 05/10/2007 at 05:33, xxxxxxxx wrote:

                    Hello Katachi 🙂

                    still not working.
                    I've allocate buffers in:
                    virtual void AllocateBuffers(PluginVideoPost* node, Render* render, BaseDocument* doc)

                    and Assigned them to my array in Execute... still 0x00000000 😞

                    thanks for your suggestion
                    Renato

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

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

                      On 05/10/2007 at 06:46, xxxxxxxx wrote:

                      Hmm, it should work. Here is some code that should get you going. I think it´s maybe that you try to get it either too early (or maybe too late...I cannot really remember, this is old code) :

                      > _VPBuffer      *buf;
                      > LONG bid;
                      >
                      > void DurationMap::AllocateBuffers(PluginVideoPost *node, Render *render, BaseDocument *doc)
                      > {
                      >      bid = render->AllocateBufferFX(VPBUFFER_POSTEFFECT, "Duration Map", 8, TRUE);
                      > }
                      >
                      > LONG DurationMap::Execute(PluginVideoPost *node, VideoPostStruct *vps)
                      > {
                      >      if (vps->vp==VP_FRAME && vps->open && !vps->editor_render)
                      >      {
                      >           buf = vps->render->GetBuffer(VPBUFFER_POSTEFFECT,bid);
                      >           if(buf)
                      >           {
                      >                //Do something with Buffer...
                      >           }
                      >      }
                      > return RAY_OK;
                      > }
                      > _

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

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

                        On 05/10/2007 at 09:11, xxxxxxxx wrote:

                        Thanks Katachi,

                        now it's working in VP_FRAME 🙂

                        Thanks a lot
                        Renato

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

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

                          On 05/10/2007 at 09:54, xxxxxxxx wrote:

                          You´re welcome 🙂

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