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

    Please help - Python script

    Cinema 4D SDK
    python
    3
    3
    932
    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.
    • P
      P_ron81
      last edited by a_block

      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 ?

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

        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?

        1 Reply Last reply Reply Quote 1
        • a_blockA
          a_block
          last edited by

          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

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