ShapeAnchorHelper

class omni.ui.ShapeAnchorHelper

Bases: pybind11_object

The ShapeAnchorHelper provides common functionality for Shape Anchors.

Methods

__init__(*args, **kwargs)

call_anchor_fn(self)

Sets the function that will be called for the curve anchor.

get_closest_parametric_position(self, ...)

Function that returns the closest parametric T value to a given x,y position.

has_anchor_fn(self)

Sets the function that will be called for the curve anchor.

invalidate_anchor(self)

Function that causes the anchor frame to be redrawn.

set_anchor_fn(self, fn)

Sets the function that will be called for the curve anchor.

Attributes

anchor_alignment

This property holds the Alignment of the curve anchor.

anchor_position

This property holds the parametric value of the curve anchor.

__init__(*args, **kwargs)
call_anchor_fn(self: omni.ui._ui.ShapeAnchorHelper) None

Sets the function that will be called for the curve anchor.

get_closest_parametric_position(self: omni.ui._ui.ShapeAnchorHelper, position_x: float, position_y: float) float

Function that returns the closest parametric T value to a given x,y position.

has_anchor_fn(self: omni.ui._ui.ShapeAnchorHelper) bool

Sets the function that will be called for the curve anchor.

invalidate_anchor(self: omni.ui._ui.ShapeAnchorHelper) None

Function that causes the anchor frame to be redrawn.

set_anchor_fn(self: omni.ui._ui.ShapeAnchorHelper, fn: Callable[[], None]) None

Sets the function that will be called for the curve anchor.

property anchor_alignment

This property holds the Alignment of the curve anchor.

property anchor_position

This property holds the parametric value of the curve anchor.