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

    fbx export plugin critical error

    Cinema 4D SDK
    r21 python
    5
    8
    1.1k
    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.
    • FSSF
      FSS
      last edited by

      Hi, im running the fbx-export plugin from within cinema4d r21 and run into a bug.

      documents.SaveDocument(doc, c4dPath, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, c4d.FORMAT_C4DEXPORT)
      
      saved_document =  documents.SaveDocument(doc, filePath, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, FBX_EXPORTER_ID)
      

      While it works fine manually using my chosen settings, it throws a critical error while called from the commandline.

      CRITICAL: Stop [exporttree.cpp(1908)]
      

      The parameters are identical.

      # Define the settings
      			fbxExport[c4d.FBXEXPORT_FBX_VERSION] = c4d.FBX_EXPORTVERSION_7_4_0
      			fbxExport[c4d.FBXEXPORT_FLIP_Z_AXIS] = False
      			fbxExport[c4d.FBXEXPORT_UP_AXIS] = c4d.FBXEXPORT_UP_AXIS_Y 
      			fbxExport[c4d.FBXEXPORT_ASCII] = False
      			fbxExport[c4d.FBXEXPORT_CLONE_OBJECTS] = True
      			fbxExport[c4d.FBXEXPORT_LIGHTS] = True
      			fbxExport[c4d.FBXEXPORT_SPLINES] = False
      			fbxExport[c4d.FBXEXPORT_TRACKS] = True
      			fbxExport[c4d.FBXEXPORT_INSTANCES] = True
      			fbxExport[c4d.FBXEXPORT_SUBSTANCES] = False
      			fbxExport[c4d.FBXEXPORT_SAVE_NORMALS] = True
      			fbxExport[c4d.FBXEXPORT_EMBED_TEXTURES] = True
      			fbxExport[c4d.FBXEXPORT_TEXTURES] = True
      			fbxExport[c4d.FBXEXPORT_CAMERAS] = False
      			fbxExport[c4d.FBXEXPORT_SDS] = True
      			fbxExport[c4d.FBXEXPORT_SDS_SUBDIVISION] = True
      			fbxExport[c4d.FBXEXPORT_SELECTION_ONLY] = False
      

      The file is identical.
      Ive searched online for the error, but i couldnt find a solution. Do you have a github repo were one could join the organization and look further into it?
      Im sorry for any typos, i have a deadline on friday and a regression.

      Have a nice evening you all.

      1 Reply Last reply Reply Quote 0
      • FSSF
        FSS
        last edited by

        So it turns out i somehow destroyed my cinema4d Install using the python API. I reinstalled it and added all plugins. And it worked.
        '''
        for i in range(1,1000)
        c4d.CallCommand(myPluginID + i)
        '''
        For reverse engineering is considered harmful.

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

          I'd be pretty concerned, if it's possible to destroy the C4D via the Python API (as long as I do not do any explicit file access on any installation files). If you can somehow reproduce it or at least have an idea, in which area of the API to look out for such dangers, I'd be grateful.

          1 Reply Last reply Reply Quote 0
          • FSSF
            FSS
            last edited by FSS

            So, yes, i can reproduce it.. and the error is pretty embarassing, though not obvious.. First the scenetree error is not related to this. At all. It was thus:
            I checked ahead of time wether the path to export to exists. For this i used makedir.. and foolishly the whole filePath.
            The result was the seeming fail to create a fbx. The reason being that the mkdir seems to create some horrible directory thing:
            That is killed it seems, but not fast enough for the fbx exporter to bump into it.

            In summary it works: If you do not throw a wrench into it via python file system. Its hard to debug though, as there is no indicator, but a flickering /fbx/ folder that appears for a moment.

            1 Reply Last reply Reply Quote 0
            • ManuelM
              Manuel
              last edited by

              hi,

              I would say that calling randomly plugin command can be dangerous yes.
              I would also point out that reverse engineering is forbidden in most of the cases.

              So, your problem is solved?

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

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

                @FSS Thanks for your looking into it and your explanation.

                1 Reply Last reply Reply Quote 0
                • ferdinandF
                  ferdinand
                  last edited by

                  Hello @FSS,

                  without any further questions and other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022.

                  Thank you for your understanding,
                  Ferdinand

                  MAXON SDK Specialist
                  developers.maxon.net

                  1 Reply Last reply Reply Quote 0
                  • K
                    kisaf
                    last edited by

                    Hi there, I have a similar problem. But I use R25 version.

                    If I write
                    exporterID[c4d.FBXEXPORT_SDS] = True or exporterID[c4d.FBXEXPORT_SDS] = False
                    I get error
                    AttributeError: parameter set failed

                    If I comment or remove this line, export works fine.

                    Maybe I should create a new topic with this issue.

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