(parent, instance, objId, context, depth)
| 1061 | # ----------------------------------------------------------------------------- |
| 1062 | |
| 1063 | def pwfSerializer(parent, instance, objId, context, depth): |
| 1064 | nodes = [] |
| 1065 | |
| 1066 | for i in range(instance.GetSize()): |
| 1067 | # x, y, midpoint, sharpness |
| 1068 | node = [0, 0, 0, 0] |
| 1069 | instance.GetNodeValue(i, node) |
| 1070 | nodes.append(node) |
| 1071 | |
| 1072 | return { |
| 1073 | "parent": getReferenceId(parent), |
| 1074 | "id": objId, |
| 1075 | "type": class_name(instance), |
| 1076 | "properties": { |
| 1077 | "range": list(instance.GetRange()), |
| 1078 | "clamping": instance.GetClamping(), |
| 1079 | "allowDuplicateScalars": instance.GetAllowDuplicateScalars(), |
| 1080 | "nodes": nodes, |
| 1081 | }, |
| 1082 | } |
| 1083 | |
| 1084 | # ----------------------------------------------------------------------------- |
| 1085 |
nothing calls this directly
no test coverage detected