A question/request about the great moi3d
All  1-5  6-16

Previous
Next
 From:  Michael Gibson
665.6 In reply to 665.3 
Hi Giulio, I've added something to the next beta that makes it possible to script this from a keyboard shortcut.

You'll need to add this shortcut (this only works in the next beta coming out later today):

script:var breps = moi.geometryDatabase.getObjects().getBReps(); var hide = true; for ( var i = 0; i < breps.length; ++i ) { var edges = breps.item(i).getEdges(); if ( i == 0 ) hide = !edges.item(0).hidden; edges.setProperty( 'hidden', hide ); }


So for instance if you set up a shortcut for "S" with that script above (it all goes on one single line), you can then push S to turn on or off edge display. I think that should do what you want.

Also the next beta has a new Options dialog that lets you edit the keyboard shortcuts from within MoI instead of editing the moi.ini text file in notepad.

- 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:  Frenchy Pilou (PILOU)
665.7 In reply to 665.6 
< edit the keyboard shortcuts
alas coding is another story :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  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
665.8 In reply to 665.7 
> alas coding is another story :)

:) Yes, that is the hard part. But I can help if you need something not too complex.

- 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:  Frenchy Pilou (PILOU)
665.9 In reply to 665.8 
Thx but seems there is yet some crazy functions inside so maybe in another life :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  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:  tyglik
665.10 In reply to 665.5 
>> I probably should have released a 1.0 version several months ago and then having the stuff I've been working on recently be the 1.x tune-ups...

I don't think so...
  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:  tyglik
665.11 In reply to 665.6 
Temporary WireFrame display mode -- to turn on or off face display.

Alt+W=script:var breps = moi.geometryDatabase.getObjects().getBReps(); var hide = true; for ( var i = 0; i < breps.length; ++i ) { var faces = breps.item(i).getFaces(); if ( i == 0 ) hide = !faces.item(0).hidden; faces.setProperty( 'hidden', hide ); }
  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:  giulio (UNGA89)
665.12 
Lovely lovely lovey
moi3d quality improved 10X
  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:  3dvisuals dude (ODWYERVISUALS)
665.13 In reply to 665.11 
Thank you for this script Michael and Tyglik and for all your great scripts!

You truly have done wonders with MOI Scripting and given us some great new abilities with them!

I noticed at the end of this particular script there is no final semicolon, but there is in most if not all of the other scripts I have seen for MOI. Since most scripts have it I added it to your script here before installing it in MOI's Options Dialog and it works great! I wonder now though, Is the final semicolon required or just optional?

Thanks again,

- 3dvisuals dude

EDITED: 21 Jun 2007 by ODWYERVISUALS

  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
665.14 In reply to 665.13 
In that case it doesn't need a final semi-colon because the last part of the script is a "for" loop. A for loop normally looks like this when you have it spaced out more naturally:

for ( var i = 0; i < 10; ++i )
{
do_something();
do_something_else();
}

It doesn't normally need an extra semi-colon after the final closing } brace of the for loop. But it won't do any harm if you put one in, it is just the equivalent of an empty statement after the for loop.

Some other constructs do expect semi-colons, like at the end of function calls or variable assignments (like you can see _inside_ the for loop above). Actually some of those are also optional in the JavaScript language in certain circumstances, but it is best to put those ones in.

- 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:  3dvisuals dude (ODWYERVISUALS)
665.15 In reply to 665.14 
Thanks Michael,

just thought I'd ask to be on the safe side!

I appreciate the thorough response too... I'm playing a tad with javascript in trueSpace now and some day when I grasp it all I'm sure the routines will be interchangeable to a large extent with slight modifications of course.

I really love the way you added easy script insertion capabilities into this last Beta by the way, thanks for that too!

- 3dvisuals dude
  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
665.16 In reply to 665.15 
> I really love the way you added easy script insertion capabilities
> into this last Beta by the way, thanks for that too!

You're welcome! I was getting tired of explaining about how to edit the moi.ini file manually... :)

- 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-5  6-16