Expose buffer interpretation helpers to python

This commit is contained in:
baldurk
2026-08-13 21:05:15 +01:00
parent 2fbf67493f
commit e20c2b9985
19 changed files with 799 additions and 294 deletions
+2 -2
View File
@@ -1148,13 +1148,13 @@ bool RichResourceTextMouseEvent(const QWidget *owner, const QVariant &var, QRect
if(!ptrType.members.isEmpty())
{
Packing::Rules pack = BufferFormatter::EstimatePackingRules(ResourceId(), ptrType);
PackingRules pack = BufferFormatter::EstimatePackingRules(ResourceId(), ptrType);
// for scalar-wrapped structs (generated by 'float *foo' type declarations) use scalar
// packing by default as that's probably what people will want most often and if we
// guess we're going to guess very conservatively.
if(ptrType.name.isEmpty() && ptrType.members.size() == 1)
pack = Packing::Scalar;
pack = PackingRules::Scalar();
formatter = BufferFormatter::DeclareStruct(pack, ResourceId(), ptrType.name,
ptrType.members, ptrType.arrayByteStride);