1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! UsdProc schema views.
//!
//! Typed value-views over a composed [`crate::usd::Stage`], mirroring Pixar's
//! `UsdProc` family. The one concrete schema is [`GenerativeProcedural`]
//! (C++ `UsdProcGenerativeProcedural`) — a prim whose children are generated
//! at runtime by a named procedural system. It is a
//! [`geom::Boundable`](crate::schemas::geom::Boundable) prim (its transform /
//! extent / visibility come from the UsdGeom layer, and its input parameters
//! live in the `primvars:` namespace); this module adds the procedural-specific
//! `proceduralSystem` attribute.
//!
//! # Example
//!
//! ```
//! use openusd::schemas::proc::GenerativeProcedural;
//! use openusd::sdf;
//! use openusd::usd::Stage;
//!
//! let stage = Stage::builder().in_memory("scene.usda").unwrap();
//!
//! let proc = GenerativeProcedural::define(&stage, "/World/Scatter").unwrap();
//! proc.create_procedural_system_attr().unwrap().set(sdf::Value::Token("Houdini".into())).unwrap();
//!
//! // Read it back through a typed view.
//! let proc = GenerativeProcedural::get(&stage, "/World/Scatter").unwrap().expect("GenerativeProcedural");
//! assert_eq!(
//! proc.procedural_system_attr().get::<sdf::Value>().unwrap(),
//! Some(sdf::Value::Token("Houdini".into()))
//! );
//! ```
pub use GenerativeProcedural;
/// Implement the schema-trait chain for a concrete `struct $ty(Prim)` proc
/// newtype. All trait paths are fully qualified, so the call site only needs
/// the macro in scope.
///
/// - `boundable` is a [`geom::Boundable`](crate::schemas::geom::Boundable) prim
/// (`GenerativeProcedural`).
pub use impl_proc_schema;