Italy
Joined: Nov 17, 2021
Post Count: 465
Status:
Offline
Re: Add "o" to OBJWriter output
Sorry for late response. I looked at the changes and they seems ok, but you know it's up to Emmanuel to decide wether to merge or not into the main stream. If you decide to make it a plugin you could consider to override the OBJWriter instead of duplicate the whole code. This is how I managed to obtain this result for another project I'm working on:
public class LDObjWriter extends OBJWriter { private boolean firstNode = true; private boolean separateObjects = false;
public boolean isSeparateObjects() { return separateObjects; }
public void setSeparateObjects(boolean separateObjects) { this.separateObjects = separateObjects; }
Netherlands
Joined: Apr 8, 2022
Post Count: 1361
Status:
Offline
Re: Add "o" to OBJWriter output
Last week I discovered the usefulness of the o line in an obj file. I had to bisect a complex set of objects and I couldn't do that because all of the g groups and no o object. So I added the line manually and it still didn't work until I flagged all g lines as remarks. That gave a single object in Blender but of course had the disadvantage of no more g groups.
Rereading the posts in this thread I went looking for the gear to change settings when importing and after I switched of groups just the o line was enough to allow selection of a single object, which I needed for bisecting and still retain the g groups.
Big vote here to add o line(s) to the obj export. I manage to create very complex furniture with just SH3D but there a few things it can't do that sometimes are needed.
---------------------------------------- Dodecagon.nl 1000+ 3D models, manuals, and projects
Joined: May 18, 2021
Post Count: 255
Status:
Offline
Re: Add "o" to OBJWriter output
@Daniels118 "Resurrectus threadius!"
I've picked this back up, got Eclipse installed, done the plugin tutorial, and have a vague idea how I can turn this into a plugin.
As I said <points at self> clueless Javamateur. I had a look at a couple of plugins, and I see yours looking all purty! You have a bunch of the boilerplate stuff all squared away. Can I ask your permission to shamelessly and liberally borrow that stuff and adapt it for my needs? It will save me a ton of time scratching my head that can be better spent getting the meat of the plugin to work.
Italy
Joined: Nov 17, 2021
Post Count: 465
Status:
Offline
Re: Add "o" to OBJWriter output
Hi Stephen, all my plugins are licensed under GPL, so you are free to reuse all the code as long as you respect the terms (keep it open source, under GPL, and cite the author).