Color Gradient script?
 1-10  …  51-70  71-90  91-92

Previous
Next
 From:  bemfarmer
9676.91 In reply to 9676.89 
Both shortcuts work!

A minor observation:

For customUI shortcuts "gearpair" icon menu, add the ! i.e. /*!

Also, the second comment /*Create if not found*/ causes the customUI gearpair icon to display all of the code up to the last */, which is a long line of text in the menu.
so I removed the second comment /*Create if not found*/, in the installed shortcut.

- Brian
  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:  GonzoRus
9676.92 
Script for assigning "Magenta" color to selected faces.

code:
/* Assign selected faces to style = Magenta */ var starting_selection = moi.geometryDatabase.getSelectedObjects(); var faces = starting_selection.getFaces(); moi.geometryDatabase.deselectAll(); faces.setProperty( 'selected', true ); var style = moi.geometryDatabase.findStyle( 'Magenta', false /*Create if not found*/ ); if ( style ) { moi.ui.propertiesPanel.editStyleIndex( style.index ); } moi.geometryDatabase.deselectAll(); starting_selection.setProperty( 'selected', true );


"Magenta" can be changed to any color from the existing styles.
  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-10  …  31-50  51-70  71-90  91-92