Both sides /cap ends hotkey for offset ?

Next
 From:  K3nny
9832.1 
Hi guys

I have done a search all over this site for a script that will toggle the both sides option for offset curve and havent found one.
I did manage to find one for extrude tho which is nice.
Is it also possible to have a script to bind to a hotkey that works for both offset and extrude?
Also an option for cap end would be great too
Cheers

K3nny
  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
9832.2 In reply to 9832.1 
Hi K3nny, so there are a couple different ways.

You can set up a shortcut key that will always run offset with both sides off like this (in MoI v4):

offset curvebothsides=false

Or always on with this:

offset curvebothsides=false

Or here is one that will toggle it while you are in the command as if you clicked it. It should work for Offset, Extrude and also the Line command:

script: /* Toggle both sides for offset or extrude */ if ( moi.command.currentCommandName ) { if ( moi.ui.commandUI.curvebothsides ) moi.ui.commandUI.curvebothsides.click(); if ( moi.ui.commandUI.bothsides ) moi.ui.commandUI.bothsides.click(); }

A toggle for cap ends would be like this:

script: /* Toggle cap ends for offset or extrude */ if ( moi.command.currentCommandName ) { if ( moi.ui.commandUI.curvecapends ) moi.ui.commandUI.curvecapends.click(); if ( moi.ui.commandUI.capends ) moi.ui.commandUI.capends.click(); }

- 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:  K3nny
9832.3 In reply to 9832.2 
Wow that was quick.

Thanks for the help Michael!

Kenny
  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:  K3nny
9832.4 In reply to 9832.3 
Are there resources for learning how to script for Moi around ?
I can code in Python and Javascript and would like to make some tools.

Thanks
  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)
9832.5 In reply to 9832.2 
cool but list of shortCuts maybe extends too! :)
  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
9832.6 In reply to 9832.4 
Hi K3nny,

re:
> Are there resources for learning how to script for Moi around ?

Not really, it's just not an area that I have been able to dedicate much time to as of yet. There is some info here though:
http://moi3d.com/wiki/Scripting

- 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