Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

FbxMesh.Clone() sometimes creating FbxNode as result with Python SDK 2019.5

FbxMesh.Clone() sometimes creating FbxNode as result with Python SDK 2019.5

Anonymous
Not applicable
933 Views
2 Replies
Message 1 of 3

FbxMesh.Clone() sometimes creating FbxNode as result with Python SDK 2019.5

Anonymous
Not applicable

I have Python code that clones an FbxMesh like this:

 

new_mesh = old_mesh.Clone(FbxCommon.FbxObject.eDeepClone, dest_scene)

logging.info("Data types: %s %s", old_mesh, new_mesh)

 

Strangely, this sometimes, and intermittently, returns an FbxNode rather than an FbxMesh as the type of the cloned object:

 

INFO: Data types: <fbx.FbxMesh object at 0x7f49a6e27050> <fbx.FbxNode object at 0x7f49a6ddb8a0>

 

I was running the same code with the 2018.1 version of the SDK without problem for a year or so, but since updating to 2019.5 this happens fairly regularly - roughly half the time I run the script on a dataset.

 

Unfortunately I can't share the larger code or data since both are very large.

 

I haven't been able to create a simple case to reproduce yet.

 

I saw some mention of Clone() being unsafe, but there are also recent SDK updates saying the problems have been resolved.

 

FbxCloneManager does not appear to be available in the Python SDK.

 

0 Likes
Accepted solutions (1)
934 Views
2 Replies
Replies (2)
Message 2 of 3

Jamie_Telford1
Participant
Participant
Accepted solution

Hey I'll reply since no one in Autodesk even exists here..

 

 
if lObj.ClassId == FbxMesh.ClassId:
        lMesh = lObj.GetNode().GetSrcObject(FbxCriteria.ObjectType(FbxMesh.ClassId))
        newMesh = FbxMesh.Clone(lMesh, FbxMesh.eDeepClone, FbxMesh.Create(lSdkManager, "newMesh"))
I'm filtering the mesh via the 'if' statement the cloning it..
and I second that the FbxCloneManager is missing..  Autodesk?? @daviesm? anyone?
Message 3 of 3

regalir
Autodesk
Autodesk

Indeed the FbxCloneManager is not implemented in the Python Bindings.

FYI, the FBX pythons bindings never provided the full C++ API functionality. However, in the next release of the FBX SDK (version 2020) that should become available soon. We decided to release the source .sip files so users can compile their own Python bindings.

0 Likes