Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Noob wants to load custom palette

    General Talk
    python
    2
    3
    585
    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.
    • R
      rauvfx
      last edited by ferdinand

      Hi everybody,

      I am trying to load a custom palette via python script and an absolute file path using R25, which should then be assigned to a keyboard shortcut.
      This experiment gives me a syntax error:

      import c4d
      from c4d import gui
      def main():
          c4d.documents.LoadFile(C:/Users/User/Desktop/HB_Layout/palette_Basictools.l4d)
      
      if __name__=='__main__':
          main()`
      

      Please give me some help.

      1 Reply Last reply Reply Quote 0
      • CairynC
        Cairyn
        last edited by

        Your file name / path is missing the quote marks.

        (Can't check the indents as the code is not properly formatted.)

        R 1 Reply Last reply Reply Quote 0
        • R
          rauvfx @Cairyn
          last edited by

          @cairyn Thanks a lot ... it works!

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