stpete2 commited on
Commit
ef646a6
·
verified ·
1 Parent(s): 1f70499

Upload preprocess_manual.js

Browse files
Files changed (1) hide show
  1. preprocess_manual.js +13 -3
preprocess_manual.js CHANGED
@@ -1473,6 +1473,12 @@ function setupBoneAssignment(ui, scene, camera, renderer, gvrm, character, filte
1473
  // ========================================
1474
  // Assign Splats in Sphere Function
1475
  // ========================================
 
 
 
 
 
 
1476
  function assignSplatsInSphere(center, radius, target, isPaintMode = false) {
1477
  console.log(`[setupBoneAssignment] Assigning splats around center to ${target}`);
1478
 
@@ -1561,7 +1567,10 @@ function setupBoneAssignment(ui, scene, camera, renderer, gvrm, character, filte
1561
  if (!assignmentData.boneAssignments[displayName]) {
1562
  assignmentData.boneAssignments[displayName] = [];
1563
  }
1564
- assignmentData.boneAssignments[displayName].push(...newlyAssigned);
 
 
 
1565
 
1566
  // Only add to history in non-paint mode
1567
  if (!isPaintMode) {
@@ -1573,7 +1582,6 @@ function setupBoneAssignment(ui, scene, camera, renderer, gvrm, character, filte
1573
  }
1574
 
1575
  filteredGs.splatMesh.updateDataTexturesFromBaseData(0, filteredGs.splatCount - 1);
1576
- //renderer.render(scene, camera);
1577
 
1578
  updateStats();
1579
 
@@ -1584,7 +1592,9 @@ function setupBoneAssignment(ui, scene, camera, renderer, gvrm, character, filte
1584
  console.log('[setupBoneAssignment] No splats found in selection');
1585
  }
1586
  }
1587
-
 
 
1588
  // ========================================
1589
  // Erase Splats in Sphere Function
1590
  // ========================================
 
1473
  // ========================================
1474
  // Assign Splats in Sphere Function
1475
  // ========================================
1476
+ ///////////////////////////12/13 19:14
1477
+ // ========================================
1478
+ // 完全な修正版 assignSplatsInSphere 関数
1479
+ // Line 1477 から Line 1590 までを置き換え
1480
+ // ========================================
1481
+
1482
  function assignSplatsInSphere(center, radius, target, isPaintMode = false) {
1483
  console.log(`[setupBoneAssignment] Assigning splats around center to ${target}`);
1484
 
 
1567
  if (!assignmentData.boneAssignments[displayName]) {
1568
  assignmentData.boneAssignments[displayName] = [];
1569
  }
1570
+
1571
+ // ⭐⭐⭐ CRITICAL FIX: concat を使用してスタックオーバーフローを回避 ⭐⭐⭐
1572
+ assignmentData.boneAssignments[displayName] =
1573
+ assignmentData.boneAssignments[displayName].concat(newlyAssigned);
1574
 
1575
  // Only add to history in non-paint mode
1576
  if (!isPaintMode) {
 
1582
  }
1583
 
1584
  filteredGs.splatMesh.updateDataTexturesFromBaseData(0, filteredGs.splatCount - 1);
 
1585
 
1586
  updateStats();
1587
 
 
1592
  console.log('[setupBoneAssignment] No splats found in selection');
1593
  }
1594
  }
1595
+
1596
+
1597
+
1598
  // ========================================
1599
  // Erase Splats in Sphere Function
1600
  // ========================================