Skip to content

Conversation

pbergeron-adsk
Copy link
Contributor

@pbergeron-adsk pbergeron-adsk commented Sep 3, 2025

Linked issues

This PR Addresses: SG-40198

Summarize your change.

This PR addresses 2 issues found in OpenRV to support Multiuser control of annotations.

First, when running/testing locally, the username is the same and the annotation ID is potentially the same, causing potential prop name conflicts. The prop name has the process id attached, to help differentiate such properties. There used to be a "computer" tag that went unused (a bug) which at the time aimed to do the same thing, but was never implemented properly.

Second, we now support events that draw on the viewport in NDC (normalized display coordinates) space. This allows annotation coords to be specified in a normalized [-1,1] space, which is much easier to use from a plugin (I'll spare the unfortunate details of trying to use absolute "pixel" or "event" coordinates). These functions aren't meant to be used for real live production purposes, they are there mainly for testing automation and scripting simultaneous strokes done in multiple RVs running locally on a single machine, because we don't have 8 hands and 4 mice ;)

Third, again for the purpose of drawing shapes automatically, we allow setting a color, eiher RGB or HSV. HSV is simpler to use because we can just change the hue and leave the color quite bright and visually distinctive.

Describe the reason for the change.

Automating the testing and bug fixing of concurrent strokes for live review.

Describe what you have tested and on which operating system.

Tested multiple clients on macos

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

Not at this stage

@pbergeron-adsk pbergeron-adsk added the do not merge Do not merge the PR label Sep 3, 2025
Signed-off-by: Patrick Bergeron <[email protected]>
Signed-off-by: Patrick Bergeron <[email protected]>
@pbergeron-adsk pbergeron-adsk changed the title Append process id to username in case user has multiple RVs running SG-40198: Prep work for testing automation of concurrent annotations Sep 8, 2025
@pbergeron-adsk pbergeron-adsk removed the do not merge Do not merge the PR label Sep 8, 2025
}
}

method: color_hsv (void; Event event)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setColorHSV() ?
To conform with the rest of the file since it uses camel case for methods if I am not mistaken.

Signed-off-by: Patrick Bergeron <[email protected]>
Copy link
Contributor

@bernie-laberge bernie-laberge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !
Thank you @pbergeron-adsk !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants