Skip to content

Commit

Permalink
text fixes, float model names to top of function
Browse files Browse the repository at this point in the history
Signed-off-by: ddengster <[email protected]>
  • Loading branch information
ddengster committed Jul 12, 2021
1 parent 3307f4b commit 3aaabae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions examples/scripts/blender/sdf_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def export_sdf(prefix_path):
sdf_filename = 'model.sdf'
model_config_filename = 'model.config'
lightmap_filename = 'LightmapBaked.png'
model_name = 'model'

# Exports the dae file and its associated textures
bpy.ops.wm.collada_export(filepath=prefix_path+dae_filename, check_existing=False, filter_blender=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=True, filter_folder=True, filemode=8)
Expand Down Expand Up @@ -157,15 +158,15 @@ def add_attenuation_tags(light_tag, blender_light):
##############################
model = ET.Element('model')
name = ET.SubElement(model, 'name')
name.text = "L1"
name.text = model_name
version = ET.SubElement(model, 'version')
version.text = "1.0"
sdf_tag = ET.SubElement(model, "sdf", attrib={"sdf":"1.8"})
sdf_tag.text = "model.sdf"
sdf_tag.text = sdf_filename

author = ET.SubElement(model, 'author')
name = ET.SubElement(author, 'name')
name.text = "Generated by blender sdf tools"
name.text = "Generated by blender SDF tools"

xml_string = ET.tostring(model, encoding='unicode')
reparsed = minidom.parseString(xml_string)
Expand Down
4 changes: 2 additions & 2 deletions tutorials/blender_sdf_exporter.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\page blender_sdf_exporter Blender SDF Exporter

Blender is a DCC tool to create 3d models. In some cases you may be using it to bake
lighting and environment maps.
Blender is a Digital Content Creation (DCC) tool for working with 3d models.
In some cases you may be using it to bake lighting and environment maps.

The Blender SDF exporter is a blender script in which you can run within Blender to
export your meshes, their associated textures and lights to a dae file, its
Expand Down

0 comments on commit 3aaabae

Please sign in to comment.