Object name while OBJ exporting

Next
 From:  falcon76
1832.1 
Hi all,
here is my little problem.
While waiting for the next version with Object Organization, I want to use moi to model with my laptop.I'm trying to find some render engine for texturing the model, without using a main application (I have only a license in the office for that).
Exporting inside a render engine all the model in one time can be hard to assigning material.
So I start exporting object by object in OBJ format. But in this way during import, the render engine ask everytime to replace or rename...
There is a way to rename the object inside the OBJ file (maybe with filename001, filename002...)?
Another little things is that at the end of exporting the choosed object are not selected. So I cannot Hide or delete and I have to select it again.
Someone have some tips for that? Or a totally different workflow?

Thanks
Luca
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1832.2 In reply to 1832.1 
Hi Luca,

> There is a way to rename the object inside the OBJ file
> (maybe with filename001, filename002...)?

Well, an OBJ file is just a regular text file that you can edit... You could do something like search & replace to change the names.

It also would not be very difficult for me to write a small program for you that would process the file like that, but it is late over here right now so I'll have to look at that tomorrow.


> Another little things is that at the end of exporting the choosed
> object are not selected.

Hmmm, yeah I see - it is a side effect of the original objects being hidden when the meshes are being displayed. Things that are hidden have selection removed from them.

Tomorrow I'll also take a look at fixing that for the next v2 beta so it remembers the selection.


> So I cannot Hide or delete and I have to select it again.
> Someone have some tips for that? Or a totally different workflow?

Maybe hide all the other objects except for the ones you want to export? That way you can more easily re-select them with Ctrl+A if they are the only visible objects.

You can set up this script on a keyboard shortcut to isolate objects:
code:
script:moi.geometryDatabase.invertSelection(); moi.geometryDatabase.hide(true);

That will hide all objects other than the selected ones.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  falcon76
1832.3 In reply to 1832.2 
> Well, an OBJ file is just a regular text file that you can edit... You could do something like search & replace to change the names.

Ok, if you confirm me that changing "object" with "filename" don't broke the OBJ file, I'll do that.

> It also would not be very difficult for me to write a small program for you that would process the file like that, but it is late over here
> right now so I'll have to look at that tomorrow.

I'm not asking for that.... take ALL the time you want!

>Maybe hide all the other objects except for the ones you want to export? That way you can more easily re-select them with Ctrl+A if >they are the only visible objects.

I'll do that. Haven't think about it!

Thanks for the unbelievable support!
Luca
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1832.4 In reply to 1832.3 
Hi Luca,

> Ok, if you confirm me that changing "object" with "filename"
> don't broke the OBJ file, I'll do that.

Yup, that should work fine to edit the OBJ file in a text editor, it will not break anything to just change those names.


> I'm not asking for that.... take ALL the time you want!

All done! :)

It was very easy to do since I already had some other programs set up (like SeparateOBJ) to scan through an OBJ and edit certain lines.

If you run the attached RelabelOBJ.exe program, it will ask you for a file name, and then it will go through and replace all the object names to be based off the file's own name instead of just "object".

So for instance if you have a file named my_file.obj, if you run the RelabelOBJ.exe program on it, all the object names will be turned from just "object1", "object2", etc... into "my_file1", "my_file2", etc...

Hopefully that will help out? Please let me know if it doesn't do what you need.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  falcon76
1832.5 In reply to 1832.4 
Thanks a lot!
You are the best.

Do the same things manually work.... but now is better|

Luca
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
1832.6 In reply to 1832.5 
Hi Luca, you're welcome!

Also I have now fixed the problem where selection is lost when you export to a mesh file format. In the next v2 beta the selection will be restored after the export is complete.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All