Add StkRigAdapter for runtime skeleton fitting and shape mounting
- Implemented StkRigAdapter class to adapt a master rig to a loaded .stk dictionary. - Added methods for fitting bone lengths, recalibrating IK targets, and mounting vector shapes. - Defined constants for default proportions and bone paths. - Included error handling for missing nodes and invalid data structures.
This commit is contained in:
+114
-57
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.3",
|
||||
"version": "1.4",
|
||||
"stickman_name": "",
|
||||
"part_order": [
|
||||
"torso",
|
||||
@@ -13,6 +13,13 @@
|
||||
"right_upper_leg",
|
||||
"right_lower_leg"
|
||||
],
|
||||
"proportions": {
|
||||
"upper_arm_length": 168.0,
|
||||
"lower_arm_length": 200.0,
|
||||
"upper_leg_length": 200.0,
|
||||
"lower_leg_length": 200.0,
|
||||
"torso_length": 391.5
|
||||
},
|
||||
"body_parts": {
|
||||
"head": {
|
||||
"shapes": [
|
||||
@@ -281,14 +288,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 490.884521484375,
|
||||
"y": 133.55908203125
|
||||
"x": 473.278625488281,
|
||||
"y": 381.460693359375
|
||||
},
|
||||
"rotation": -360.0,
|
||||
"scale": {
|
||||
"x": 1.47983860969543,
|
||||
"y": 1.47983860969543
|
||||
}
|
||||
"x": 1.98590219020844,
|
||||
"y": 1.98590219020844
|
||||
},
|
||||
"pivot": {
|
||||
"x": 504.221405029297,
|
||||
"y": 178.031181335449
|
||||
},
|
||||
"length": 110.269149780273
|
||||
},
|
||||
"torso": {
|
||||
"shapes": [
|
||||
@@ -323,14 +335,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 674.5,
|
||||
"y": 221.500030517578
|
||||
"x": 649.5,
|
||||
"y": 599.0
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"scale": {
|
||||
"x": 0.857142865657806,
|
||||
"y": 1.81818187236786
|
||||
}
|
||||
"y": 3.9898989200592
|
||||
},
|
||||
"pivot": {
|
||||
"x": 300.5,
|
||||
"y": 258.5
|
||||
},
|
||||
"length": 99.0
|
||||
},
|
||||
"left_upper_arm": {
|
||||
"shapes": [
|
||||
@@ -365,14 +382,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 434.0,
|
||||
"y": 247.0
|
||||
"x": 371.5,
|
||||
"y": 609.5
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"scale": {
|
||||
"x": 1.0,
|
||||
"y": 1.0
|
||||
}
|
||||
"x": 1.6074765920639,
|
||||
"y": 0.782608687877655
|
||||
},
|
||||
"pivot": {
|
||||
"x": 489.5,
|
||||
"y": 169.5
|
||||
},
|
||||
"length": 107.0
|
||||
},
|
||||
"left_lower_arm": {
|
||||
"shapes": [
|
||||
@@ -407,14 +429,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 340.571166992188,
|
||||
"y": 282.654418945313
|
||||
"x": 305.000091552734,
|
||||
"y": 534.999938964844
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"rotation": 90.0,
|
||||
"scale": {
|
||||
"x": 0.988918423652649,
|
||||
"y": 1.38907158374786
|
||||
}
|
||||
"x": 1.88584887981415,
|
||||
"y": 1.25166654586792
|
||||
},
|
||||
"pivot": {
|
||||
"x": 479.999969482422,
|
||||
"y": 135.0
|
||||
},
|
||||
"length": 106.053039550781
|
||||
},
|
||||
"right_upper_arm": {
|
||||
"shapes": [
|
||||
@@ -449,14 +476,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 714.5,
|
||||
"y": 258.5
|
||||
"x": 711.0,
|
||||
"y": 622.0
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"rotation": -180.0,
|
||||
"scale": {
|
||||
"x": 1.0,
|
||||
"y": 1.0
|
||||
}
|
||||
"x": 1.6822429895401,
|
||||
"y": 0.869565904140472
|
||||
},
|
||||
"pivot": {
|
||||
"x": 329.0,
|
||||
"y": 158.0
|
||||
},
|
||||
"length": 107.0
|
||||
},
|
||||
"right_lower_arm": {
|
||||
"shapes": [
|
||||
@@ -491,14 +523,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 720.103637695313,
|
||||
"y": 271.813385009766
|
||||
"x": 707.087768554688,
|
||||
"y": 524.3349609375
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"rotation": 90.0,
|
||||
"scale": {
|
||||
"x": 0.999799728393555,
|
||||
"y": 1.31353163719177
|
||||
}
|
||||
"x": 1.9427238702774,
|
||||
"y": 1.25166583061218
|
||||
},
|
||||
"pivot": {
|
||||
"x": 412.91227722168,
|
||||
"y": 143.680892944336
|
||||
},
|
||||
"length": 106.053070068359
|
||||
},
|
||||
"left_upper_leg": {
|
||||
"shapes": [
|
||||
@@ -533,14 +570,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 394.1083984375,
|
||||
"y": 427.365753173828
|
||||
"x": 366.208190917969,
|
||||
"y": 959.632446289063
|
||||
},
|
||||
"rotation": -45.0,
|
||||
"rotation": -60.0,
|
||||
"scale": {
|
||||
"x": 1.0,
|
||||
"y": 1.0
|
||||
}
|
||||
"x": 2.07383060455322,
|
||||
"y": 0.853155195713043
|
||||
},
|
||||
"pivot": {
|
||||
"x": 536.5,
|
||||
"y": 154.0
|
||||
},
|
||||
"length": 28.0
|
||||
},
|
||||
"left_lower_leg": {
|
||||
"shapes": [
|
||||
@@ -575,14 +617,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 386.0,
|
||||
"y": 479.0
|
||||
"x": 345.5,
|
||||
"y": 1129.0
|
||||
},
|
||||
"rotation": 90.0,
|
||||
"scale": {
|
||||
"x": 1.0,
|
||||
"y": 1.0
|
||||
}
|
||||
"x": 2.09999990463257,
|
||||
"y": 0.961538791656494
|
||||
},
|
||||
"pivot": {
|
||||
"x": 512.0,
|
||||
"y": 171.0
|
||||
},
|
||||
"length": 26.0
|
||||
},
|
||||
"right_upper_leg": {
|
||||
"shapes": [
|
||||
@@ -617,14 +664,19 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 555.037841796875,
|
||||
"y": 420.346771240234
|
||||
"x": 538.218627929688,
|
||||
"y": 957.340209960938
|
||||
},
|
||||
"rotation": 45.0,
|
||||
"rotation": 60.0,
|
||||
"scale": {
|
||||
"x": 0.977314233779907,
|
||||
"y": 0.923182904720306
|
||||
}
|
||||
"x": 2.10031747817993,
|
||||
"y": 0.757614314556122
|
||||
},
|
||||
"pivot": {
|
||||
"x": 464.0,
|
||||
"y": 163.0
|
||||
},
|
||||
"length": 28.0
|
||||
},
|
||||
"right_lower_leg": {
|
||||
"shapes": [
|
||||
@@ -659,18 +711,23 @@
|
||||
}
|
||||
],
|
||||
"position": {
|
||||
"x": 628.999938964844,
|
||||
"y": 487.000061035156
|
||||
"x": 628.5,
|
||||
"y": 1139.5
|
||||
},
|
||||
"rotation": 90.0,
|
||||
"scale": {
|
||||
"x": 1.0,
|
||||
"y": 1.0
|
||||
}
|
||||
"x": 2.05000042915344,
|
||||
"y": 0.961539387702942
|
||||
},
|
||||
"pivot": {
|
||||
"x": 419.0,
|
||||
"y": 163.0
|
||||
},
|
||||
"length": 26.0
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"created_at": "2026-08-07T23:23:34",
|
||||
"modified_at": "2026-08-07T23:23:34"
|
||||
"created_at": "2026-08-18T00:05:43",
|
||||
"modified_at": "2026-08-18T00:05:43"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user