Please help - Python script



  • Hello everyone,
    First I am not a programmer, so please don't pay attention if my question is too silly.
    But I am having a problem to make a script I found online to work in my c4d R13.

    The problem :
    R13 does not support Alembic exporting, so I am not being able to import my PLA animations even when baked to Blender or Unreal Engine 4.
    So I found an old post, of someone who wrote this script below. But I cannot make it work. It does nothing when I pasted it in the script manager and clicked execute.

    The post can be found here: https://superuser.com/questions/148024/how-to-import-mesh-animation-from-cinema4d-into-blender

    Please roll down the page where he wrote :

    ''I needed to export Point Level Animation and Morph Tag animation into Blender so I wrote a little script that handles that.''

    The last post in the link, he also mentions PY4D, which I cant find anymore, but anyway , I think it is not needed because R13 has support for Python as in the newer versions.

    Anyone please can tell me the steps to make this script work ?



  • To make it do something, you would need to add the main() call, so instead of ending with "BlenderExport()", you'd write:

    def main():
        BlenderExport()
    
    if __name__=='__main__':
        main()
    

    Then you need to get rid of the sy. imports and replace them by c4d. references. Then you could at least start the plugin... and find that AttributeError: 'c4d.PolygonObject' object has no attribute 'GetPointAll'

    ...that's where I stopped. I assume there are other code lines to adapt, and I don't have a R13 installed for checking, plus, your Blender version will matter.

    To top it all, this is not even writing a format but creating another python script (which, I presume, you will need to execute in Blender to create the desired object). So, you will need to adapt the code of the script, AND adapt the code that is created (as I heard the Blender API changed considerably for 2.8?), depending on which program versions you use.

    Hate to be the bearer of bad news, but this is not a trivial exercise. Maybe there is someone else who already did such an adaption?


  • Global Moderator

    Hi,

    I'm afraid @Cairyn already contributed everything we could.
    We need to leave this to the community. Sorry.

    I have moved this to the General Programming & Plugins Discussions category, as I don't regard it as a very C4D specific question. Please, correct me, if I'm wrong.

    Cheers,
    Andreas