Преглед на файлове

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' );