Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/makesrna.c
| Context not available. | |||||
| fprintf(f, "\t_data = (char *)_parms->data;\n"); | fprintf(f, "\t_data = (char *)_parms->data;\n"); | ||||
| } | } | ||||
| int buf_size = 0; | |||||
| int parm_size = 0; | |||||
| dparm = dfunc->cont.properties.first; | dparm = dfunc->cont.properties.first; | ||||
| for (; dparm; dparm = dparm->next) { | for (; dparm; dparm = dparm->next) { | ||||
| type = dparm->prop->type; | type = dparm->prop->type; | ||||
| Context not available. | |||||
| } | } | ||||
| if (dparm->next) { | if (dparm->next) { | ||||
linux_dr: I keep seeing `parm` and reading "parmesan"... May we rename this `param`? | |||||
| fprintf(f, "\t_data += %d;\n", rna_parameter_size(dparm->prop)); | parm_size = rna_aligned_parameter_size(buf_size, dparm->prop, dparm->next->prop); | ||||
| buf_size += parm_size; | |||||
| fprintf(f, "\t_data += %d;\n", parm_size); | |||||
| } | } | ||||
linux_drAuthorUnsubmitted Done Inline ActionsI really think this should be: fprintf(f, "\t_data += sizeof(%s)", parm_typename);
if (parm_padding > 0) {
fprintf(f, " + %d", parm_padding);
}
fprintf(f, ";\n");but we'd need the type name as a string, and the padding as a separate value. linux_dr: I really think this should be:
```
fprintf(f, "\t_data += sizeof(%s)", parm_typename);
if… | |||||
linux_drAuthorUnsubmitted Done Inline ActionsWould improving the readability of the generated code be acceptable as a separate patch?0 linux_dr: Would improving the readability of the generated code be acceptable as a separate patch?0 | |||||
| } | } | ||||
| Context not available. | |||||
I keep seeing parm and reading "parmesan"... May we rename this param?