使用 php 解压 .blend 文件数据的更简单方法?
目前我想使用 PHP 的 unpack()
函数从 .blend
文件中读取一些数据(元数据、场景名称、网格数、顶点数...)到 Blender SDNA
文档:
http://www.atmind.nl/blender/blender-sdna-256.html
是否有一些简单的解决方案可以使用一些现有的类或库读取所有这些信息,或者我必须这样做从文件中逐块读取并编写我自己的函数/类/库(这样我就可以创建类似对象的东西)?
Currently I want to read some data (metadata, scene names, mesh count, vertices count ...) from a .blend
file with the unpack()
function of PHP refering to the Blender SDNA
documentation:
http://www.atmind.nl/blender/blender-sdna-256.html
Is there some easy solution to read all these information with some existing classes or libraries or do I have to read block by block from the file and write my own functions / clas / library (so I can create something like an object)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在查阅 php 手册后,我可以告诉你,php 只是不提供读取二进制文件的方法,但我认为有很好的方法来做到这一点(受到 c 和 fread)
如果您有任何改进或提示,请将其发布在评论中,我很乐意扩展答案。
After consultation with php manual I can tell you that php just doesn't provide way to read binary files, but I think there's quite nice way to do this (inspirited by c and fread)
If you have any improvements or tips, just post them in the comment I'll be glad to extend the answer.