AllocateBufferFX



  • 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



  • 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.



  • 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



  • 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



  • 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()!



  • 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



  • 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



  • 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



  • 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;
    > }
    > _



  • 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



  • 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 :)


Log in to reply