Add animation store for pre-made clips
aac.AnimationStore(folder) seeds a clip from an existing .anim asset and returns a normal ClipBuilder, so pre-made clips work anywhere generated clips do and can still be edited (looping, keyframes, toggles, blend shapes). The Unity side clones the asset into the container and applies the script's changes to the clone, leaving the original untouched. - ClipData gains optional source; looping becomes Option<bool> so an untouched store clip keeps the asset's own looping setting. - Add rust/examples/animation_store.rhai, a worked store example.
This commit is contained in:
+7
-1
@@ -111,8 +111,14 @@ pub enum CondMode {
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ClipData {
|
||||
pub name: String,
|
||||
pub looping: bool,
|
||||
/// `None` for a store clip that leaves the source asset's looping setting alone.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub looping: Option<bool>,
|
||||
pub curves: Vec<Curve>,
|
||||
/// Set when the clip is seeded from an asset (see `AnimationStore`): the project-relative asset
|
||||
/// path. Omitted for generated clips so their JSON stays unchanged.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub source: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user