CURA-9839 add bridging and overhang line type color scheme - #17
Conversation
Co-authored-by: wawanbreton <601114+wawanbreton@users.noreply.github.com>
Co-authored-by: wawanbreton <601114+wawanbreton@users.noreply.github.com>
CURA-9839
CURA-9839
CURA-9839
Remco Burema (rburema)
left a comment
There was a problem hiding this comment.
Good work! I think the bulk of the work has gone into these changes... At least we now have the ability to deal with repeated messages of any type we could already deal with! 😄
Other comments here are more questions rather than anything else.
| Py_DECREF(list); | ||
| return nullptr; | ||
| } | ||
| PyList_SET_ITEM(list, i, item); // steals reference |
There was a problem hiding this comment.
I take it you mean it sets item to nullptr (and/or doesn't set it but then the data refers to has become invalid, because it's been moved)?
There was a problem hiding this comment.
Well, the item pointer itself will remain as it is, but as I understand it, the pointed-to object is actually a Python reference, and by calling PyList_SET_ITEM, you invalidate this reference, a bit like doing a move indeed. The pointer is still here but you should not use it anymore. Would you like to suggest a better comment ? This one was AI-generated, so I'm totally fine with changing it.
| Py_DECREF(iter); | ||
| if (PyErr_Occurred()) | ||
| { | ||
| return; |
There was a problem hiding this comment.
Should be sent some string to the error-system here? (Like with PyErr_SetString(...) above.) Or do we only do that when we set the error (and the underlying system might not know about it yet).
There was a problem hiding this comment.
Honestly, I don't know. I don't really expect this part of code to fail anyway, so this is mostly sanity checking.
But wait, this test is really useless anyway. If there is an error, we do return, and if not, we also return 😄 I'll remove it...
CURA-9839
This PR adds the support of
repeatedprotobuf properties, so that we can retrieve them from Python as a regular list.It also polishes the C++ code to modernize it and remove some warnings.
Contributes to Ultimaker/Cura#21766
CURA-9839