Looking for a compromise for a good workflow involving both Moi V3 and Rhino V5

Next
 From:  mkdm
7909.1 
Hi Michael and good day,

I think that i'm not doing a mistake if a create this new thread, starting from my previous question http://moi3d.com/forum/index.php?webtag=MOI&msg=7904.5,
followed by your exhaustive reply at http://moi3d.com/forum/index.php?webtag=MOI&msg=7904.6.

Maybe this thread "Looking for a compromise for a good workflow involving both Moi V3 and Rhino V5",
could be useful for some others interested to the same topic.

Well....i did a little test based on your suggestions.

> Yes, that's currently the normal behavior - MoI goes through some effort to preserve object attributes of Rhino-specific things that MoI itself does not use,
> but that will only happen for objects that have not been edited in MoI. When you do the step of moving the sphere, that's a type of edit and
> it's basically the equivalent of the original sphere being destroyed and a new sphere with different coordinates being created.
> With the object being changed and having a different id, MoI will no longer find the original Rhino attributes that were assigned
> to the original sphere and so you get the result you see here.
> ....
> One thing that might work better is to assign your material by layer rather than having it assigned as an override
> to the individual object like you have done here.
> To do that in Rhino in the object material properties have that set to "Assign material by: Layer",
> and then set your material on the layer.
> Then as long as you don't modify the Styles list in MoI (which map to Layers in Rhino),
> the layer properties should round trip back to Rhino I think.
> Then I think you can create new objects in MoI, the materials will still work because the default for a new object is to have materials by layer.

I experienced this behavior and in fact all the materials managed in Rhino are maintained also in Moi, ONLY if i assign the materials directly to the Rhino layers.
This is could be a good starting point.
But unfortunately, as you told me, as long as i do any modification to the styles list in Moi and overwrite the .3dm file, all the materials infos are lost inside Rhino.
Pity.....
Maybe someone with a good skill with the Rhino's API or in the .3dm file format in general, wants to write a plugin that will preserve in some manner, this information managed by Rhino and destroyed by Moi.
Something like a file processor that extracts the Rhino specific data from the .3dm file, stores them in some place, and joins them again with th file saved in Moi.

Who knows ??? :))

But...in relation to your second indication :

> When you start a fresh 3DM file in MoI, it will default to writing Rhino v4 format 3DM files.
> But when you open a v5 3DM file originally created by Rhino v5 into MoI,
> MoI will remember it was a v5 3DM file that was opened and will then write a v5 file when you save it out again.

I'm sorry...i did what you said but every time i load in Moi any file first created in Rhino 5.0 3dm format, and save back from Moi, then reloaded in Rhino and saved it again, Rhino always shows me the popup that tells me that the file is a 4.0 3dm format,
and asks me if i want to maintain that format or save it with the new 5.0 format.

I've made more then one test for this, and the behavior is always the same, regardless of first creating the files in Rhino rather than in Moi.

I don't know.....

Anyway, i will stay tuned for this situation...

Thank's a lot for your suggestions and have a good day at work !

Marco.

EDITED: 1 Apr 2016 by 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
7909.2 In reply to 7909.1 
Hi Marco,

re:
> I'm sorry...i did what you said but every time i load in Moi any file first created in Rhino 5.0
> 3dm format, and save back from Moi, then reloaded in Rhino and saved it again, Rhino
> always shows me the popup that tells me that the file is a 4.0 3dm format,
> and asks me if i want to maintain that format or save it with the new 5.0 format.

Yup, you're right - sorry I got confused about this, I was looking at my most current 3DM code which behaves like I was describing but that's something I had changed just after the MoI 3.0 release. So the next version of MoI is set to behave like I was describing (MoI v4 will write a Rhino v5 3DM if it opened a v5 3DM) but MoI v3 does only write out Rhino v4 3DM files.


> But unfortunately, as you told me, as long as i do any modification to the styles list in Moi
> and overwrite the .3dm file, all the materials infos are lost inside Rhino.
> Pity.....

Well, this is something that you can control - if you need to edit the style/layer list and need to preserve layer material transfer to and from Rhino, do not edit the styles in MoI, edit in Rhino and then you should be ok.

Another way that could work for you would be to set up materials for rendering more at the end of your process after you've completed the models rather than doing it early on.

- 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
7909.3 In reply to 7909.1 
The "Save as Rhino v5 file if opened as v5" was something I added in after MoI v3 so the next version of MoI would fix the problem reported here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7166.1

It had to do with plug-in data extensions to materials only being written by OpenNURBS for v5 files and being ignored for v4 files.

But yes that will only be in effect in the next version of MoI, not MoI v3.

I had remembered something about that but I forgot that MoI v3 didn't do that yet.

- 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
7909.4 In reply to 7909.1 
Also another thing you can try is in Rhino delete objects (so you have no objects but maintain the layers, unlike File > New) and use File > Import or Copy/Paste to bring in any objects you edited in MoI rather than using File > Open in Rhino.

You could test that and hopefully what might happen is objects on a layer that matched that name in Rhino would get assigned to that layer with the existing Rhino layer unchanged, but any objects assigned to new layers that you created in MoI would have the new layer created in Rhino for it to go on. I'm not sure if that's how it behaves or not though but it might. If it works like that, then that gives you another way to move stuff back and forth without disturbing your materials assigned by layer.

- 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:  mkdm
7909.5 In reply to 7909.4 
Hi Michael,

re:
> Yup, you're right - sorry I got confused about this, I was looking at my most current 3DM code which behaves
> like I was describing but that's something I had changed just after the MoI 3.0 release.
> So the next version of MoI is set to behave like I was describing (MoI v4 will write a Rhino v5 3DM if it opened a v5 3DM)
> but MoI v3 does only write out Rhino v4 3DM files.
> ...
> ...
> Well, this is something that you can control - if you need to edit the style/layer list and need to preserve layer material transfer to and from Rhino,
> do not edit the styles in MoI, edit in Rhino and then you should be ok.
> ...
> ...
> Another way that could work for you would be to set up materials for rendering more at the end of your process
> after you've completed the models rather than doing it early on.
> ...
> ...
> Also another thing you can try is in Rhino delete objects (so you have no objects but maintain the layers, unlike File > New)
> and use File > Import or Copy/Paste to bring in any objects you edited in MoI rather than using File > Open in Rhino.

Thank's a lot for your technical and detailed help.
Much Appreciated.

Not a big problem, i hope, regarding the actual lack of MoiV3 to manage the .3dm V5 format.

It happens to me too, to get confused about the different versions of my source codes, when a customer ask me something....
And i guess that the core source code of Moi is a little bit huge....:)

I will follow all your suggestions and i'll make some tests as soon as possible.

Thanks again and nice day!

Marco.
  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