From dd49f351555dfb972a7f4d54fc8d35170e8d8968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20G=C3=B6kmen?= <cem@cemgokmen.com> Date: Wed, 13 Dec 2023 14:52:36 -0800 Subject: [PATCH] Reorder some things --- omnigibson/prims/entity_prim.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/omnigibson/prims/entity_prim.py b/omnigibson/prims/entity_prim.py index 339d5650f..7f4d6fb94 100644 --- a/omnigibson/prims/entity_prim.py +++ b/omnigibson/prims/entity_prim.py @@ -90,7 +90,11 @@ def _load(self): raise NotImplementedError("By default, an entity prim cannot be created from scratch.") def _post_load(self): - # Prepare the articulation view (at this point only working via the USD interface) + # Setup links info FIRST before running any other post loading behavior + # We pass in scale explicitly so that the generated links can leverage the desired entity scale + self.update_links(load_config=dict(scale=self._load_config.get("scale", None))) + + # Prepare the articulation view. if self.n_joints > 0: self._articulation_view = ExtendedArticulationView(self._prim_path + "/base_link") @@ -118,10 +122,6 @@ def _post_load(self): omni.kit.commands.execute("CopyPrim", path_from=cloth_mesh_prim.GetPath(), path_to=new_path) omni.kit.commands.execute("DeletePrims", paths=[old_link_prim.GetPath()], destructive=False) - # Setup links info FIRST before running any other post loading behavior - # We pass in scale explicitly so that the generated links can leverage the desired entity scale - self.update_links(load_config=dict(scale=self._load_config.get("scale", None))) - # Set visual only flag # This automatically handles setting collisions / gravity appropriately per-link self.visual_only = self._load_config["visual_only"] if \