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

    Res.h files are not read by Python?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 341 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 22/03/2015 at 04:18, xxxxxxxx wrote:

      I always assumed that .h files are not read by python, but looking at the example Py-LookAtCamera I think i am wrong!
      The example uses c4d in front of the variable, see below, without defining it.

      How is it done?

      data.SetBool(c4d.PYLOOKATCAMERA_PITCH, True)
      

      Here the .h file of the example

      #ifndef _Tpylookatcamera_H_
      #define _Tpylookatcamera_H_
        
      enum
      {
          PYLOOKATCAMERA_PITCH     = 1000
      }
        
      #endif
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 22/03/2015 at 06:22, xxxxxxxx wrote:

        They are, sort of, but its buggy/laggy in that it often won't update when
        you add or remove symbols and you have to delete the symbolcache
        file to force a reload.

        You could bring the symbols into your Python Plugin by hand. I got
        tired of this and I'm always using my c4d.dev script to extract the
        symbols and bring them into a format you can easily read/import from
        or paste into your Python plugin. It's not only reliable  but also gives you
        some extra shortcuts for handling with resorce symbol and files. The
        Readme should get you started.

        https://github.com/NiklasRosenstein/nr.c4d.dev

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

          On 22/03/2015 at 10:27, xxxxxxxx wrote:

          Great, thank you.

          -Pim

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