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

    Fill a ComboBox with a file hierarchy

    Scheduled Pinned Locked Moved PYTHON Development
    1 Posts 0 Posters 134 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

      On 19/09/2014 at 05:56, xxxxxxxx wrote:

      I'm creating a dynamic dialog that contains a ComboBox gadget.
      I want to fill it (with AddChild) with the contents of a folder.
      I can do it easily with the filenames returned by os.listdir
      But only if there aren't any subfolders in the folder.
      What I wanted was to be able to create Childs and SubChilds in the ComboBox correspondend to the folders, subfolders and files inside a folder.
      I believe it is done with os.walk but, how can I fill the ComboBox hierarchy with the it?

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