Blender Scene Compose & Export addon
This commit is contained in:
parent
021e5862ff
commit
c64bbf4a70
7 changed files with 455 additions and 0 deletions
12
cg/blender/scripts/addons/Robossembler/model_paths.py
Normal file
12
cg/blender/scripts/addons/Robossembler/model_paths.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
# coding: utf-8
|
||||
|
||||
import glob
|
||||
|
||||
|
||||
def get_urdf_sdf_model_paths(models_dir):
|
||||
''' Collect models paths. '''
|
||||
model_paths = []
|
||||
for file_name in glob.glob(f'{models_dir}/**', recursive=True):
|
||||
if file_name.endswith('.urdf') or file_name.endswith('.sdf'):
|
||||
model_paths.append(file_name.replace('\\', '/'))
|
||||
return model_paths
|
Loading…
Add table
Add a link
Reference in a new issue