Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions flow360/component/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def get_surface_mesh(self, asset_id: str = None) -> SurfaceMeshV2:
asset_id = self.project_tree.get_full_asset_id(
query_asset=AssetShortID(asset_id=asset_id, asset_type="SurfaceMesh")
)
return SurfaceMeshV2.from_cloud(id=asset_id)
return SurfaceMeshV2.from_cloud(id=asset_id, populates_registry=True)

@property
def surface_mesh(self) -> SurfaceMeshV2:
Expand Down Expand Up @@ -537,7 +537,7 @@ def get_volume_mesh(self, asset_id: str = None) -> VolumeMeshV2:
asset_id = self.project_tree.get_full_asset_id(
query_asset=AssetShortID(asset_id=asset_id, asset_type="VolumeMesh")
)
return VolumeMeshV2.from_cloud(id=asset_id)
return VolumeMeshV2.from_cloud(id=asset_id, populates_registry=True)

@property
def volume_mesh(self) -> VolumeMeshV2:
Expand Down Expand Up @@ -1164,14 +1164,16 @@ def from_cloud(
)

if root_type == RootType.GEOMETRY:
root_asset = Geometry.from_cloud(meta.root_item_id, entity_info_param=entity_info_param)
root_asset = Geometry.from_cloud(
meta.root_item_id, entity_info_param=entity_info_param, populates_registry=True
)
elif root_type == RootType.SURFACE_MESH:
root_asset = SurfaceMeshV2.from_cloud(
meta.root_item_id, entity_info_param=entity_info_param
meta.root_item_id, entity_info_param=entity_info_param, populates_registry=True
)
elif root_type == RootType.VOLUME_MESH:
root_asset = VolumeMeshV2.from_cloud(
meta.root_item_id, entity_info_param=entity_info_param
meta.root_item_id, entity_info_param=entity_info_param, populates_registry=True
)
if not root_asset:
raise Flow360ValueError(f"Couldn't retrieve root asset for {project_info.asset_id}")
Expand Down Expand Up @@ -1470,7 +1472,7 @@ def _run(
}
)

destination_obj = target.from_cloud(destination_id)
destination_obj = target.from_cloud(destination_id, populates_registry=False)

log.info(f"Successfully submitted: {destination_obj.short_description()}")

Expand Down
6 changes: 6 additions & 0 deletions flow360/component/simulation/web/asset_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ def from_cloud(cls, id: str, **kwargs):
Create asset with the given ID.
"""
asset_obj = cls(id)
populates_registry: bool = kwargs.pop("populates_registry", False)

if populates_registry is False:
asset_obj.internal_registry = None
return asset_obj

entity_info_supplier_dict = None
entity_info_param: Optional[SimulationParams] = kwargs.pop("entity_info_param", None)
if entity_info_param:
Expand Down
Loading