File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,7 @@ export interface IBlueprintFormatJSON {
149149export function fixCubeRotation ( cube : Cube ) {
150150 const maxRotation = Math . max ( ...cube . rotation )
151151 const minRotation = Math . min ( ...cube . rotation )
152- if ( maxRotation <= 45 && minRotation >= - 45 ) {
153- console . log ( 'Cube rotation is fine, no need to fix' , cube . rotation )
154- return
155- }
152+ if ( maxRotation <= 45 && minRotation >= - 45 ) return
156153 // Use the rotation with the largest absolute value
157154 const rotation = Math . abs ( maxRotation ) >= Math . abs ( minRotation ) ? maxRotation : minRotation
158155 const axis = cube . rotation . indexOf ( rotation )
@@ -173,13 +170,19 @@ export function convertToBlueprint() {
173170 group . createUniqueName ( Group . all . filter ( g => g !== group ) )
174171 group . sanitizeName ( )
175172 }
173+
176174 for ( const animation of Blockbench . Animation . all ) {
177175 animation . createUniqueName ( Blockbench . Animation . all . filter ( a => a !== animation ) )
178176 animation . name = sanitizeStorageKey ( animation . name )
179177 }
178+
180179 for ( const cube of Cube . all ) {
181180 cube . setUVMode ( false )
181+
182+ fixCubeRotation ( cube )
182183 }
184+
185+ Canvas . updateAll ( )
183186}
184187
185188export function getDefaultProjectSettings ( ) {
You can’t perform that action at this time.
0 commit comments