Exploration of Scripting in MOI
All  1-6  7-8

Previous
Next
 From:  3d2cnc
9490.7 In reply to 9490.6 
So far coming out of this endeavor to create this proposed script is...

Combining the freehand from two axis planes, loft and use this

well, create a terrain map on an object?
Attachments:

Image Attachments:
Size: 356.2 KB, Downloaded: 28 times, Dimensions: 806x709px
Size: 428.6 KB, Downloaded: 19 times, Dimensions: 859x745px
  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
9490.8 In reply to 9490.6 
Hi Dave, that's great that you're making good progress!

So for include edges the way to figure out how to replicate that in a script is to first look at the Silhouette.htm file and find the "Include edges" button which is this:

code:
<moi:CheckButton id="includeedges"><moi:Text textid="Include edges checkbox"/></moi:CheckButton>


The key thing that you're looking for is the id value. So then go to the Silhouette command script file (Silhouette.js) and search for includeedges, which is this:

code:
ui.bindUIToInput( 'includeedges', 'value', factory.getInput(4) );


So what the regular command is doing there is making a link between the includeedges checkbox UI controls's value property and the silhouette factory's input with index 4.

In your script you'd want to do something like factory.setInput( 4, true ); to turn it on.

Some UI will set up a binding like that and others will look for a UI event of that id value being triggered if they need to do other stuff in addition to just setting a value on the factory.

Hope that helps!

- 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-6  7-8