Reset/zero transformation, scale and rotation
-
Is there a plugin to reset the transformation, scale and rotation of a component?
-
Right click menu?
Reset Scale and Reset Skew.
Rotation is harder but if you use the move tool without selecting the component you find the red dot dongles and you can rotate to 0.
-
@pixero said:
Is there a plugin to reset the transformation, scale and rotation of a component?
Maybe this
unless file_loaded?((__FILE__)) UI.add_context_menu_handler do |menu| sel = Sketchup.active_model.selection if sel.first.is_a? Sketchup;;ComponentInstance menu.add_separator menu.add_item('Reset Scale Rotation') { mod = Sketchup.active_model ent = mod.entities mod.start_operation 'Reset Scale Rotation' cmp=sel.first;org=cmp.transformation.origin t=cmp.transformation.to_a t[0]=1;t[1]=0;t[2]=0;#t[3]=nil t[4]=0;t[5]=1;t[6]=0;#t[7]=nil t[8]=0;t[9]=0;t[10]=1;#t[11]=nil t[12]=org.x;t[13]=org.y;t[14]=org.z;#t[15]=nil cmp.transformation=cmp.transformation.set! t mod.commit_operation } end end file_loaded((__FILE__)) end
-
Thanks, will try this.
-
Another option would be to set the Transformation to IDENTITY.
instance.transformation = IDENTITY
This would also move the instance to the Origin, but it's easy to move it back if that's what you need.
-
Alternatively, could you perhaps reset the object's transformation back to the inverse of what it was ?
obj.transform!(obj.transformation.inverse)
-
Alternatively, you can delete that component instance, and create a new one with the components window. It will have an identity rotation/scale, just place it on the origin.
Advertisement