Strange behavior for a UI displayed by CommandMenuButton or moi.ui.showMenu
All  1-4  5-6

Previous
Next
 From:  mkdm
7904.5 In reply to 7904.4 
Hi Michael,

Thank you very much for your deep answer.

As recommended by you, i made another and more precise test and here i present you the result.
My Rhino version is : Version 5 SR12 64-bit 5.12.50810.13095, 10/08/2015

I have attached the 3dm files and the screen captures of all the test stages.

This are the steps of the test i made :

1) Step 001
Create a simple file in Moi that contain only 1 sphere, named "sphere1" and assigned to a material named "moi_sphere",
then saved it in the file "step_001_saved_from_moi.3dm".
See the attached files "step_001_saved_from_moi.3dm" and "step_001.PNG"

2) Step 002
Loaded in Rhino V5 the file "step_001_saved_from_moi.3dm" and assigned a marble material to the sphere.
After that i first wanted to overwrite the file, and Rhino showed me the popup window captured in the "step_002_B.PNG" file.
The popup said : "This model contains information that cannot be saved in the Rhino 4.0 file format.......Save as 4.0 file.....Save as 5.0 file....."
Anyway, in order to maintain separated the steps of this test, i saved as 5.0 in the new file "step_002_saved_from_rhino.3dm"
See the attached files "step_002_saved_from_rhino.3dm" and "step_002_B.PNG"

3) Step 003
Loaded in Moi the file "step_002_saved_from_rhino.3dm" and simply added a new object.
A cylinder assigned to a material named "moi_cylinder".
I didn't touch the sphere.
Save all to the new file "step_003_saved_from_moi.3dm".
See the attached files "step_003_saved_from_moi.3dm" and "step_003.PNG"

4) Step 004
Loaded in Rhino V5 the file "step_003_saved_from_moi.3dm" and duplicated the cylinder made in Moi.
The marble material assigned to the sphere was always there.
I didn't touch the sphere.
Save all to the new file "step_004_saved_from_rhino.3dm".
See the attached files "step_004_saved_from_rhino.3dm" and "step_004.PNG"

5) Step 005
Loaded in Moi the file "step_004_saved_from_rhino.3dm" and this time simply moved the sphere object.
That's the crucial point!
Save all to the new file "step_005_saved_from_moi.3dm".
See the attached files "step_005_saved_from_moi.3dm" and "step_005.PNG"

6) Step 006
Loaded in Rhino V5 the file "step_005_saved_from_moi.3dm" and....
THE SPHERE OBJECT HAD NO MORE THE RHINO MATERIAL ..
See the attached file "step_006.PNG"

So....is it all correct ? Is this the normal behavior of the entire process ?
I ask this 'cause i want to know a good workflow method to follow in order to use both the software, Rhino and Moi.
Just to model both in Moi and Rhino, save back and forth the files, and then render all inside Rhino/Thea Render.

And...about the other question i made, regarding the writing of the search/history commands plugin,
i'll will try to use the <moi:TextInput> instead the standard html <input>, as recommended by you.

Compatibly with my work commitments, i hope that soon i can post some decent lines of code.

Meantime...thank's again for your support and...good night!

Marco.

Image Attachments:
Size: 407.6 KB, Downloaded: 26 times, Dimensions: 1137x650px
Size: 463.4 KB, Downloaded: 22 times, Dimensions: 1201x691px
Size: 153.5 KB, Downloaded: 32 times, Dimensions: 724x402px
Size: 424.6 KB, Downloaded: 16 times, Dimensions: 1137x656px
Size: 469.8 KB, Downloaded: 23 times, Dimensions: 1209x687px
Size: 432.2 KB, Downloaded: 16 times, Dimensions: 1136x652px
Size: 266.7 KB, Downloaded: 18 times, Dimensions: 1182x604px
  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
7904.6 In reply to 7904.5 
Hi Marco, thanks for the much more detailed steps, that helps a lot!


> So....is it all correct ? Is this the normal behavior of the entire process ?

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.


> I ask this 'cause i want to know a good workflow method to follow in order to use both the
> software, Rhino and Moi. Just to model both in Moi and Rhino, save back and forth the files,
> and then render all inside Rhino/Thea Render.

Most of the time I'd recommend moving in the direction of creating stuff in MoI and moving it most often in one direction from MoI to Rhino.

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.


You previously mentioned this:

> Second point....i saw that Moi's .3dm file is the V4 format and when i save it
> back from Rhino in the V5 format, any subsequent save from Moi doesn't
> work. The file is not saved anymore.

Here were you talking about the dialog that pops up, or something different? Or did I miss it in your steps above?

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.

- 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: All  1-4  5-6