소스 검색

syncs VertexNormalHelper when geometry changed (#28613)

ycw 1 년 전
부모
커밋
acf4cd185b
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      editor/js/Sidebar.Geometry.js

+ 11 - 0
editor/js/Sidebar.Geometry.js

@@ -296,6 +296,17 @@ function SidebarGeometry( editor ) {
 
 			geometryUserData.setValue( JSON.stringify( geometry.userData, null, '  ' ) );
 
+			//
+
+			const helper = editor.helpers[ object.id ];
+
+			if ( helper !== undefined ) {
+
+				editor.removeHelper( object );
+				editor.addHelper( object, new VertexNormalsHelper( object ) );
+
+			}
+
 		} else {
 
 			container.setDisplay( 'none' );