Melange data on Display Tags [SOLVED]

  • On 14/06/2016 at 11:20, xxxxxxxx wrote:

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

    I've just been getting started diving into Melange, and the first problem I've encountered is that getting parameters from a Display Tag returns incorrect data. It seems to return the default state of the tag data rather than any changes made in the file.

    My file consists of a single cube with a display tag on it with Visibility toggled on, and set to 69%, and Textures toggled off. The Use option for both Visibility and Textures is also toggled on.

    if (tag->GetType() == Tdisplay) {
        if (tag->GetParameter(DISPLAYTAG_AFFECT_VISIBILITY, data)) {
            if ((bool)data.GetBool()) {
                printf("\n   \+ Visibility Active = true");
            } else {
                printf("\n   \+ Visibility Active = false");
        if (tag->GetParameter(DISPLAYTAG_VISIBILITY, data) && data.GetFloat()) {
            printf("\n   \+ Visibility = %f", data.GetFloat());
        if (tag->GetDParameter(DISPLAYTAG_TEXTURES, data)) {
            if ((bool)data.GetBool()) {
                printf("\n   \+ Textures = true");
            } else {
                printf("\n   \+ Textures = false");

    this prints out:

      \+ Visibility Active = false
      \+ Visibility = 1.000000
      \+ Textures = true

    This result does not reflect the actual file, which should have visibility active set to true, with a value of 69.0, and textures set to false.

    However, if I get the parameters of the phong tag, or I add a compositing tag and make adjustments, both of those return accurate data, so I'm confident my parameter requesting code is not the problem.

  • On 14/06/2016 at 13:06, xxxxxxxx wrote:

    for what it's worth, the only display tag parameter that appears to be accurate is DISPLAYTAG_SDISPLAYMODE, all other parameters report the same default values that are in place when the tag is first created, regardless of what the actual saved values are.

  • On 15/06/2016 at 03:13, xxxxxxxx wrote:


    this seems like a bug in the Melange library. Thanks for reporting this, a bug report was filed.

    An alternative to accessing a parameter using GetParameter() is to access the data stored in the BaseContainer. It seems that the data stored in the BaseContainer is correct:

    BaseContainer bc = tag->GetData();  
    const Bool affectVisibilityFromBC = bc.GetBool(DISPLAYTAG_AFFECT_VISIBILITY);  
      printf("affect Visibility\n");  
      const Float visiblity = bc.GetFloat(DISPLAYTAG_VISIBILITY);  
      printf("Visibility = %f \n", visiblity);  

    Best wishes,

  • On 16/06/2016 at 09:49, xxxxxxxx wrote:

    Great, thanks so much! I'll give this code a try shortly. I also tried to file a bug report myself via the email that is listed on the About page, but it got bounced back, saying that address doesn't exist.

  • On 17/06/2016 at 01:28, xxxxxxxx wrote:


    we are terribly sorry about the wrong email address. We originally planned to have a dedicated email address, then dumped that idea and completely forgot to change the About page. 😠
    Thanks for pointing it out. The About page got corrected.
    In short: For bug reports either use the Bug Report subforum here in Plugin Café or send a mail to our usual address
    Sorry for any inconvenience caused.

Log in to reply