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

    GetDocumentPath() folder or c4d file?

    SDK Help
    0
    4
    461
    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 17/02/2016 at 13:18, xxxxxxxx wrote:

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

      ---------
      I notice that if the project was saved, then the document path is to the folder containing the document C4D file.  If the project was saved with assets, then the document path is to the folder containing the folder with the document C4D file.

      I need to get to a file (an Alembic abc file) associated with the document file for a full path when there is only a filename for the Alembic file.

      Any easy way to resolve between the two possibilities?

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

        On 17/02/2016 at 13:52, xxxxxxxx wrote:

        Nothing to see here.  It appears that adding GetDocumentName() will either add the folder or add nothing if it is not in a 'project folder'.  Confusing but at least it works.

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

          On 18/02/2016 at 08:41, xxxxxxxx wrote:

          Hi Robert,

          to be honest, I'm not completely sure about your problem and how it got fixed.
          I know, you already left it behind, but if you find the time to explain it to me, I'd really like to understand it. Maybe we can improve our documentation.

          Also I'd like to throw GenerateTexturePath() into the mix. Despite it's name it can help to resolve path's for all kinds of assets. But as I said, I haven't fully understood your problem, so this might be off.

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

            On 19/02/2016 at 11:59, xxxxxxxx wrote:

            Here is what I think it is.  When GetDocumentPath() is used and then I use SetFile(), it doesn't append as much as it replaces the last folder with the filename.  If I do GetDocumentPath()+GetDocumentName() and then SetFile(), it is replacing the document file with the other file (correctly).  In the former case, that is how the document folder was being lost.  That is it. Resolved.

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