DEV Community

Shoichi Okaniwa
Shoichi Okaniwa

Posted on • Originally published at qiita.com

Differences Between pScene and lScene in FBX SDK

Differences Between pScene and lScene in FBX SDK

When examining sample code for the FBX SDK, whether in C++ or Python, you often encounter variables named pScene and lScene. Both are instances of the FbxScene class, but the difference between the p and l prefixes piqued my interest, so I investigated further.

pScene Is an Argument and lScene Is a Local Variable

The explanation can be found on the following page from the official documentation: Autodesk FBX / Information and technical support

Surprisingly, pScene is an argument while lScene is a local variable!

In summary, the prefixes mean the following:

Prefix Meaning Example
Fbx Prefix for classes provided by FBX SDK FbxScene
p Prefix for function/method arguments pScene
l Prefix for local variables lScene
g Prefix for global variables gScene
m Prefix for member variables of a class mScene

Dividing naming so precisely feels quite C++-like.

In Conclusion

Understanding this difference clarified a lot for me!

Incidentally, before investigating, I had mistakenly assumed they were using Systems Hungarian notation. In Systems Hungarian, p typically indicates a pointer and l indicates a long type. I'm glad I took the time to research it!

Top comments (0)