From 1e746c22fd2e7dccc80b6def501bd507e38f02e7 Mon Sep 17 00:00:00 2001 From: Temdog007 Date: Wed, 20 Feb 2019 17:03:29 -0700 Subject: [PATCH] Only display tenions of catmullrom is selected --- editor/js/Sidebar.Geometry.TubeGeometry.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/js/Sidebar.Geometry.TubeGeometry.js b/editor/js/Sidebar.Geometry.TubeGeometry.js index e9d2ff2702..007f18e670 100644 --- a/editor/js/Sidebar.Geometry.TubeGeometry.js +++ b/editor/js/Sidebar.Geometry.TubeGeometry.js @@ -107,7 +107,7 @@ Sidebar.Geometry.TubeGeometry = function ( editor, object ) { // tension - var tensionRow = new UI.Row(); + var tensionRow = new UI.Row().setDisplay( curveType.getValue() == 'catmullrom' ? '' : 'none' ); var tension = new UI.Number( parameters.path.tension ).setStep( 0.01 ).onChange( update ); tensionRow.add( new UI.Text( strings.getKey( 'sidebar/geometry/tube_geometry/tension' ) ).setWidth( '90px' ), tension ); @@ -133,6 +133,8 @@ Sidebar.Geometry.TubeGeometry = function ( editor, object ) { } + tensionRow.setDisplay( curveType.getValue() == 'catmullrom' ? '' : 'none' ); + editor.execute( new SetGeometryCommand( object, new THREE[ geometry.type ]( new THREE.CatmullRomCurve3( points, closed.getValue(), curveType.getValue(), tension.getValue() ), tubularSegments.getValue(), -- GitLab