DESCFLAGS_SET parameters and access violation
-
On 16/09/2016 at 01:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;---------
Hello.I have a scenario in which a tag data plugin is applied to an object.
I get access violation when I try to copy a filename parameter from the TagData to the object in Read method of that TagData.Here is the code:
GeData from_data; tag->GetParameter(FILENAME_PARAM, from_data, DESCFLAGS_GET_0); object->SetParameter(LIGHT_PHOTOMETRIC_FILE, from_data, DESCFLAGS_SET_0);
The object and the tag belong to an Xref object.
Nevertheless, when I use DESCFLAGS_SET_PARAM_SET instead of DESCFLAGS_SET_0, I don't get the crash.The object I'm referring to is a light object and the filename parameter I try to set is the photometric one.
I have seen this:
https://developers.maxon.net/forum/topic/9440/12650_trying-to-changeupdate-ies-filename-in-lightsourc&KW=DESCFLAGS_SET_0+DESCFLAGS_SET_&PID=50020#50020Could you please give me some hints regarding the DESCFLAGS_SET values and when to use them as parameters ? (Any documentation or example would be much appreciated).
I have used DESCFLAGS_SET_0 and DESCFLAGS_GET_0 almost everywhere and I didn't have a problem.
Thank you.
-
On 16/09/2016 at 13:23, xxxxxxxx wrote:
Edit: I got all the information i needed regarding the GetDParameter and SetDParameter from https://developers.maxon.net/forum/topic/9715/13064_getdatainstance-and-getparameter-in-tagdata-read
Now what's left to solve is why I get the access violation on light_object.SetParameters(...).
The issue appears only when the object belongs to a separate project file and i retrieve it via Xref.thnx again.
-
On 19/09/2016 at 08:51, xxxxxxxx wrote:
Hello,
so far I could not reproduce an access violation or any other error based on your description. Please notice that by default a Xref prevents anyone from changing the imported objects, including any tags. So your tag might only be able to change the parameter when you make parameters editable (see documentation).
best wishes,
Sebastian