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
    • Register
    • Login

    Detect missing UserDataFader

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 246 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/01/2006 at 14:40, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.1&9.5 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi. I'm trying to figure out how to get a missing UserData slider on a tag to be detected as missing.
      If it is missing I would like to make the script to bypass it instead of the Console reporting: "parameter access failed".

      This is all using a COFFEE expression plugin Tag.
      The tag have 25 UserData faders.

      Opening an olders version, with only 24 UserData faders I do get the "parameter access failed" message.

      So basically for backwards compability reasons I'd like to make this possible.
      The problem I have is to find the correct version of:

      if (MyTag->GetUserDataObject() != TRUE)
      do this;
      else
      do that;

      Cheers
      Lennart

      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 25/01/2006 at 04:39, xxxxxxxx wrote:

        I don't think there's a way to know what parameters are avaiable. But you can use a try-catch block to catch the error:

            
            
            main(doc,op)  
            {  
              println("Before");  
              try  
              {  
                println(op#ID_USERDATA:3);  
              }  
              catch(ExLastException)  
              {  
                println("Error");  
              }  
              println("After");  
            }
        
        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 25/01/2006 at 13:52, xxxxxxxx wrote:

          Yes! Thank you very much. Works like a charm and will save loads of work loading older scenes.

          Cheers
          Lennart

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