forked from rojo-rbx/rojo
Mark project node as instigating source for instances from project
This commit is contained in:
@@ -6,7 +6,7 @@ use rbx_reflection::try_resolve_value;
|
||||
use crate::{
|
||||
imfs::{FsErrorKind, Imfs, ImfsEntry, ImfsFetcher},
|
||||
project::{Project, ProjectNode},
|
||||
snapshot::{InstanceMetadata, InstanceSnapshot},
|
||||
snapshot::{InstanceMetadata, InstanceSnapshot, InstigatingSource},
|
||||
};
|
||||
|
||||
use super::{
|
||||
@@ -174,6 +174,11 @@ fn snapshot_project_node<F: ImfsFetcher>(
|
||||
metadata.ignore_unknown_instances = true;
|
||||
}
|
||||
|
||||
metadata.instigating_source = Some(InstigatingSource::ProjectNode(
|
||||
instance_name.to_string(),
|
||||
node.clone(),
|
||||
));
|
||||
|
||||
Ok(Some(InstanceSnapshot {
|
||||
snapshot_id: None,
|
||||
name,
|
||||
|
||||
@@ -16,6 +16,14 @@ children:
|
||||
- snapshot_id: ~
|
||||
metadata:
|
||||
ignore_unknown_instances: true
|
||||
instigating_source:
|
||||
ProjectNode:
|
||||
- Child
|
||||
- class_name: Model
|
||||
children: {}
|
||||
properties: {}
|
||||
ignore_unknown_instances: ~
|
||||
path: ~
|
||||
relevant_paths: []
|
||||
name: Child
|
||||
class_name: Model
|
||||
|
||||
@@ -17,6 +17,14 @@ children:
|
||||
- snapshot_id: ~
|
||||
metadata:
|
||||
ignore_unknown_instances: true
|
||||
instigating_source:
|
||||
ProjectNode:
|
||||
- SomeChild
|
||||
- class_name: Model
|
||||
children: {}
|
||||
properties: {}
|
||||
ignore_unknown_instances: ~
|
||||
path: ~
|
||||
relevant_paths: []
|
||||
name: SomeChild
|
||||
class_name: Model
|
||||
|
||||
Reference in New Issue
Block a user