Browse Source

syncs VertexNormalHelper when geometry changed (#28613)

ycw 1 năm trước cách đây
mục cha
commit
acf4cd185b
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  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, '  ' ) );
 			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 {
 		} else {
 
 
 			container.setDisplay( 'none' );
 			container.setDisplay( 'none' );