Object name
 1-9  10-29  30-34

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

Previous
Next
 From:  Andrei Samardac
5710.21 In reply to 5710.19 
ok for example we have 6 pices of geometry - 1,2,3 and they are cymetricale mirrored. So If we apply script you make previousley to name unnamed object we will have 6 objects - object 1, object 2... object 6.

Obj 1 - Obj 2
Obj 3 - Obj 4
Obj 5 - Obj 6

For example we want to color model in render soft in 3 colors symetrically. 1-2 Red, 3-4 Green, 5-6 Blue. An we have to make 6 action to assign it to all 6 objects.

But If we assigne objects name this way:

Obj 1 - Obj 1
Obj 2 - Obj 2
Obj 3 - Obj 3

We have to make only 3 action assigning materials.

When work with big models it becomes more comfartable to work this way, becouse you can see result emidiatly.


If we assign styles instead of object names we have to find it among other it can achive 300 styles and more to change it. And if for example we want to to assign the same material to another object. We have to find the style of this object and make it the same. Or we can assign this material to object we want and in this case it's good to have the object named as I described previousle.

So thats why I prefer to not impor styles, and start to create it from scratch in render soft. To assign it to selected objects.


One thing I do every time when I prepare model for rendering. I devide model on 2 pices symetrically and delet one half. After that I name the same name repeated geometry on this half of model. Name it and hide to see what remain. And when I named all repeated objects I aply this script to name unnamed geometry. Then mirror model.
So every time I named geometry I spend a lot of time typing name of objects. So thats why I'm asking for script to name the same name selected geometry automaticly.


Hope you understand my problem, thre are a lot of nuances rendering big models. You can discover them only when you work on this.

EDITED: 3 Mar 2013 by ANDREI SAMARDAC

  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.22 In reply to 5710.20 
Hay Michael, thank you a lot! But I wanted that all selected geometry have the same name!
Make this small change and I will love 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.23 In reply to 5710.21 
Hi mir4ea, I'm sorry but I'm still having some difficulty following along. I think you mean you want the script to work in the other way that I mentioned though, that all the selection would get the same unique name assigned to it, is that correct?


> When work with big models it becomes more comfartable to
> work this way, becouse you can see result emidiatly.

How is it that you see the result immediately? If you were using styles you could see right away that the objects have the same display color...


> And if for example we want to to assign thу same material to another
> object. We have to find the style of this object and make it the same.

Ok, but doesn't your rendering program have some material management tools in it to help with this, something like "match object material to next picked object" or something like that.

Or are you talking about doing that "make the style the same as another object" operation in MoI? If so then I could make a tool for you to help with doing that by selection in MoI as well.


If you have some specific problems like that with styles could a couple of extra style assignment by picking tools fix that up? It should be better if you could use styles as materials, that's what they're intended to be used 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:  Michael Gibson
5710.24 In reply to 5710.22 
Hi mir4ea,

> Hay Michael, thank you a lot! But I wanted that all selected geometry have the same name!
> Make this small change and I will love you)))!

Ok, I'll give that a try - it does help if you give a little bit more details about exactly how the script should work! ;)

- 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.25 In reply to 5710.23 
"Hi mir4ea, I'm sorry but I'm still having some difficulty following along. I think you mean you want the script to work in the other way that I mentioned though, that all the selection would get the same unique name assigned to it, is that correct?"

Yes exactly!
For example I have 3 pices of geometry - 1,2,3. I want select them all and push shurtcut to make them one object with unic name :)
Sorry I have to discribe it this way from the start...
  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.26 In reply to 5710.22 
Ok, I think this one has the automatic naming how you want it:

script: /* Assign unique object name to selection */ 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 counter = 1; 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; } moi.geometryDatabase.getSelectedObjects().setProperty( 'name', name );
  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.27 In reply to 5710.26 
Wow thank you a lot!!!!!!!!!!!!!!!!!!!!!!!
Sorry I more concept artist less programmer and some times I cann not discribe clearly what I want!
  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.28 In reply to 5710.25 
I still don't understand though why you don't want to use styles, like why if you have a difficulty matching styles why you wouldn't ask for script to help with that part, and why you were saying before that you can't assign one material to multiple objects ??

Instead of 300 styles you end up with 300 object names and then have to set up all material assignments over again in your renderer and you end up with the same 300 materials in the end don't you?

- 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.29 In reply to 5710.28 
Ok I will try to discribe it in few words.
Look at this model it has about 300 objects and 20 materials in C4D. (All the same geometry have the same name, like details on the legs it repeats 4 times on each leg)
But when I export obj from moi I have no any ideas how to color it and if I wanted to work with styles like you sugest I will have 300 styles.
In Cinema 4D, If you have 300 materials it's hard to work becouse if you click on the object it not show it's style automaticly like in keyshot. It just have indication among other 300 materials, and you have to find it. It's thousands time easy have 300 objects and then assign materials working in Cinema 4D. Keyshot automaticly creates material for every objects, so if you have 300 objects you will have 300 materials. But in cinema 4d it's possible to have 300 objects and have no any material.

"and why you were saying before that you can't assign one material to multiple objects ??"
You just missunderstood me, you can do it.



  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-9  10-29  30-34