Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Culling Mode: FBX SDK

1 REPLY 1
SOLVED
Reply
Message 1 of 2
joe.abreu
1028 Views, 1 Reply

Culling Mode: FBX SDK

I am trying to work out the culling mode of objects inside an FBX file. I can't seem to find any references online or otherwise on how to find this information out.

 

Example Fbx file snippet:

Model: 67229744, "Model::Plane", "Mesh" {
  Version: 232
    Properties70: {
      P: "PreRotation", "Vector3D", "Vector", "",90,-0,0
      P: "RotationActive", "bool", "", "",1
      P: "ScalingMax", "Vector3D", "Vector", "",0,0,0
    }
  Shading: Y
  Culling: "CullingOff" // how to get this information
}

 

I am using the Python FBX SDK bindings and have tried displaying all the properties of a node I can find:

 

def displayProperties(node):

  prop = object.GetFirstProperty()
  while prop.IsValid():

    print("{}: {} {} {}".format(node.GetName(), prop.GetLabel(), prop.GetName(), prop.GetPropertyDataType().GetName()))
    prop = object.GetNextProperty(prop)

 

displayProperties(node) // does not contain Culling data

displayProperties(node.GetGeometry()) // does not contain Culling data

displayProperties(node.GetMesh()) // does not contain Culling data

 

None of the displayed properties contain any culling info.

 

I know there must be a way to get this data because I can import a file using this SDK, convert it to ascii and I can clearly see the culling information is there.

 

I have even found the following function:

 

node.GetShadingMode()

 

which returns the correct Shading: information stored which seems to be at the same "fbx hierarchical level", but I can find not a single function that tells me the culling state. Any ideas?

Tags (3)
1 REPLY 1
Message 2 of 2
regalir
in reply to: joe.abreu

Hi,

 

unfortunately there is no way to access/manipulate the Culling value in Python. In the C code, the value is not stored as a property thus, it does not get exposed. Also, this variable is stored in the "undocumented and subject to change without notice" section of the C API class; meaning that, even if you decide to use the FBX SDK C API instead of Python, the variable can disappear anytime (or never 😉

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report