Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing then reading PDB files under windows x64 #16

Open
MichaelEtienne opened this issue Jul 11, 2011 · 2 comments
Open

Writing then reading PDB files under windows x64 #16

MichaelEtienne opened this issue Jul 11, 2011 · 2 comments

Comments

@MichaelEtienne
Copy link

Hello,

I know there is a closed issue related to reading 64bits pdb file and that a fix has been provided, here is the log for the fix :

"Now we support .pdb32 .pdb64 and .pdb extensions. .pdb32 forces
32-bit write, .pdb64 forces 64-bit write, and .pdb writes 64 bit. .pdb reads will
try to detect 32 bit or 64 bit (which seemed to work on my demo files)."

With a win x64, when I write a pdb file using partio and then when I want to read it, I get the Partio: Attribute 'xxx' cannot map type error.
I think the problem comes from the writing process : Partio always writes 32 bit pdb files using the call

bool writePDB(const char* filename,const ParticlesData& p,const bool compressed)
{return writePDBHelper<32>(filename,p,compressed);}

On the reading side, partio will detect 64 bit and then will call
readPDBHelper<64>(filename,...)
And I get the reading error...

I think that a test on the OS for the writing process would fix this issue.
Thanks.

@MichaelEtienne
Copy link
Author

Sorry, some characters are missing in my previous post, seems they have been interpreted...

bool writePDB(const char* filename,const ParticlesData& p,const bool compressed)
{return writePDBHelper < 32 > (filename,...);}

and readPDBHelper < 64 > (filename,...)

@aselle
Copy link
Contributor

aselle commented Jul 18, 2011

The detection is error prone at best, because there is really no reliable way to tell which format it is. This stems from the struct definition that Autodesk uses to write files was based on a pointer type instead of a stable sized type, so when they went 64-bit the pdb format changed. Unfortunately, this makes a cross 32bit/64bit compatibility really hard. In the interim it probably makes sense to always write what the native platform is. I'll do some testing and check in a fix. If a user wants to override they can always rename the extension to pdb32 or pdb64.

pmolodo pushed a commit to LumaPictures/partio that referenced this issue Sep 24, 2013
stopped hard-coding  24fps and  computed it from the  settings in the  session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants