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.