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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    DESCFLAGS_SET parameters and access violation

    SDK Help
    0
    3
    270
    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
      Helper
      last edited by

      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#50020

      Could 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.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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

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