issue #2335: export in .obj file should use the objects labels (Related is also issue #2336: importing .obj file should use the object names as labels)
Looks like a user named damian in the bug tracker offered a fix. His repo link is 404 (his github user is @caceres
Maybe someone can ping him on github ?
Feature #2335: export in .obj file should use the objects labels
Feature #2335: export in .obj file should use the objects labels
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature #2335: export in .obj file should use the objects labels
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature #2335: export in .obj file should use the objects labels
bump
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature #2335: export in .obj file should use the objects labels
Should we keep pursuing this ticket or close?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature #2335: export in .obj file should use the objects labels
please advise
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature #2335: export in .obj file should use the objects labels
feedback from the community is welcome...
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature #2335: export in .obj file should use the objects labels
Would be nice to have. Another good choice is to propose the FreeCAD filename prefix.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 1
- Joined: Sun Oct 17, 2021 6:29 am
Re: Feature #2335: export in .obj file should use the objects labels
On Ubuntu Linux 20.04 (e.g. installed using apt-get install freecad), all you have to do is edit ./src/Mod/Arch/importOBJ.py and change "obj.Name" to "obj.Label" where it gets written to a file (search for outfile.write).
Not sure if it's possible/if issues can arise using non-unique object labels in FreeCAD or what might happen in a Wavefront OBJ file with duplicate object names (or for import?) but this works a charm.
If you know how to use git/diff/patch, git diff fix against master branch commit 0926a4148bcff11249fd4f56bc30256102ffe105 below:
diff --git a/src/Mod/Arch/importOBJ.py b/src/Mod/Arch/importOBJ.py
index 0dd361d186..2cd5a156dd 100644
--- a/src/Mod/Arch/importOBJ.py
+++ b/src/Mod/Arch/importOBJ.py
@@ -208,7 +208,7 @@ def export(exportList,filename,colors=None):
else:
offsetv += len(vlist)
offsetvn += len(vnlist)
- outfile.write("o " + obj.Name + "\n")
+ outfile.write("o " + obj.Label + "\n")
# write material
m = False
Not sure if it's possible/if issues can arise using non-unique object labels in FreeCAD or what might happen in a Wavefront OBJ file with duplicate object names (or for import?) but this works a charm.
If you know how to use git/diff/patch, git diff fix against master branch commit 0926a4148bcff11249fd4f56bc30256102ffe105 below:
diff --git a/src/Mod/Arch/importOBJ.py b/src/Mod/Arch/importOBJ.py
index 0dd361d186..2cd5a156dd 100644
--- a/src/Mod/Arch/importOBJ.py
+++ b/src/Mod/Arch/importOBJ.py
@@ -208,7 +208,7 @@ def export(exportList,filename,colors=None):
else:
offsetv += len(vlist)
offsetvn += len(vnlist)
- outfile.write("o " + obj.Name + "\n")
+ outfile.write("o " + obj.Label + "\n")
# write material
m = False
Re: Feature #2335: export in .obj file should use the objects labels
Since my last post the naming of export files was improved.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.