Small Feature Wish
 1-14  15-21

Previous
Next
 From:  Kiril
3756.15 In reply to 3756.14 
Hi Pilou,

It suffices to follow the normal method of adding a shortcut, and adding:

script:var crvs = moi.geometryDatabase.getObjects().getCurves(); for ( var i = 0; i < crvs.length; ++i ) { var crv = crvs.item(i); if ( crv.getSubObjects().length> 1 ) crv.selected = true; }

With all credit for the script given to Michael, ofcourse.
  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)
3756.16 In reply to 3756.15 
Thx, it was for the end of the line that I had some doubt :)
---
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:  Frenchy Pilou (PILOU)
3756.17 In reply to 3756.16 
there is not something false in the script?
Seems it keep in memory previous joined lines!

If I launch the script whith the yellow curves selected, the other curve becomes yellow too !!!
Is that normal?

EDITED: 15 Sep 2010 by PILOU

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:  Kiril
3756.18 In reply to 3756.17 
I've made a small change to the script that will clear all previous selection and then proceed to look for only compound curves:
code:
moi.geometryDatabase.deselectAll(); var crvs = moi.geometryDatabase.getObjects().getCurves(); for ( var i = 0; i < crvs.length; ++i ) { var crv = crvs.item(i); if ( crv.getSubObjects().length> 1 ) crv.selected = true; }

This is actually a good idea, since it will avoid mistaken identification.

Confusion may also arise after having used the "Rebuild" function with the "Refit" option. In this mode only curviture continuous stretches of a compound curve are rebuilt into a single entity; this results in the possibility of a compound curve even after a "rebuild". To avoid this use the "# points" option("keep corners" turned off); since this mode is not adaptive you will need many points - by running the rebuild function a second time, with the "Refit" option, this problem can be avoided.

If your asking why "previous joined lines" are selected: this is the purpose of the script :) - the idea is to select these charlatans :) and 'rebuild' them, this way avoiding spikes/kinks while editing.
  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)
3756.19 In reply to 3756.18 
<this way avoiding spikes/kinks while editing.
I had well understood :) but not for the curves who are some kilometers away :)
  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
3756.20 In reply to 3756.18 
Hi Kiril, also if you want more info about scripting, one way is to look at existing scripts but also see here:
http://moi3d.com/wiki/Scripting

for some additional information. See David's page for some documentation on what properties and methods are available on each MoI class, and also you can get the moi.idl file there which contains a all the stuff that is accessible to scripting in it.

- 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:  Kiril
3756.21 In reply to 3756.20 
Thanks Micheal, I'm quite content with the level of customization I can achieve now - I shall wait for something akin to JQuery for MoI :) before I invest much more time into scripting.

Cheers,

Kiril
  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-21