Skip to content

Commit 5643dee

Browse files
SG-41173: Add uuid and soft_deleted properties for OTIO-based Live Review (#1021)
### SG-41173: Add uuid and soft_deleted properties for OTIO-based Live Review ### Summarize your change. - [X] Generate a UUID for each new drawn stroke with `generateUuid()` - [X] Add PyObject_Str in the MuPy converter to convert a UUID object to a string - [X] Add `findStrokeByUuid()` to retrieve the RV node string based on its uuid - [X] Update undo, redo and clear operations to use the uuid instead of the RV node string - [X] Send an internal event for undo and redo paint events with the list of affected strokes to allow the Live Review plugin to send PAINT_BATCH_UPDATE events with the corresponding uuids - [X] Add `soft_deleted` as a new OTIO Paint schema property required in the new PAINT_BATCH_UPDATE payload - [X] Update the OTIO Paint schema to version 2 (Note that this will prevent any apps from understanding strokes drawn by RV until they also update their version) ### Describe the reason for the change. These changes are needed to match the new requirements for undo-redo in OTIO-based Live Review sessions. All strokes drawn are received will identified via a uuid to manage their state. The `soft_deleted` property will be used to know if the stroke should be rendered or not. Note that the behaviour of the annotate mode should be the same as before. The only difference is that strokes are tracked through their uuid instead of their RV node string to facilitate the new implementation of undo-redo required for Live Review. This PR is needed for a second PR that will be created soon on the Commercial RV repo. ### Describe what you have tested and on which operating system. Drawing, undoing, redoing and clearing strokes was tested on macOS 15.6.1 with RV standalone and between two instances of RV in an OTIO-based Live Review session --------- Signed-off-by: Éloïse Brosseau <[email protected]>
1 parent e8d07ea commit 5643dee

File tree

5 files changed

+197
-69
lines changed

5 files changed

+197
-69
lines changed

src/lib/mu/MuPy/MuPy/PyModule.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ namespace Mu
5454
static NODE_DECLARATION(nPyTuple_GetItem, Pointer);
5555
static NODE_DECLARATION(nPyString_Check, bool);
5656
static NODE_DECLARATION(nPyFunction_Check, bool);
57+
static NODE_DECLARATION(nPyObject_Str, Pointer);
5758
static NODE_DECLARATION(nPyImport_Import, Pointer);
5859
static NODE_DECLARATION(nPy_TYPE, Pointer);
5960
static NODE_DECLARATION(nPyModule_GetName, Pointer);

src/lib/mu/MuPy/PyModule.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ namespace Mu
167167
new Function(c, "PyFunction_Check", nPyFunction_Check, None, Return, "bool", Parameters,
168168
new ParameterVariable(c, "obj", "python.PyObject"), End),
169169

170+
new Function(c, "PyObject_Str", nPyObject_Str, None, Return, "python.PyObject", Parameters,
171+
new ParameterVariable(c, "obj", "python.PyObject"), End),
172+
170173
new Function(c, "Py_TYPE", nPy_TYPE, None, Return, "python.PyTypeObject", Parameters,
171174
new ParameterVariable(c, "obj", "python.PyObject"), End),
172175

@@ -1046,6 +1049,13 @@ namespace Mu
10461049
NODE_RETURN(PyBytes_Check(obj));
10471050
}
10481051

1052+
NODE_IMPLEMENTATION(PyModule::nPyObject_Str, Pointer)
1053+
{
1054+
PyLockObject locker;
1055+
PyObject* obj = NODE_ARG_OBJECT(0, PyObject);
1056+
NODE_RETURN(PyObject_Str(obj));
1057+
}
1058+
10491059
NODE_IMPLEMENTATION(PyModule::nPyObject_CallObject, Pointer)
10501060
{
10511061
PyLockObject locker;

0 commit comments

Comments
 (0)