Script request
All  1-5  6-20

Previous
Next
 From:  mkdm
8230.6 In reply to 8230.5 
Hi Michael and good morning.

Thank you very much for this very useful script!!!

Best,

- Marco (mkdm)

P.S. How to put inline BBcode images inside forum messages ?

- Marco (mkdm)
  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
8230.7 In reply to 8230.6 
Hi Marco, for this forum use html like tags, like <code></code>

- 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:  Frenchy Pilou (PILOU)
8230.8 
for image
img src="name_image.jpg" /
between <>
---
Pilou
Is beautiful that please without concept!
My Gallery
  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:  mkdm
8230.9 In reply to 8230.8 
Thanks :)

- Marco (mkdm)
  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:  Oliver (FRITZ57)
8230.10 
Great, Michael, works like a charm, thank you !

It's important to delimit the parameters of fileExport with ";" and inclose them in " ' " like here :

moi.geometryDatabase.fileExport(filename,'NoUI=true;Angle=12.0;Output=quads;Weld=true;Display=shadedwithedges');

Perhaps the script could be added to the script collection.

Another question
Is there a way to compute the minimum size of the exported object
for an uvmap size of, say, 2048 pixels ?
I want to keep my obj files as small as possible before being unwrapped and uvmapped in 3D Coat.

TIA
Oliver
o5m6.de
Beware of the hun coming out of the sun ;-)
  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
8230.11 In reply to 8230.10 
Hi Oliver, I'm glad that is working for you!

re:
> Another question
> Is there a way to compute the minimum size of the exported object
> for an uvmap size of, say, 2048 pixels ?

Sorry I don't understand this question, what size is it that you want to compute in pixels? There isn't really anything that MoI generates to an .obj file that is measured in pixels.

- 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:  Oliver (FRITZ57)
8230.12 In reply to 8230.11 
Hi Michael,

just wanted to know if there's a way to reduce
the uvmap size by reducing the model size.

I have a really huge model to be textured that
is bursting 3D Coat in the Paint Room.

So I guess I will have to reduce the polycount
to get the work done.

Anyway, Merry Christmas to you and all of the members
of this outstanding forum and a happy 2017 !!
Oliver
o5m6.de
Beware of the hun coming out of the sun ;-)
  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
8230.13 In reply to 8230.12 
Hi Oliver, Merry Christmas to you as well!

But for the UV map size question, sorry no there isn't any connection between model size and UV map size. The UV coordinates MoI exports are pretty basic, every face in the model has UV coordinates between 0 and 1. These coordinates are not pixel coordinates though, they're coordinates in an abstract unit square representing the texture map width and height without any specific pixel coordinates. Pixels only come into play when you assign an actual texture bitmap to something later on.

But if the default UV coordinates that MoI is exporting is causing a problem in 3D Coat and you're going to need to make a new UV mapping anyway you could just turn off the UV coordinate export by a setting in moi.ini , go to Options > General > "Edit .ini file" button. Then go to the [OBJ Export] section and find this line:

[OBJ Export]
<...>
WriteTextureCoordinates=y
<...>

And change that to say WriteTextureCoordinates=n instead.

Hope that will help!

- 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:  chippwalters
8230.14 
Good hint, Michael. Thanks for sharing!
  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:  nameless
8230.15 In reply to 8230.14 
Hello everyone and apologies for necroing this thread. :|

I am trying to find a way to export my selection as multiple separate .objs and run across this script. What would be the best way to do that? I should probably look for a batch rename script and then run this one- unless there is a simpler way.
  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:  Frenchy Pilou (PILOU)
8230.16 In reply to 8230.15 
Maybe read this entiere little thread http://moi3d.com/forum/index.php?webtag=MOI&msg=8582.1
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  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
8230.17 In reply to 8230.15 
Hi nameless, you can try this for assigning a generic name "object_1", "object_2", etc.. to all current unnamed objects:

script: /* assign names to unnamed objects */ var objs = moi.geometryDatabase.getObjects(); var counter = 0; var current_names = []; for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name ){ current_names[obj.name] = true; } } for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name ) { continue; } ++counter; var name = 'object_' + counter; while ( current_names[name] === true ) { ++counter; name = 'object_' + counter; } obj.name = name; }

- 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:  nameless
8230.18 
Thanks Pilou and Michael,

These both work!

I was wondering- Is there a way or a "bridging" script that can run 2 commands one after the other with a single shortcut? That would help script illiterates like me to be able to cook two commands together. I understand that this could potentially create unexpected problems with dialogues and stuff but it was worth a try :))

Thank you for that naming script Michael! I badly needed it, as I rarely name things, I work messy as hell :|
  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
8230.19 In reply to 8230.18 
Hi nameless,

re:
> I was wondering- Is there a way or a "bridging" script that can run 2 commands one
> after the other with a single shortcut?

Not currently but that is something that I want to add.

- 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
 From:  nameless
8230.20 In reply to 8230.19 
Hi Michael,

Awesome! Happy it's on your radar :D
  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

 

 
 
Show messages: All  1-5  6-20