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

    CUSTOMGUI_FILENAME

    SDK Help
    0
    4
    417
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 27/05/2003 at 08:48, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      How do you get back the selected filename?
      I have a dialog (manually cretead) that shows the filename I can't find and below it the customgui_filename box, which lets me browse to the file I need. But I can't get the selected file back.

      Since I couldn't find an res for the container it uses, I tried creating both a string and a filename in id 0 of the container, to see if it would fill it in. No such luck! I assume I am using the basecontainer that I pass to the addcustomgui call, but I can't figure out how to get this last step to work. Is there some sample code showing how to recover data from a custom gui (I couldn't find anything in the docs or forum)? And how do you know what variables a customgui uses?

      (My previous issue with the material containers was I was using the enums I found for the material class - MATERIAL_COLOR_COLOR etc instead of CHANNEL_COLOR). Works now!

      David

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 27/05/2003 at 23:53, xxxxxxxx wrote:

        Normally you would do something like gui->GetData().GetValue().GetFilename(). (The datatype of FilenameCustomGui is finally documented in the latest docs... 🙂

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 28/05/2003 at 10:51, xxxxxxxx wrote:

          Do not understand - the only ref I can find is:

          class FilenameCustomGui : public BaseCustomGui<CUSTOMGUI_FILENAME>
          {
          FilenameCustomGui();
          public:

          };

          define CUSTOMGUI_FILENAME 1000478

          Does it actually say that is uses a single filename anywhere?

          Where can I see what data element(s) that a customgui creates/uses?
          ---

          I created it with -
          BaseContainer FileData;
          FilenameCustomGui *guiFile;
          guiFile = (FilenameCustomGui * )AddCustomGUI(100012,1000478,"Find File:",0,600,0,FileData);

          Runs and finds file.
          Tried -
          Filename myfilename;
          myfilename = guiFile->getData().getValue().getFilename();
          crashed.
          The GetValue returns the GEData.

          Why is the BaseContainer empty (index 0 = nullid)? Is It just used for input settings to those guis that need them?

          I also tried to preload index 0 with a filename, but it did not help, getFilename still crashed.

          What am I doing wrong here?

          Thanks,
          David

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 28/05/2003 at 11:02, xxxxxxxx wrote:

            What's crashing is the getData().
            Tried-
            TriState<GeData> myGE;
            myGE = guiFile->getData();

            Crashes. What am I missing? GE is non-zero from the AddCustomGui call.

            David

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