Object name
 1-20  21-34

Next
 From:  Andrei Samardac
5710.1 
Is it wau to automaticly assign object name to newly created geometry?
  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
5710.2 In reply to 5710.1 
Hi mir4ea,

> Is it wau to automaticly assign object name to newly created geometry?

No, because automatically generating names for everything would cause the "Objects" section of the scene browser to become hugely cluttered with a zillion names which would get in the way of any particularly important objects that you had decided to name yourself.

Basically the naming mechanism is intended to give you a way to organize some particular important objects, having a name for every single little line or arc is at cross purposes to that.

- 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:  Andrei Samardac
5710.3 In reply to 5710.2 
Thanx, but is way to for example to assign random name to object? for example to push shurtcut and the object will be named randomly or increment?
  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
5710.4 In reply to 5710.3 
Hi mir4ea, here's a script you can set on a shortcut key which will assign names to all currently unnamed objects:

script: /* Assign names to all objects */ var objs = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name == '' ) { obj.name = 'Object_' + (i+1); } }

Be aware though that if you run this on a heavy model that has a lot of objects in it, the "Objects" section of the scene browser will become very full of names.

- 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:  Andrei Samardac
5710.5 In reply to 5710.4 
Thanks a lot! Michael when works on version 3 will be finished and officially released?
  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
5710.6 In reply to 5710.5 
Hi mir4ea,

> Michael when works on version 3 will be finished and officially released?

It's hard to pin it down exactly, maybe somewhere near the middle of this year.

- 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:  Andrei Samardac
5710.7 In reply to 5710.6 
cool)
  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:  Andrei Samardac
5710.8 In reply to 5710.7 
Hi Michael, I wanted to ask you about a script that create object and assign name to it automaticly. It's becouse every time I create object I have to think how to name it, it borrings me, becouse I have to spend time to think how to name(every time unic name) and to type this name. It would be greate to push the button and create object with random or incremental name. I have to create objects becouse of I export model for render.
Thank you for advance, I need it a lot!
  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
5710.9 In reply to 5710.8 
Hi mir4ea,

> I wanted to ask you about a script that create object and assign name to it

Could you describe a bit more about how you would want the script to create the object? There are a lot of different ways to create objects, like drawing a circle, making a loft, doing an extrusion, etc.., etc... - how would this one single script know what method to use for creating the object?


> I have to create objects becouse of I export model for render.

For many kinds of file formats where the format has a name set for each different object, MoI will already set a name automatically at export time, like if you export to OBJ format separate objects will get named object1, object2, object3, etc... inside of the OBJ file.

For example, create a file with 2 boxes in it but do not name them - now export to OBJ format, that will automatically name the boxes object1 and object2, you should then see those names inside your rendering program, is that the kind of thing you're looking for?

- 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:  Andrei Samardac
5710.10 In reply to 5710.9 
No not exactly, becouse for example as you can see in my last work I mean spider, it has 4 legs. Each leg consist of a lot of objects. And if I export this leg the same object on diffrend leg will have diffrent name. For example I have some panel wich is the same on every leg, but it will have diffrent name. And when I assign material in the render software I have to assign it to each panel individually. When these details a lot I have to spend a lot of time assigning this material. But if pannel have the same name on each leg I have to assign color once.
  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:  coi (MARCO)
5710.11 In reply to 5710.10 
couldn't you solve this problem by using styles? just assign the same style to all the panels(or whatever) in MOI and basically you are done.
  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:  Andrei Samardac
5710.12 In reply to 5710.11 
it no solve the problem, becouse if I import it in cinema 4D, I got a lot of styles, and if I want to change style I have to everytime change imported stiles. I cannot assign material to already created material in moi I have to every time change already maded in moi. It's a lot of problems working this way. Objects the only way to comfort coloring in cinema 4D.
  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:  TpwUK
5710.13 In reply to 5710.12 
So what would be good for you, would you like it so when you click the objects status screen where it says Unnamed, that it would open up the dialog as normal where you would name it, but instead of empty name it puts in something like "Cube-01" or "Sphere-01" or "Solid-01" etc etc. That would make it so a quick click on OK creates the name, or you simply have to start typing so you give it the name you want.

If C4D supports Step file format that handles the MoI styles and object names better than OBJ

Martin Spencer-Ford
  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:  Andrei Samardac
5710.14 In reply to 5710.13 
No I want to push shurtcut, and it creates object with some random unic name without any dialogs. It doesn't matter what format I use, it's rather the work flow in C4D.
  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:  TpwUK
5710.15 In reply to 5710.14 
Ah ha - If i am right you want a GUID, it's a normal windows call so in theory it should work, don't know if it would carry over to the Mac version though, and I also don't know if you can call it through the scripting interface, best wait for Michaels reply on this one .... sorry. Hopefully we have narrowed it down to something workable.

Sample GUID = {3F2504E0-4F89-11D3-9A0C-0305E82C3301} ... Braces are optional

Martin Spencer-Ford
  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:  Andrei Samardac
5710.16 In reply to 5710.15 
Hay Martin, I dont want any windows) Just want to push the shortcut and have an object with random unic name, without any windows and dialogs :) Let's wait Michael reply)
  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
5710.17 In reply to 5710.14 
Hi Mir4ea,

> No I want to push shurtcut, and it creates object with some random unic name without any
> dialogs. It doesn't matter what format I use, it's rather the work flow in C4D.

There was a script for assigning object names back earlier in this same thread topic here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=5710.4

I guess though that does not guarantee that the name was unique, is that the particular problem you are running into?

I'll see about cooking up a second one that takes uniqueness into account.


> becouse if I import it in cinema 4D, I got a lot of styles, and if I want to change style
> I have to everytime change imported stiles.

Are you certain about this? I think that I've heard before from various people where they did not have any problems reimporting geometry and having it map to already customized materials.

Is there possibly some setting for handling material assignments on imported files that you do not have set?

- 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:  Andrei Samardac
5710.18 In reply to 5710.17 
No it's no problem working in C4D to render but for example I'll discribe How I work.
I mport model in C4d without any styles or with but delite them. Than I put all objects into the null object (Folder). Than assign base color to this folder to color all model. Than I started to color details, for example if I have the same details on 2 sides (symetrical), and this details have the same object name they colored simultaneously. So when I export model from MOI I don know what details in what color will be colored. So for example I may have 300 ojects and 20 styles in the final render. Working with styles from moi is very hard becouse I cannot assign one material to multiple objects and have to change all materials by hands it's very time cobsuming, and can not experiment with difrent color setups it's very time consuming.
So what I need is shortcut that will assign unic name to SELECTED geometry, without any dialogs. Thank you)
  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
5710.19 In reply to 5710.18 
Hi mir4ea, I'm sorry I don't understand this part at all:

> Working with styles from moi is very hard becouse I cannot assign one material to multiple objects <...>

But you can assign one material (style) in MoI to any number of objects you want, it's normal for many different objects which should share the same appearance to share the same material as well.

I don't understand why you don't want to use styles to control the appearance or materials of your models, that's one of the main reasons why styles exist in Moi in the first place...

- 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:  Michael Gibson
5710.20 In reply to 5710.18 
Hi mir4ea,

> So what I need is shortcut that will assign unic name to SELECTED geometry, without any dialogs. Thank you)

Here's a script that will do that - paste in the below script. Then when you run it if you have selected 4 objects for example the first will be named object_0001, the second object_0002, etc... with each object getting a unique name. If there is another object already named object_0002 it will skip that name and keep increasing the number until it finds an unused one.

script: /* Assign unique names to selected objects */ var all_objects = moi.geometryDatabase.getObjects(); var used_names = new Array(); for ( var i = 0; i < all_objects.length; ++i ) { var obj = all_objects.item(i); if ( obj.name != '' ) { used_names[obj.name] = true; } } var selected_objects = moi.geometryDatabase.getSelectedObjects(); var counter = 0; for ( var i = 0; i < selected_objects.length; ++i ) { var obj = selected_objects.item(i); if ( obj.name != '' ) { continue; } var name; while ( 1 ) { var numtag = counter.toString(); while ( numtag.length < 4 ) { numtag = '0' + numtag; } name = 'object_' + numtag; if ( used_names[name] ) { ++counter; continue; } used_names[name] = true; break; } obj.name = name; }


I'm not entirely sure if that is what you wanted, did you mean you wanted the entire selection to all have the one same unique name rather than each individual object inside of the selection getting its own unique name?

It still seems like you're trying to do something kind of unusual by avoiding styles though, I don't understand why you wrote previously that you can't assign one material to multiple objects, you should definitely be able to do exactly that...

- 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

 

 
Show messages:  1-20  21-34