habitat_sim.attributes_managers.AssetAttributesManager class

Manages PrimtiveAttributes objects which define parameters for constructing primitive mesh shapes such as cubes, capsules, cylinders, and cones.

Methods

def create_new_template(self, handle: str, register_template: bool = False) -> habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes
Creates a Primitive Asset template built with default values, and registers it in the library if register_template is True.
def create_template(self, handle: str, register_template: bool = True) -> habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes
Creates a Primitive Asset template based on passed handle, and registers it in the library if register_template is True.
def get_UVsphere_template(self, handle: str) -> attributes.UVSpherePrimitiveAttributes
This returns an appropriately cast copy of the UVSphere primitive template in the library that is referenced by the passed handle, or NULL if none exists.
def get_capsule_template(self, handle: str) -> attributes.CapsulePrimitiveAttributes
This returns an appropriately cast copy of the Capsule primitive template in the library that is referenced by the passed handle, or NULL if none exists.
def get_cone_template(self, handle: str) -> attributes.ConePrimitiveAttributes
This returns an appropriately cast copy of the Cone primitive template in the library that is referenced by the passed handle, or NULL if none exists.
def get_cube_template(self, handle: str) -> attributes.CubePrimitiveAttributes
This returns an appropriately cast copy of the Cube primitive template in the library that is referenced by the passed handle, or NULL if none exists.
def get_cylinder_template(self, handle: str) -> attributes.CylinderPrimitiveAttributes
This returns an appropriately cast copy of the Cylinder primitive template in the library that is referenced by the passed handle, or NULL if none exists.
def get_default_UVsphere_template(self, is_wireframe: bool) -> attributes.UVSpherePrimitiveAttributes
This returns an appropriately cast copy of the default UVSphere primitive template in the library, either solid or wireframe based on is_wireframe.
def get_default_capsule_template(self, is_wireframe: bool) -> attributes.CapsulePrimitiveAttributes
This returns an appropriately cast copy of the default Capsule primitive template in the library, either solid or wireframe based on is_wireframe.
def get_default_cone_template(self, is_wireframe: bool) -> attributes.ConePrimitiveAttributes
This returns an appropriately cast copy of the default Cone primitive template in the library, either solid or wireframe based on is_wireframe.
def get_default_cube_template(self, is_wireframe: bool) -> attributes.CubePrimitiveAttributes
This returns an appropriately cast copy of the default Cube primitive template in the library, either solid or wireframe based on is_wireframe.
def get_default_cylinder_template(self, is_wireframe: bool) -> attributes.CylinderPrimitiveAttributes
This returns an appropriately cast copy of the default Cylinder primitive template in the library, either solid or wireframe based on is_wireframe.
def get_default_icosphere_template(self, is_wireframe: bool) -> attributes.IcospherePrimitiveAttributes
This returns an appropriately cast copy of the default Icosphere primitive template in the library, either solid or wireframe based on is_wireframe.
def get_first_matching_template_by_handle(self, handle_substr: str) -> habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes
This returns a copy of the first Primitive Asset template containing the passed handle substring if any exist, and NULL if none could be found.
def get_icosphere_template(self, handle: str) -> attributes.IcospherePrimitiveAttributes
This returns an appropriately cast copy of the Icosphere primitive template in the library that is referenced by the passed handle, or NULL if none exists.
def get_library_has_handle(self, handle: str) -> bool
Returns whether the passed handle describes an existing Primitive Asset template in the library.
def get_library_has_id(self, template_id: int) -> bool
Returns whether the passed template ID describes an existing Primitive Asset template in the library.
def get_num_templates(self, /) -> int
Returns the number of existing Primitive Asset templates being managed.
def get_random_template_handle(self, /) -> str
Returns the handle for a random Primitive Asset template chosen from the existing Primitive Asset templates being managed.
def get_template_by_handle(self, handle: str) -> habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes
This returns a copy of the Primitive Asset template specified by the passed handle if it exists, and NULL if it does not.
def get_template_by_id(self, template_id: int) -> habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes
This returns a copy of the Primitive Asset template specified by the passed ID if it exists, and NULL if it does not.
def get_template_handle_by_id(self, template_id: int) -> str
Returns string handle for the Primitive Asset template corresponding to passed ID.
def get_template_handles(self, search_str: str = '', contains: bool = True, sorted: bool = True) -> typing.List[str]
Returns a potentially sorted list of Primitive Asset template handles that either contain or explicitly do not contain the passed search_str, based on the value of boolean contains.
def get_template_id_by_handle(self, handle: str) -> int
Returns integer ID for the Primitive Asset template with the passed handle.
def get_templates_CSV_info(self, search_str: str = '', contains: bool = True) -> str
Returns a comma-separated string describing each Primitive Asset template whose handles either contain or explicitly do not contain the passed search_str, based on the value of boolean contains. Each template’s info is separated by a newline.
def get_templates_by_handle_substring(self, search_str: str = '', contains: bool = True) -> typing.Dict[str, habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes]
Returns a dictionary of Primitive Asset templates, keyed by their handles, for all handles that either contain or explicitly do not contain the passed search_str, based on the value of boolean contains.
def get_templates_info(self, search_str: str = '', contains: bool = True) -> typing.List[str]
Returns a list of CSV strings describing each Primitive Asset template whose handles either contain or explicitly do not contain the passed search_str, based on the value of boolean contains.
def get_undeletable_handles(self, /) -> typing.List[str]
Returns a list of Primitive Asset template handles for Primitive Asset templates that have been marked undeletable by the system. These Primitive Asset templates can still be edited.
def get_user_locked_handles(self, /) -> typing.List[str]
Returns a list of Primitive Asset template handles for Primitive Asset templates that have been marked locked by the user. These will be undeletable until unlocked by the user. These Primitive Asset templates can still be edited.
def is_valid_filename(self, handle: str) -> bool
Returns whether the passed handle is a valid, existing file.
def load_configs(self, path: str, save_as_defaults: bool = False) -> typing.List[int]
Build Primitive Asset templates for all JSON files with appropriate extension that exist in the provided file or directory path. If save_as_defaults is true, then these Primitive Asset templates will be unable to be deleted
def register_template(self, template: habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes, specified_handle: str = '', force_registration: bool = False) -> int
This registers a copy of the passed Primitive Asset template in the library, and returns the template’s integer ID.
def remove_all_templates(self, /) -> typing.List[habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes]
This removes, and returns, a list of all the Primitive Asset templates referenced in the library that have not been marked undeletable by the system or read-only by the user.
def remove_template_by_handle(self, handle: str) -> habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes
This removes, and returns the Primitive Asset template referenced by the passed handle from the library.
def remove_template_by_id(self, template_id: int) -> habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes
This removes, and returns the Primitive Asset template referenced by the passed ID from the library.
def remove_templates_by_str(self, search_str: str = '', contains: bool = True) -> typing.List[habitat_sim._ext.habitat_sim_bindings.AbstractPrimitiveAttributes]
This removes, and returns, a list of all the Primitive Asset templates referenced in the library that have not been marked undeletable by the system or read-only by the user and whose handles either contain or explicitly do not contain the passed search_str.
def set_lock_by_substring(self, lock: bool, search_str: str = '', contains: bool = True) -> typing.List[str]
This sets the lock state for all Primitive Asset templates whose handles either contain or explicitly do not contain the passed search_str. Returns a list of handles for Primitive Asset templates locked by this function call. Lock == True makes the Primitive Asset template unable to be deleted. Note : Locked Primitive Asset templates can still be edited.
def set_template_list_lock(self, handles: typing.List[str], lock: bool) -> typing.List[str]
This sets the lock state for all Primitive Asset templates whose handles are passed in list. Returns a list of handles for templates locked by this function call. Lock == True makes the Primitive Asset template unable to be deleted. Note : Locked Primitive Asset templates can still be edited.
def set_template_lock(self, handle: str, lock: bool) -> bool
This sets the lock state for the Primitive Asset template that has the passed name. Lock == True makes the Primitive Asset template unable to be deleted. Note : Locked Primitive Asset templates can still be edited.