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

    Python SDK Questions - FBX Import and Folder / Subtool Management

    Scheduled Pinned Locked Moved ZBrush SDK
    windows
    1 Posts 1 Posters 24 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.
    • P Offline
      pablo31
      last edited by

      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

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