blenderproc.python.loader.IKEALoader module¶
-
class
blenderproc.python.loader.IKEALoader.IKEALoader[source]¶ Bases:
objectThis class loads objects from the IKEA dataset.
Objects can be selected randomly, based on object type, object style, or both.
-
static
_check_material_file(path)[source]¶ Checks whether there is a texture file (.mtl) associated to the object available.
Parameters: path ( str) – path to objectReturn type: boolReturns: texture file exists
-
static
_generate_object_dict(data_dir)[source]¶ Generates a dictionary of all available objects, i.e. all .obj files that have an associated .mtl file.
Parameters: data_dir ( str) – The directory with all the IKEA models.Return type: dictReturns: dict: {IKEA_<type>_<style> : [<path_to_obj_file>, …]}
-
static
-
blenderproc.python.loader.IKEALoader.load_ikea(data_dir='resources/IKEA', obj_categories=None, obj_style=None)[source]¶ Loads ikea objects based on selected type and style.
If there are multiple options it picks one randomly or if style or type is None it picks one randomly.
Parameters: - data_dir (
str) – The directory with all the IKEA models. - obj_categories (
Union[list,str,None]) – The category to use for example: ‘bookcase’. This can also be a list of elements. Available: [‘bed’, ‘bookcase’, ‘chair’, ‘desk’, ‘sofa’, ‘table’, ‘wardrobe’] - obj_style (
Optional[str]) – The IKEA style to use for example: ‘hemnes’. See data_dir for other options.
Return type: Returns: The list of loaded mesh objects.
- data_dir (