Bläddra i källkod

Editor: Fix clone of skinned meshes. (#25945)

Michael Herzog 2 år sedan
förälder
incheckning
ba1f08c49b
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      editor/js/Menubar.Edit.js

+ 2 - 1
editor/js/Menubar.Edit.js

@@ -5,6 +5,7 @@ import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
 import { AddObjectCommand } from './commands/AddObjectCommand.js';
 import { RemoveObjectCommand } from './commands/RemoveObjectCommand.js';
 import { SetPositionCommand } from './commands/SetPositionCommand.js';
+import { clone } from '../../examples/jsm/utils/SkeletonUtils.js';
 
 function MenubarEdit( editor ) {
 
@@ -123,7 +124,7 @@ function MenubarEdit( editor ) {
 
 		if ( object === null || object.parent === null ) return; // avoid cloning the camera or scene
 
-		object = object.clone();
+		object = clone( object );
 
 		editor.execute( new AddObjectCommand( editor, object ) );