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

    ContantBrowser Path Q

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 559 Views
    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 Offline
      Helper
      last edited by

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

      On 03/03/2010 at 06:18, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R11+ 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hoy, Hopefully a simple problem here:)

      Atm I load objects into my scene from a folder on the computer.
      However I'd like to load from the ContentBrowser.

      If I make a "hard" path I get the object such as:

        
      path->SetFullString("preset://SteadyCAMPRO303.lib4d/SCPROv303");   
      

      everything work fine.

      But to follow the safe, platform independent way I'm trying to set a correct path,
      such as:

        
      var path;   
      var loaddocname = "NameOfObject";   
      // Look in UserPrefs -> Browser   
      {   
      println("Search User Browser");   
      path = GeGetStartupWritePath();   
      path->AddLast("library");             if(!GeFileExist(path,TRUE)) {println("User Library folder not found");return;}   
      path->AddLast("browser");             if(!GeFileExist(path,TRUE)) {println("User Browser folder not found");return;}   
         // path->AddLast("preset://");             if(!GeFileExist(path,TRUE)) {println("User Preset folder not found");return;}   
      path->AddLast("steadycampro303");         
      path->SetSuffix("lib4d");              if(!GeFileExist(path,TRUE)) {println("User steadycampro303.lib4d not found");return;}   
      path->AddLast(loaddocname);   
      }   
      

      but get an error that the lib file is not found.
      I suppose the "preset://" part ( out commented here) is the culprit?
      How to access the :// part in the path?

      Cheers
      Lennart

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

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

        On 15/03/2010 at 08:05, xxxxxxxx wrote:

        Am I thinking wrong here?
        Or can I use the hard links as within a regular browser?

        Cheers
        Lennart

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

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

          On 17/03/2010 at 00:48, xxxxxxxx wrote:

          I am afraid you have to use Filename->SetFullString() in this case.

          cheers,
          Matthias

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

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

            On 17/03/2010 at 05:09, xxxxxxxx wrote:

            Thanks, I see.

            I don't have a Window machine to try with, how would the following
            be written so it get's correct in Windows?

              
            path->SetFullString("preset://SteadyCAMPRO303.lib4d/SCPROv303");   
            

            Cheers
            Lennart

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

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

              On 17/03/2010 at 06:32, xxxxxxxx wrote:

              path->SetFullString("preset://SteadyCAMPRO303.lib4d/SCPROv303");
              

              This should be ok. Windows accepts forward slashs. Just make if you use backslashs in strings you have to use double backslashs for each single backslash.

              for example

              println("c:\\test.c4d");
              

              prints

              c:	est.c4d
              

              cheers,
              Matthias

              cheers,
              Matthias

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