Detect missing UserDataFader



  • 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



  • 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");  
        }
    


  • 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


Log in to reply