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
    • Recent
    • Tags
    • Users
    • Login

    Changing VideoPost Effect settings

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 566 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 18/04/2011 at 17:23, xxxxxxxx wrote:

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

      ---------
      Hi Guys,

      I'm trying to change the GI Mode option in the global illumination post effect.
      I've done this in Python and Coffee. But in C++ I'm getting and undefined ID error.

      BaseDocument *doc = GetActiveDocument();  
      RenderData *rdata = doc->GetActiveRenderData();      
      BaseVideoPost *post = rdata->GetFirstVideoPost();  
      BaseContainer *bc = post->GetDataInstance();  
        
      if(post->GetType() == VPglobalillumination)   
       {                   
      bc->SetReal(GI_SETUP_DATA_ANIMATION_METHOD,2); // Error:GI_SETUP_DATA_ANIMATION_METHOD is an Unidentified ID?                               
       }  
      

      Can anyone tell me what I'm doing wrong?

      -ScottA

      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 18/04/2011 at 23:44, xxxxxxxx wrote:

        you need an include to the gi definitions.
        the path should be:

        #include "../../modules/advanced render/advanced render/res/description/vpgisetup.h"

        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 19/04/2011 at 09:43, xxxxxxxx wrote:

          Thanks affa.
          That got me closer. But I still can't get the combo buttons to change properly.

          I'm using the ID's found in:modules/advanced render/advanced render/res/description/vpgisetup.h
          But I can't find  the combination to make them work with the combo buttons.
          I can make the value fields change just fine. But not the combo buttons.

            
          bc->SetReal(GI_SETUP_DATA_DIFFUSE_DEPTH, 6); //Works fine  
          bc->SetReal(GI_SETUP_DATA_ANIMATION_METHOD, GI_SETUP_DATA_ANIMATION_QMC_ENABLE); //Does Not Work-->Blank!  
          

          I've tried every combination of Enums and ID's I can think of. But I'm not finding the correct combination to make the combo buttons change.

          -ScottA

          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 19/04/2011 at 10:21, xxxxxxxx wrote:

            Ehm... Scott, ID is a long value. 😄

            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 19/04/2011 at 10:39, xxxxxxxx wrote:

              I tried using Long and it doesn't work either.

              bc->SetLong(GI_SETUP_DATA_ANIMATION_METHOD, GI_SETUP_DATA_ANIMATION_QMC_ENABLE);

              Fails.
              It sets the button to a blank value.

              I've also tried this:
              bc->SetLong(GI_SETUP_DATA_ANIMATION_QMC_ENABLE, TRUE);
              And it also fails.
              The button doesn't change. Not even to a blank state.

              I've also tried using the ID numbers listed in the .h file's enums instead of using the words
              Fails.
              I can't find the elusive ID combination to make these things change properly.

              *Update:
              I found it...Well I found one of them anyway.🙂

              bc->SetLong(GI_SETUP_DATA_ANIMATION_METHOD, GI_SETUP_MASTER_MODE_IC_QMC); //works!

              I went into: modules\advanced render\advanced render\res\description\vpgisetup.res
              And I found some ID's listed there in a way that makes it a little bit easier to understand how they are grouped and used in the UI.
              Now I just have to keep looking and see if I can find all the ones I need.

              Thanks for the help guys.

              -ScottA

              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 19/04/2011 at 14:10, xxxxxxxx wrote:

                Again, it is a LONG value.  TRUE/FALSE are Bool values.
                Seems like you found that you needed to set the proper LONG value for the GI mode. 🙂

                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 20/04/2011 at 08:29, xxxxxxxx wrote:

                  Yeah. I know it's supposed to be a LONG type.
                  When the ID's I was using didn't work for me I started trying other types just to make sure that wasn't the problem.

                  I've got it all working now.
                  The .res file really saved my butt with this. Because the way the ID's are listed in the .h file. It's not clear which ID's are supposed to be used together.
                  In the .res file you can see a sort of parent->child (group->child) relationship between the ID's needed to be used together. And it made it clear which two ID's need to be used in the setter function.

                  I guess I should probably post an example of Maxon's preferred method for setting these options.
                  Just in case anyone new to this stuff (like me) needs it:

                    
                  BaseVideoPost *post = rdata->GetFirstVideoPost();// assigns this variable to the first video post effect entry  
                  post->SetParameter(DescID(GI_SETUP_DATA_ANIMATION_METHOD), GeData(GI_SETUP_MASTER_MODE_IC_IC), DESCFLAGS_SET_0); //preferred way to set parameters  
                  post->SetParameter(DescID(GI_SETUP_DATA_DIFFUSE_DEPTH), GeData(5), DESCFLAGS_SET_0); //preferred way to set parameters  
                  

                  -ScottA

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