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
    • Register
    • Login
    1. Maxon Developers Forum
    2. pablo31
    3. Posts
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 0

    Posts

    Recent Best Controversial
    • Python SDK Questions - FBX Import and Folder / Subtool Management

      Hello everyone,
      I'm trying to get started with the new python API, and I'm struggling to get things working. I’d appreciate any insight on the following:

      Importing FBX

      I'm unable to automate fbx importing, from the documentation I figured something like this would work, but the file explorer dialog keeps opening.

      import zbrush.commands as zbc
      zbc.set_next_filename("c:\\MyModel.fbx")
      zbc.press("Zplugin:FBX ExportImport:Import")
      

      Folder Creation

      I want to automate folder creation and naming

      zbc.press("Tool:SubTool:New Folder")
      

      This correctly calls the "New Folder" button, but how can I automate what gets typed into the popup dialog? Can I create folders with a specific name without user typing the name?

      Subtool Renaming

      Is there any way to rename the subtools inside a tool? I guess this is a similar question to the Folder creation, if I can fill the text in the popup from the ui button, this would be easy.
      The closest thing I got was renaming just the first subtool by renaming the tool itself:

      zbc.set_tool_path(zbc.get_active_tool_index(), f"MyFirstSubtool")
      

      Is there a way to fill or interact with these popup dialogs?

      Thanks in advance

      posted in ZBrush SDK windows
      P
      pablo31