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

    Python generator and FFD

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 352 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 15/07/2013 at 06:58, xxxxxxxx wrote:

      I trying to create a python generator with a FFD (later to be converted to a object plugin).

      import c4d
      #Welcome to the world of Python
        
      def main() :
          
          ffd = c4d.BaseObject(c4d.Offd)
          return ffd
      

      However, the object created is a BaseObject, so it must be converted first to a PointObject in order to access the point values.
      I tried to make it editable with the modelling command, but it doesn't work.

      Any examples or clues?

      -pim

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

        On 15/07/2013 at 10:21, xxxxxxxx wrote:

        i guess the ffd has to be inserted into the active document in order to be casted into a point object. the only way i could think of setting up an ffd programmatically is that there is some kind of hidden variable tag attached to the baseobject that let you write the point data. but that is just a wild guess. you are most likely unable to do it (at least in python) and would have to write your own ffd, which won't be hard but pretty slow in python.

        edit : i just checked it, it seems that i was correct.

        import c4d
        from c4d import gui
        #Welcome to the world of Python
          
          
        def main() :
            ffd = c4d.BaseList2D(c4d.Offd)
            for tag in ffd.GetTags() :
                print tag
          
        if __name__=='__main__':
            main()
          
        :: <c4d.PointTag object called '' with ID 5600 at 0x0E7FB0E0>
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 17/07/2013 at 08:44, xxxxxxxx wrote:

          Yes, you are correct (again). Thanks for setting me on the right track.
          FFD has a hidden tag. Using GetAllHighlevelData I can get all point data.

          Thanks, Pim

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