V4 beta Nov-18-2017 available now
 1-14  …  35-54  55-74  75-94  95-114  115-134  135-137

Previous
Next
 From:  r2d3
8682.75 In reply to 8682.73 
>Thanks for reporting it!

Thanks for fixing it!!!!

Ralf
  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
8682.76 In reply to 8682.16 
Hi Max, thanks for all your work testing your scripts!

re:
> 1. factory.setInput function stops with "Invalid function argument" error when
> an argument type is wrong. In fact it's not a MoI problem, but (if I understand
> clearly) v3 in this case just set input to null and don't stop a script.

Hmmm, well it looks like v3 and earlier didn't null out the input it just silently did nothing if the value couldn't be used.

This is one of those cases where it's kind of hard to decide to do, should it do what's probably the wrong thing since v3 did? But that might make it harder in the future for someone to find out their new script isn't doing what they thought it was... Maybe wait and see if it comes up with some more older scripts?


> 2. moi.geometryDatabase.findstyle function returns a wrong data when it creates a new style.

Yup, this was definitely a bug in moi.geometryDatabase.findstyle for the case where it creates a new one. Fixed for the next release.


> 3. Something wrong with moi.command.getOption function. I can't read data from moi.ini

I can't seem to reproduce this one over here, is it possible that the option isn't present in your Mac moi.ini file? moi.command.getOption() will throw an 'Operation failed' exception if there isn't any such option in there.


> 4. Interactive scripts perfarmance problem. MoI v4 18.11 works much faster than
> with 13.11, but still slower than MoI v3/4(Win) and v3.1(Mac).

This one is going to take me quite a bit of effort to analyze very well, so probably after the next beta I can take a look. It is possible that raw script performance has taken a hit with the 64-bit transition, but it will take some profiling to try and see what's going on. EDIT: maybe I should ask you to clarify - is it only the v4 Mac version where this is happening?


> 5. I noticed a rare Orientation Picker bug. Unfortunately I don't know how to reproduce it.

You probably already saw but this one's fixed too now for the next release.


> Unfortunately I can't find a way to show previews in Moi html windows. Neither
> native nor script paths doesn't work.

So you mean you want to make a tag that loads a file from the appdata directory? How about if I add support in the moi:// protocol handler so you could do moi://appdata/Objects/Filename.png as the URL, similar to how moi://ui and moi://commands URLs can be used currently.

Thanks,
- Michael

EDITED: 23 Nov 2017 by MICHAEL GIBSON

  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:  Metin Seven (METINSEVEN)
8682.77 
Hi Max,

I just noticed that cMorph doesn't work in the MoI beta. I get this error message:

———————

SyntaxError: Expected an identifier but found 'var' instead

cMorph.js line 47

43: curvesF.setInput( 0, objectpicker.objects );
44: curvesF.setInput( 1, 'Refit' );
45: curvesF.setInput( 2, 0.001 );
46: var curves = curvesF.calculate(),
47: >> var closedCurves = curves.item(0).isClosed && curves.item(1).isClosed;
48:
49: moi.ui.beginUIUpdate();
50: moi.ui.hideUI( 'SelectionPrompt' );
51: moi.ui.showUI( 'MorphOptions' );

———————

Many thanks in advance for updating it.

Regards,

— Metin

———————

visualization • illustration • animation • 3D (print) design — https://metinseven.com

  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:  r2d3
8682.78 In reply to 8682.77 
SyntaxError: Expected an identifier but found 'var' instead

cMorph.js line 47

43: curvesF.setInput( 0, objectpicker.objects );
44: curvesF.setInput( 1, 'Refit' );
45: curvesF.setInput( 2, 0.001 );
>>>>>>>46: var curves = curvesF.calculate(),
47: >> var closedCurves = curves.item(0).isClosed && curves.item(1).isClosed;
48:
49: moi.ui.beginUIUpdate();
50: moi.ui.hideUI( 'SelectionPrompt' );
51: moi.ui.showUI( 'MorphOptions' );

———————

on line 46 is a , instead of a ; at the end.
Perhaps it works if you change that...
Ralf
  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:  Metin Seven (METINSEVEN)
8682.79 In reply to 8682.78 
Hi Ralf,

Yep, that turned out to be the culprit, thanks!

Here's the corrected version:

http://moi3d.com/forum/get_attachment.php?webtag=MOI&hash=54d4a04782fd5e60023309009004f9b6&filename=cMorph.js

Regards,

— Metin

———————

visualization • illustration • animation • 3D (print) design — https://metinseven.com

Attachments:

  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:  Max Smirnov (SMIRNOV)
8682.80 In reply to 8682.76 
Hi Michael

>>This is one of those cases where it's kind of hard to decide to do, should it do what's probably the wrong thing since v3 did? But that might make it harder in the future for someone to find out their new script isn't doing what they thought it was... Maybe wait and see if it comes up with some more older scripts?

Yes, you're right. As a programmer I agree with you.

>>I can't seem to reproduce this one over here, is it possible that the option isn't present in your Mac moi.ini file? moi.command.getOption() will throw an 'Operation failed' exception if there isn't any such option in there.

I'm sure this option exists in moi.ini. Maybe it's too long? I noticed this problem with mac version only (Operation failed).
code:
LightingOptions={"selected":"Oil Slick","themes":{"Default":{"lightingStyle":"Default","specularHighlights":false,"specularBrightness":0,
"specularFocusSize":0,"metallicLighting":false,"fixedLightPositions":false,"customKeyLightLevel":0,"customFillLightLevel":0},"Oil Slick":{"lightingStyle":"Default",
"specularHighlights":true,"specularBrightness":0.28,"specularFocusSize":2,"metallicLighting":false,"fixedLightPositions":true,"customKeyLightLevel":0,
"customFillLightLevel":0},"Aluminum":{"lightingStyle":"MoreFill","specularHighlights":true,"specularBrightness":0.38,"specularFocusSize":0.73,"metallicLighting":true,
"fixedLightPositions":true,"customKeyLightLevel":0,"customFillLightLevel":0},"Car Body":{"lightingStyle":"CustomLevels","specularHighlights":true,
"specularBrightness":0.65,"specularFocusSize":1.5,"metallicLighting":true,"fixedLightPositions":true,"customKeyLightLevel":0.24,"customFillLightLevel":0.97},
"Chrome":{"lightingStyle":"Headlight","specularHighlights":true,"specularBrightness":50,"specularFocusSize":2,"metallicLighting":true,"fixedLightPositions":false,
"customKeyLightLevel":0,"customFillLightLevel":0},"Clay":{"lightingStyle":"CustomLevels","specularHighlights":true,"specularBrightness":0.11,"specularFocusSize":0.4,
"metallicLighting":false,"fixedLightPositions":false,"customKeyLightLevel":0.52,"customFillLightLevel":0.41},"Draft":{"lightingStyle":"CustomLevels","specularHighlights":true,
"specularBrightness":0.3,"specularFocusSize":0.16,"metallicLighting":true,"fixedLightPositions":false,"customKeyLightLevel":2,"customFillLightLevel":2},
"Dramatic":{"lightingStyle":"KeyOnly","specularHighlights":true,"specularBrightness":0.14,"specularFocusSize":0.44,"metallicLighting":false,"fixedLightPositions":false,
"customKeyLightLevel":0,"customFillLightLevel":0},"Glass":{"lightingStyle":"Hemispheric","specularHighlights":true,"specularBrightness":80,"specularFocusSize":10,
"metallicLighting":true,"fixedLightPositions":true,"customKeyLightLevel":0,"customFillLightLevel":0},"Porcelain":{"lightingStyle":"CustomLevels","specularHighlights":true,
"specularBrightness":0.28,"specularFocusSize":2,"metallicLighting":false,"fixedLightPositions":true,"customKeyLightLevel":0.08,"customFillLightLevel":1},
"Rubber":{"lightingStyle":"MoreFill","specularHighlights":true,"specularBrightness":0.4,"specularFocusSize":0.6,"metallicLighting":false,"fixedLightPositions":true,
"customKeyLightLevel":0,"customFillLightLevel":0},"Showroom Shine":{"lightingStyle":"LessFill","specularHighlights":true,"specularBrightness":0.3,
"specularFocusSize":1,"metallicLighting":true,"fixedLightPositions":true,"customKeyLightLevel":0,"customFillLightLevel":0},"Wax":{"lightingStyle":"CustomLevels",
"specularHighlights":true,"specularBrightness":0.9,"specularFocusSize":1.5,"metallicLighting":false,"fixedLightPositions":true,"customKeyLightLevel":0.08,
"customFillLightLevel":0.982},"Wetsuit":{"lightingStyle":"Hemispheric","specularHighlights":true,"specularBrightness":0.19,"specularFocusSize":1.5,"metallicLighting":false,
"fixedLightPositions":true,"customKeyLightLevel":0,"customFillLightLevel":0},"Enamel":{"lightingStyle":"CustomLevels","specularHighlights":true,"specularBrightness":0.37,
"specularFocusSize":0.89,"metallicLighting":false,"fixedLightPositions":false,"customKeyLightLevel":1,"customFillLightLevel":0.14},"Clear Coat":{"lightingStyle":"CustomLevels",
"specularHighlights":true,"specularBrightness":0.17,"specularFocusSize":1,"metallicLighting":false,"fixedLightPositions":true,"customKeyLightLevel":-1,"customFillLightLevel":2},
"HighGloss Plastic":{"lightingStyle":"CustomLevels","specularHighlights":true,"specularBrightness":0.16,"specularFocusSize":0.62,"metallicLighting":false,"fixedLightPositions":false,
"customKeyLightLevel":-0.6,"customFillLightLevel":2},"Ornament":{"lightingStyle":"CustomLevels","specularHighlights":true,"specularBrightness":200,"specularFocusSize":3,
"metallicLighting":true,"fixedLightPositions":false,"customKeyLightLevel":1.07,"customFillLightLevel":-0.6},"Onyx":{"lightingStyle":"CustomLevels","specularHighlights":true,
"specularBrightness":90,"specularFocusSize":1,"metallicLighting":false,"fixedLightPositions":false,"customKeyLightLevel":0.4,"customFillLightLevel":-0.4},
"Velvet Night":{"lightingStyle":"CustomLevels","specularHighlights":true,"specularBrightness":5000,"specularFocusSize":6,"metallicLighting":false,"fixedLightPositions":false,
"customKeyLightLevel":-4,"customFillLightLevel":1},"Zebra Stripe":{"lightingStyle":"CustomLevels","specularHighlights":true,"specularBrightness":200,"specularFocusSize":0,
"metallicLighting":true,"fixedLightPositions":false,"customKeyLightLevel":0.6,"customFillLightLevel":-0.5}}}


>>This one is going to take me quite a bit of effort to analyze very well, so probably after the next beta I can take a look. It is possible that raw script performance has taken a hit with the 64-bit transition, but it will take some profiling to try and see what's going on. EDIT: maybe I should ask you to clarify - is it only the v4 Mac version where this is happening?

Yes. Mac version only. Windows version works perfectly.
You can test it with my SpherePointsPlus script (http://moi.maxsm.net/media/files/SpherePointsPlus.v.1.1.2014.10.23.zip). When I move slider I notice a significant stutters.
Also you can check this nod-file with the same functionality. It works much smoother than script.

EDITED: 7 Mar 2022 by SMIRNOV

  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:  Marc (TELLIER)
8682.81 
Hi Michael,

Congratulations on this tremendous achievement!
I imagine you must have been discouraged at many point at the insane amount of work required.

I had no time to test it more than kicking the tires, I'm in a bit of a work rush, but I'll get to more serious modelling soon.
On thing I noticed is the 'live' aspect of extrude seems slower in the Mac version than Windows.

Marc
  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:  Max Smirnov (SMIRNOV)
8682.82 In reply to 8682.76 
Hi Michael

I tested my Cloth script today.
It hangs on infinite loop at line 75:
code:
while ( moi.ui.commandUI.runAnimation ) { moi.ui.commandUI.calcFrame(); }

Interface is inactive, viewports not updating.
Should I add something like moi.ui.update() inside the loop, or rewrite this script using setInterval function?

UPD:
I rewrote the script using setInterval function. Now it runs about 50-60% faster than old one with MoI v3.


>>So you mean you want to make a tag that loads a file from the appdata directory?
Yes.
In fact I would like to read files from any user directory, but I think its impossible in MacOS.

>>How about if I add support in the moi:// protocol handler so you could do moi://appdata/Objects/Filename.png as the URL, similar to how moi://ui and moi://commands URLs can be used currently.

moi://appdata is a good idea
Thank you!

EDITED: 23 Nov 2017 by SMIRNOV

  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:  val2
8682.83 
I think I might have found a bug. If I make a box (or any solid) and then scale it then go to undo It solid disappears instead of returning to it's initial state.
thanks,

Val
  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)
8682.84 
<< 8682.83
... a bug. If I make a box (or any solid) and then scale it then go to undo It solid disappears instead of returning to it's initial state.

The same for me! :) (Windows 10)
  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
8682.85 In reply to 8682.83 
Hi val2.

No...for me all works fine on Windows 10.

But, I'm not sure I understand correctly your use-case.

Could you please specify more in depth the steps you did ?

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:  danperk (SBEECH)
8682.86 
>>I think I might have found a bug. If I make a box (or any solid) and then scale it then go to undo It solid disappears instead of returning to it's initial state.
thanks,

Confirmed here as well.

Windows 10 version 1709 (KB4041994).

EDITED: 23 Nov 2017 by SBEECH

Image Attachments:
Size: 859.7 KB, Downloaded: 44 times, Dimensions: 1174x787px
  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:  eric (ERICCLOUGH)
8682.87 In reply to 8682.86 
I just tried that sequence once and it did not have a disappearing problem.
eric
  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:  Finema
8682.88 In reply to 8682.83 
Hi
Same for me on Mac
I can also reproduce this bug with Rotation
  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:  BurrMan
8682.89 In reply to 8682.88 
I can reproduce it.

It kicks in when using the picker to do it. If you just type values for the scale or rotate, it operates correctly.

If you use pick points, then the disappear appears.
  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:  Metin Seven (METINSEVEN)
8682.90 In reply to 8682.81 
Hi Michael,

I can confirm what Marc mentioned — the interactivity of Extrude in the viewport lags a little compared to V3 for MacOS.

Regards,

Metin

———————

visualization • illustration • animation • 3D (print) design — https://metinseven.com
  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
8682.91 In reply to 8682.80 
Hi Max,

re: moi.command.getOption() getting from moi.ini not working on Mac - I put in your LightingOptions="" value but still couldn't get the failure, could you please post or e-mail me (moi@moi3d.com) your entire moi.ini file so I can be sure I've got the same as you for testing it?

Thanks, - 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
8682.92 In reply to 8682.82 
Hi Max,

re:
> I tested my Cloth script today.
> It hangs on infinite loop at line 75:
> code:
>
> while ( moi.ui.commandUI.runAnimation ) { moi.ui.commandUI.calcFrame(); }
>
>
> Interface is inactive, viewports not updating.
> Should I add something like moi.ui.update() inside the loop, or rewrite this script using setInterval function?

Yeah this is because of the change in threading model - previously the .js code would run in a separate moi_commandprocessor process and use interprocess communication when your script called any property or method on a MoI object. This has some overhead but protected against the script consuming a lot of CPU or running an infinite loop. The command could be torn down without any cooperation from the script itself. But the interprocess communication overhead was pretty costly for performance, it's why code would run faster if you moved it over into the .htm file since code there ran inside the main process and on the main thread so no interprocess communication needed. For v4 the .js code runs on the main thread now so it won't be necessary anymore to move it over into the .htm file for added speed but the downside is that the script is much more in full control of MoI and if it spins an infinite loop that will lock up MoI now.

So yes in v4 for something with animation setInterval would be the way to go, I should probably add one into MoI's own object model so you don't have to get it from the web browser environment but that will work for right now.

In order to avoid locking up the whole program the script will need to have an event loop where it calls waitForEvent, just spinning an infinite loop with no event loop like the Cloth script was doing previously isn't going to be supported anymore. The plus side of this is you don't need to move code over into the .htm file to gain performance anymore.

Hope that makes sense for what you saw here.


> In fact I would like to read files from any user directory, but I think its impossible in MacOS.

Yes, I guess not unless the process has elevated superuser privileges.


> moi://appdata is a good idea

I'll add that in for the next beta. Maybe it would be convenient if I also made some of the filesystem functions be able to optionally take moi:// URLs for paths or filenames too so you could do something like if ( moi.filesystem.dirExists( 'moi://appdata/Objects' ) ) { } , would that be of any use? That way you might not need to glue together pieces of paths quite as much.


Another thing that I think I forgot to mention is that you should now be able to index directly off an object list similar to how JS arrays work like should be able to do curves[2] now instead of needing curves.item(2) .


Thanks, - 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
8682.93 In reply to 8682.83 
Hi Val,

re:
> I think I might have found a bug. If I make a box (or any solid) and then scale it then go
> to undo It solid disappears instead of returning to it's initial state.

You've definitely found a bug, thank you for reporting it! Looks like something going wrong with undo and Transform commands that show the original object in wireframe at some point during the command.

Tomorrow I will dig into it in more detail.

Thanks, - 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:  Max Smirnov (SMIRNOV)
8682.94 In reply to 8682.91 
Hi Michael

>>I put in your LightingOptions="" value but still couldn't get the failure
Sorry, it's my mistake. I accidentally put this option to View section instead of Commands.
I don't know why, but I thought that getOption function can read any option from moi.ini
  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-14  15-34  35-54  55-74  75-94  95-114  115-134  135-137