.
ops, sorry few copy errors : try this code
@m=Sketchup.active_model;@s=@m.selection;@d=@m.definitions;@s[0].definition.behavior.no_scale_mask = 4 ; Sketchup.send_action('selectScaleTool;')you can find this in the sketchup API:
Link Preview Image Class: Sketchup::BehaviorThe Behavior class is used to control the
faviconSketchUp Ruby API Documentation (ruby.sketchup.com)
i don't find it very clear, but more or less: you have 7 numbers (bits). each representing a pair of handles. when the bit is 0, the particular handle pair is visible. when the bit is 1 the handle pair is hidden.
@unknownuser said:
Bit0: disable scale along red (X),
Bit1: disable scale along green (Y),
Bit2: disable scale along blue (Z),
Bit3: disable scale in red/blue plane (X+Z),
Bit4: disable scale in green/blue plane (Y+Z),
Bit5: disable scale in red/green plane (X+Y),
Bit6: disable scale uniform (from corners) (XYZ).
take 1111000 as an example. the bits from left to right are bit6, bit5, bit4, bit3, bit2, bit1, bit0. in this example, bits 6, 5, 4,and 3 are all hidden. the only visible ones are the blue, green and red: bits 2, 1 and 0.
this 'combination' is given in the form of an integer. if you take the example above, the 1111000 number is the 'binary' conversion of 120.
here's a place where you can do a conversion:
http://acc6.its.brooklyn.cuny.edu/%7Egurwitz/core5/nav2tool.html
so, you can decide your combination of ones and zeroes (your seven bits)
use the converter to get the corresponding integer
use the ruby code above to test the integer.
hope it makes sense
unfortunately you cannot activate it permanently - you can use the script from this thread (and change the handle numbers you prefer). and yes, there is a lot of 'strange' about sketchup - but we do love it anyway! π
.