Python generator and FFD

  • 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?


  • 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__':
    :: <c4d.PointTag object called '' with ID 5600 at 0x0E7FB0E0>

  • 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

Log in to reply