@@ -7,7 +7,7 @@ Plugin.register('clone_brush', {
77 author : 'JannisX11' ,
88 icon : 'account_balance_wallet' ,
99 description : 'Clone Cubes' ,
10- version : '1.1.0 ' ,
10+ version : '1.1.1 ' ,
1111 variant : 'both' ,
1212 onload ( ) {
1313 clone_brush_tool = new Tool ( {
@@ -25,8 +25,8 @@ Plugin.register('clone_brush', {
2525 } ,
2626 onCanvasClick : function ( data ) {
2727 if ( data . event . shiftKey === false ) {
28- if ( brush_template == 'select' ) {
29- brush_template = data . cube
28+ if ( brush_template == 'select' && data . element instanceof Cube ) {
29+ brush_template = data . element
3030 $ ( '#preview' ) . css ( 'cursor' , 'url(assets/brush.png), auto' )
3131 } else if ( brush_template instanceof Cube ) {
3232
@@ -43,7 +43,7 @@ Plugin.register('clone_brush', {
4343 if ( brush_template && brush_template . type === 'cube' ) {
4444 sizes = brush_template . size ( )
4545 }
46- switch ( main_uv . face ) {
46+ switch ( data . face ) {
4747 case 'north' : from [ 2 ] -= sizes [ 2 ] + Cube . selected [ 0 ] . inflate + brush_template . inflate ; break ;
4848 case 'south' : from [ 2 ] += sizes [ 2 ] + Cube . selected [ 0 ] . inflate + brush_template . inflate ; break ;
4949 case 'west' : from [ 0 ] -= sizes [ 0 ] + Cube . selected [ 0 ] . inflate + brush_template . inflate ; break ;
0 commit comments