pub struct ObsSceneGroupRef { /* private fields */ }Expand description
A managed libobs group scene-item.
Groups behave like ordinary scene items for transforms/order, while their child items live in libobs’s dedicated group scene. Reparenting uses libobs’s native group operations rather than reconstructing transforms in Rust.
Implementations§
Source§impl ObsSceneGroupRef
impl ObsSceneGroupRef
pub fn name(&self) -> &ObsString
Sourcepub fn add_item<T: SceneItemTrait + ?Sized>(
&self,
item: &T,
) -> Result<(), ObsError>
pub fn add_item<T: SceneItemTrait + ?Sized>( &self, item: &T, ) -> Result<(), ObsError>
Moves an already-managed scene item into this group. libobs preserves its apparent canvas transform while changing parentage.
Sourcepub fn remove_item<T: SceneItemTrait + ?Sized>(
&self,
item: &T,
) -> Result<(), ObsError>
pub fn remove_item<T: SceneItemTrait + ?Sized>( &self, item: &T, ) -> Result<(), ObsError>
Removes a child from this group and reparents it to the containing scene.
Sourcepub fn items_in_order(&self) -> Result<Vec<Arc<dyn SceneItemTrait>>, ObsError>
pub fn items_in_order(&self) -> Result<Vec<Arc<dyn SceneItemTrait>>, ObsError>
Returns group children in libobs’s actual bottom-to-top native order.
Sourcepub fn ungroup(&self) -> Result<Vec<ObsUngroupedItem>, ObsError>
pub fn ungroup(&self) -> Result<Vec<ObsUngroupedItem>, ObsError>
Dissolves this group and returns replacement handles for every child.
libobs implements ungrouping by creating new parent-scene items and copying each child into them. Consequently, existing child handles cannot remain the identity of the visible item. This method marks those old handles removed, rebinds the scene registry, and returns a mapping from each previous object ID to its replacement managed handle.
Trait Implementations§
Source§impl Clone for ObsSceneGroupRef
impl Clone for ObsSceneGroupRef
Source§fn clone(&self) -> ObsSceneGroupRef
fn clone(&self) -> ObsSceneGroupRef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObsSceneGroupRef
impl Debug for ObsSceneGroupRef
Source§impl SceneItemTrait for ObsSceneGroupRef
impl SceneItemTrait for ObsSceneGroupRef
fn runtime(&self) -> ObsRuntime
Source§fn remove_from_scene(&self) -> Result<(), ObsError>
fn remove_from_scene(&self) -> Result<(), ObsError>
fn object_id(&self) -> NativeObjectId
Source§fn is_removed(&self) -> bool
fn is_removed(&self) -> bool
Source§fn get_transform_info(&self) -> Result<ObsTransformInfo, ObsError>
fn get_transform_info(&self) -> Result<ObsTransformInfo, ObsError>
Source§fn get_source_position(&self) -> Result<Vec2, ObsError>
fn get_source_position(&self) -> Result<Vec2, ObsError>
Source§fn get_source_scale(&self) -> Result<Vec2, ObsError>
fn get_source_scale(&self) -> Result<Vec2, ObsError>
Source§fn set_source_position(&self, position: Vec2) -> Result<(), ObsError>
fn set_source_position(&self, position: Vec2) -> Result<(), ObsError>
Source§fn set_transform_info(&self, info: &ObsTransformInfo) -> Result<(), ObsError>
fn set_transform_info(&self, info: &ObsTransformInfo) -> Result<(), ObsError>
ObsTransformInfo can be built by using the ObsTransformInfoBuilder.Source§fn fit_source_to_screen(&self) -> Result<bool, ObsError>
fn fit_source_to_screen(&self) -> Result<bool, ObsError>
Source§fn crop(&self) -> Result<ObsSceneItemCrop, ObsError>
fn crop(&self) -> Result<ObsSceneItemCrop, ObsError>
Source§fn set_crop(&self, crop: ObsSceneItemCrop) -> Result<(), ObsError>
fn set_crop(&self, crop: ObsSceneItemCrop) -> Result<(), ObsError>
Source§fn set_locked(&self, locked: bool) -> Result<(), ObsError>
fn set_locked(&self, locked: bool) -> Result<(), ObsError>
Source§fn set_rotation(&self, degrees: f32) -> Result<(), ObsError>
fn set_rotation(&self, degrees: f32) -> Result<(), ObsError>
Source§fn order_position(&self) -> Result<i32, ObsError>
fn order_position(&self) -> Result<i32, ObsError>
Source§fn set_order_position(&self, position: i32) -> Result<(), ObsError>
fn set_order_position(&self, position: i32) -> Result<(), ObsError>
Source§fn move_order(&self, movement: ObsOrderMovement) -> Result<(), ObsError>
fn move_order(&self, movement: ObsOrderMovement) -> Result<(), ObsError>
Source§fn scale_filter(&self) -> Result<ObsScaleType, ObsError>
fn scale_filter(&self) -> Result<ObsScaleType, ObsError>
fn set_scale_filter(&self, filter: ObsScaleType) -> Result<(), ObsError>
fn blend_method(&self) -> Result<ObsBlendMethod, ObsError>
fn set_blend_method(&self, method: ObsBlendMethod) -> Result<(), ObsError>
fn blend_mode(&self) -> Result<ObsBlendMode, ObsError>
fn set_blend_mode(&self, mode: ObsBlendMode) -> Result<(), ObsError>
Source§fn transform_snapshot(&self) -> Result<ObsSceneItemTransformSnapshot, ObsError>
fn transform_snapshot(&self) -> Result<ObsSceneItemTransformSnapshot, ObsError>
Source§fn apply_transform_snapshot(
&self,
snapshot: &ObsSceneItemTransformSnapshot,
) -> Result<(), ObsError>
fn apply_transform_snapshot( &self, snapshot: &ObsSceneItemTransformSnapshot, ) -> Result<(), ObsError>
fn state_snapshot(&self) -> Result<ObsSceneItemStateSnapshot, ObsError>
fn apply_state_snapshot( &self, snapshot: &ObsSceneItemStateSnapshot, ) -> Result<(), ObsError>
Source§fn position(&self) -> Result<Vec2, ObsError>
fn position(&self) -> Result<Vec2, ObsError>
SceneItemTrait::get_source_position.Source§fn set_position(&self, position: Vec2) -> Result<(), ObsError>
fn set_position(&self, position: Vec2) -> Result<(), ObsError>
SceneItemTrait::set_source_position.Source§fn scale(&self) -> Result<Vec2, ObsError>
fn scale(&self) -> Result<Vec2, ObsError>
SceneItemTrait::get_source_scale.