mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[ue4] Exposed more functionality in blueprints. Added more assets and test blueprints to excercise functionality
This commit is contained in:
parent
064303c77e
commit
724fdf13c0
BIN
spine-ue4/Content/Goblins/Goblin_Blueprint.uasset
Normal file
BIN
spine-ue4/Content/Goblins/Goblin_Blueprint.uasset
Normal file
Binary file not shown.
BIN
spine-ue4/Content/Goblins/Textures/goblins.uasset
Normal file
BIN
spine-ue4/Content/Goblins/Textures/goblins.uasset
Normal file
Binary file not shown.
BIN
spine-ue4/Content/Goblins/goblins-atlas.uasset
Normal file
BIN
spine-ue4/Content/Goblins/goblins-atlas.uasset
Normal file
Binary file not shown.
BIN
spine-ue4/Content/Goblins/goblins-data.uasset
Normal file
BIN
spine-ue4/Content/Goblins/goblins-data.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,279 +0,0 @@
|
|||||||
|
|
||||||
raptor.png
|
|
||||||
size: 1024,1024
|
|
||||||
format: RGBA8888
|
|
||||||
filter: Linear,Linear
|
|
||||||
repeat: none
|
|
||||||
back_arm
|
|
||||||
rotate: true
|
|
||||||
xy: 140, 191
|
|
||||||
size: 46, 29
|
|
||||||
orig: 46, 29
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
back_bracer
|
|
||||||
rotate: true
|
|
||||||
xy: 167, 317
|
|
||||||
size: 39, 28
|
|
||||||
orig: 39, 28
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
back_hand
|
|
||||||
rotate: false
|
|
||||||
xy: 167, 358
|
|
||||||
size: 36, 34
|
|
||||||
orig: 36, 34
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
back_knee
|
|
||||||
rotate: false
|
|
||||||
xy: 299, 478
|
|
||||||
size: 49, 67
|
|
||||||
orig: 49, 67
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
back_thigh
|
|
||||||
rotate: true
|
|
||||||
xy: 167, 437
|
|
||||||
size: 39, 24
|
|
||||||
orig: 39, 24
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
eyes_closed
|
|
||||||
rotate: true
|
|
||||||
xy: 2, 2
|
|
||||||
size: 47, 45
|
|
||||||
orig: 47, 45
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
eyes_open
|
|
||||||
rotate: true
|
|
||||||
xy: 49, 2
|
|
||||||
size: 47, 45
|
|
||||||
orig: 47, 45
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
eyes_surprised
|
|
||||||
rotate: true
|
|
||||||
xy: 96, 2
|
|
||||||
size: 47, 45
|
|
||||||
orig: 47, 45
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_arm
|
|
||||||
rotate: false
|
|
||||||
xy: 419, 544
|
|
||||||
size: 48, 30
|
|
||||||
orig: 48, 30
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_bracer
|
|
||||||
rotate: false
|
|
||||||
xy: 880, 695
|
|
||||||
size: 41, 29
|
|
||||||
orig: 41, 29
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_hand
|
|
||||||
rotate: true
|
|
||||||
xy: 167, 394
|
|
||||||
size: 41, 38
|
|
||||||
orig: 41, 38
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_open_hand
|
|
||||||
rotate: false
|
|
||||||
xy: 880, 726
|
|
||||||
size: 43, 44
|
|
||||||
orig: 43, 44
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_thigh
|
|
||||||
rotate: false
|
|
||||||
xy: 360, 545
|
|
||||||
size: 57, 29
|
|
||||||
orig: 57, 29
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
gun
|
|
||||||
rotate: false
|
|
||||||
xy: 785, 774
|
|
||||||
size: 107, 103
|
|
||||||
orig: 107, 103
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
gun_nohand
|
|
||||||
rotate: false
|
|
||||||
xy: 614, 703
|
|
||||||
size: 105, 102
|
|
||||||
orig: 105, 102
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
head
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 137
|
|
||||||
size: 136, 149
|
|
||||||
orig: 136, 149
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
lower_leg
|
|
||||||
rotate: true
|
|
||||||
xy: 780, 699
|
|
||||||
size: 73, 98
|
|
||||||
orig: 73, 98
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
mouth_grind
|
|
||||||
rotate: false
|
|
||||||
xy: 469, 544
|
|
||||||
size: 47, 30
|
|
||||||
orig: 47, 30
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
mouth_oooo
|
|
||||||
rotate: true
|
|
||||||
xy: 894, 772
|
|
||||||
size: 105, 30
|
|
||||||
orig: 105, 30
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
mouth_smile
|
|
||||||
rotate: true
|
|
||||||
xy: 140, 239
|
|
||||||
size: 47, 30
|
|
||||||
orig: 47, 30
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
neck
|
|
||||||
rotate: true
|
|
||||||
xy: 538, 577
|
|
||||||
size: 18, 21
|
|
||||||
orig: 18, 21
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_arm_back
|
|
||||||
rotate: false
|
|
||||||
xy: 940, 936
|
|
||||||
size: 82, 86
|
|
||||||
orig: 82, 86
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_body
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 737
|
|
||||||
size: 610, 285
|
|
||||||
orig: 610, 285
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_front_arm
|
|
||||||
rotate: true
|
|
||||||
xy: 195, 464
|
|
||||||
size: 81, 102
|
|
||||||
orig: 81, 102
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_front_leg
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 478
|
|
||||||
size: 191, 257
|
|
||||||
orig: 191, 257
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_hindleg_back
|
|
||||||
rotate: false
|
|
||||||
xy: 614, 807
|
|
||||||
size: 169, 215
|
|
||||||
orig: 169, 215
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_horn
|
|
||||||
rotate: false
|
|
||||||
xy: 360, 655
|
|
||||||
size: 182, 80
|
|
||||||
orig: 182, 80
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_horn_back
|
|
||||||
rotate: false
|
|
||||||
xy: 360, 576
|
|
||||||
size: 176, 77
|
|
||||||
orig: 176, 77
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_jaw
|
|
||||||
rotate: false
|
|
||||||
xy: 785, 879
|
|
||||||
size: 153, 143
|
|
||||||
orig: 153, 143
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_saddle_noshadow
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 288
|
|
||||||
size: 163, 188
|
|
||||||
orig: 163, 188
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_saddle_strap_front
|
|
||||||
rotate: false
|
|
||||||
xy: 721, 710
|
|
||||||
size: 57, 95
|
|
||||||
orig: 57, 95
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_saddle_strap_rear
|
|
||||||
rotate: true
|
|
||||||
xy: 940, 880
|
|
||||||
size: 54, 74
|
|
||||||
orig: 54, 74
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_saddle_w_shadow
|
|
||||||
rotate: false
|
|
||||||
xy: 195, 547
|
|
||||||
size: 163, 188
|
|
||||||
orig: 163, 188
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
raptor_tongue
|
|
||||||
rotate: true
|
|
||||||
xy: 544, 649
|
|
||||||
size: 86, 64
|
|
||||||
orig: 86, 64
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
stirrup_back
|
|
||||||
rotate: true
|
|
||||||
xy: 140, 145
|
|
||||||
size: 44, 35
|
|
||||||
orig: 44, 35
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
stirrup_front
|
|
||||||
rotate: false
|
|
||||||
xy: 538, 597
|
|
||||||
size: 45, 50
|
|
||||||
orig: 45, 50
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
stirrup_strap
|
|
||||||
rotate: false
|
|
||||||
xy: 350, 497
|
|
||||||
size: 49, 46
|
|
||||||
orig: 49, 46
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
torso
|
|
||||||
rotate: true
|
|
||||||
xy: 610, 647
|
|
||||||
size: 54, 91
|
|
||||||
orig: 54, 91
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
visor
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 51
|
|
||||||
size: 131, 84
|
|
||||||
orig: 131, 84
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 495 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
spine-ue4/Content/SpineBoy/Spineboy_Blueprint.uasset
Normal file
BIN
spine-ue4/Content/SpineBoy/Spineboy_Blueprint.uasset
Normal file
Binary file not shown.
Binary file not shown.
@ -1,216 +0,0 @@
|
|||||||
|
|
||||||
spineboy.png
|
|
||||||
size: 1024,1024
|
|
||||||
format: RGBA8888
|
|
||||||
filter: Linear,Linear
|
|
||||||
repeat: none
|
|
||||||
eye_indifferent
|
|
||||||
rotate: true
|
|
||||||
xy: 648, 629
|
|
||||||
size: 93, 89
|
|
||||||
orig: 93, 89
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
eye_surprised
|
|
||||||
rotate: true
|
|
||||||
xy: 233, 179
|
|
||||||
size: 93, 89
|
|
||||||
orig: 93, 89
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_bracer
|
|
||||||
rotate: false
|
|
||||||
xy: 245, 2
|
|
||||||
size: 58, 80
|
|
||||||
orig: 58, 80
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_fist_closed
|
|
||||||
rotate: false
|
|
||||||
xy: 168, 45
|
|
||||||
size: 75, 82
|
|
||||||
orig: 75, 82
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_fist_open
|
|
||||||
rotate: false
|
|
||||||
xy: 844, 646
|
|
||||||
size: 86, 87
|
|
||||||
orig: 86, 87
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_foot
|
|
||||||
rotate: true
|
|
||||||
xy: 310, 326
|
|
||||||
size: 126, 69
|
|
||||||
orig: 126, 69
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_foot_bend1
|
|
||||||
rotate: true
|
|
||||||
xy: 951, 894
|
|
||||||
size: 128, 70
|
|
||||||
orig: 128, 70
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_foot_bend2
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 33
|
|
||||||
size: 108, 93
|
|
||||||
orig: 108, 93
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_shin
|
|
||||||
rotate: true
|
|
||||||
xy: 739, 735
|
|
||||||
size: 82, 184
|
|
||||||
orig: 82, 184
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_thigh
|
|
||||||
rotate: false
|
|
||||||
xy: 381, 340
|
|
||||||
size: 48, 112
|
|
||||||
orig: 48, 112
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
front_upper_arm
|
|
||||||
rotate: false
|
|
||||||
xy: 112, 29
|
|
||||||
size: 54, 97
|
|
||||||
orig: 54, 97
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
goggles
|
|
||||||
rotate: false
|
|
||||||
xy: 156, 454
|
|
||||||
size: 261, 166
|
|
||||||
orig: 261, 166
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
gun
|
|
||||||
rotate: false
|
|
||||||
xy: 739, 819
|
|
||||||
size: 210, 203
|
|
||||||
orig: 210, 203
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
head
|
|
||||||
rotate: false
|
|
||||||
xy: 466, 724
|
|
||||||
size: 271, 298
|
|
||||||
orig: 271, 298
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
hoverboard_board
|
|
||||||
rotate: true
|
|
||||||
xy: 2, 128
|
|
||||||
size: 492, 152
|
|
||||||
orig: 492, 152
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
hoverboard_thruster
|
|
||||||
rotate: false
|
|
||||||
xy: 602, 558
|
|
||||||
size: 60, 64
|
|
||||||
orig: 60, 64
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
hoverglow_small
|
|
||||||
rotate: true
|
|
||||||
xy: 156, 178
|
|
||||||
size: 274, 75
|
|
||||||
orig: 274, 75
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
mouth_grind
|
|
||||||
rotate: true
|
|
||||||
xy: 951, 799
|
|
||||||
size: 93, 59
|
|
||||||
orig: 93, 59
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
mouth_oooo
|
|
||||||
rotate: true
|
|
||||||
xy: 245, 84
|
|
||||||
size: 93, 59
|
|
||||||
orig: 93, 59
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
mouth_smile
|
|
||||||
rotate: false
|
|
||||||
xy: 925, 738
|
|
||||||
size: 93, 59
|
|
||||||
orig: 93, 59
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
muzzle
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 622
|
|
||||||
size: 462, 400
|
|
||||||
orig: 462, 400
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
neck
|
|
||||||
rotate: false
|
|
||||||
xy: 168, 2
|
|
||||||
size: 36, 41
|
|
||||||
orig: 36, 41
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
rear_bracer
|
|
||||||
rotate: false
|
|
||||||
xy: 932, 664
|
|
||||||
size: 56, 72
|
|
||||||
orig: 56, 72
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
rear_foot
|
|
||||||
rotate: false
|
|
||||||
xy: 487, 562
|
|
||||||
size: 113, 60
|
|
||||||
orig: 113, 60
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
rear_foot_bend1
|
|
||||||
rotate: true
|
|
||||||
xy: 419, 503
|
|
||||||
size: 117, 66
|
|
||||||
orig: 117, 66
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
rear_foot_bend2
|
|
||||||
rotate: false
|
|
||||||
xy: 739, 650
|
|
||||||
size: 103, 83
|
|
||||||
orig: 103, 83
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
rear_shin
|
|
||||||
rotate: false
|
|
||||||
xy: 233, 274
|
|
||||||
size: 75, 178
|
|
||||||
orig: 75, 178
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
rear_thigh
|
|
||||||
rotate: true
|
|
||||||
xy: 487, 495
|
|
||||||
size: 65, 104
|
|
||||||
orig: 65, 104
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
rear_upper_arm
|
|
||||||
rotate: true
|
|
||||||
xy: 156, 129
|
|
||||||
size: 47, 87
|
|
||||||
orig: 47, 87
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
torso
|
|
||||||
rotate: true
|
|
||||||
xy: 466, 624
|
|
||||||
size: 98, 180
|
|
||||||
orig: 98, 180
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 678 KiB |
Binary file not shown.
Binary file not shown.
BIN
spine-ue4/Content/Tank/Tank_Blueprint.uasset
Normal file
BIN
spine-ue4/Content/Tank/Tank_Blueprint.uasset
Normal file
Binary file not shown.
BIN
spine-ue4/Content/Tank/Textures/tank.uasset
Normal file
BIN
spine-ue4/Content/Tank/Textures/tank.uasset
Normal file
Binary file not shown.
BIN
spine-ue4/Content/Tank/tank.uasset
Normal file
BIN
spine-ue4/Content/Tank/tank.uasset
Normal file
Binary file not shown.
@ -62,7 +62,9 @@ void USpineSkeletonAnimationComponent::TickComponent (float DeltaTime, ELevelTic
|
|||||||
if (state) {
|
if (state) {
|
||||||
spAnimationState_update(state, DeltaTime);
|
spAnimationState_update(state, DeltaTime);
|
||||||
spAnimationState_apply(state, skeleton);
|
spAnimationState_apply(state, skeleton);
|
||||||
|
BeforeUpdateWorldTransform.Broadcast(this);
|
||||||
spSkeleton_updateWorldTransform(skeleton);
|
spSkeleton_updateWorldTransform(skeleton);
|
||||||
|
AfterUpdateWorldTransform.Broadcast(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,6 +151,21 @@ UTrackEntry* USpineSkeletonAnimationComponent::AddEmptyAnimation (int trackIndex
|
|||||||
} else return NewObject<UTrackEntry>();
|
} else return NewObject<UTrackEntry>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UTrackEntry* USpineSkeletonAnimationComponent::GetCurrent (int trackIndex) {
|
||||||
|
CheckState();
|
||||||
|
if (state) {
|
||||||
|
spTrackEntry* entry = spAnimationState_getCurrent(state, trackIndex);
|
||||||
|
if (entry->rendererObject) {
|
||||||
|
return (UTrackEntry*)entry->rendererObject;
|
||||||
|
} else {
|
||||||
|
UTrackEntry* uEntry = NewObject<UTrackEntry>();
|
||||||
|
uEntry->SetTrackEntry(entry);
|
||||||
|
trackEntries.Add(uEntry);
|
||||||
|
return uEntry;
|
||||||
|
}
|
||||||
|
} else return NewObject<UTrackEntry>();
|
||||||
|
}
|
||||||
|
|
||||||
void USpineSkeletonAnimationComponent::ClearTracks () {
|
void USpineSkeletonAnimationComponent::ClearTracks () {
|
||||||
CheckState();
|
CheckState();
|
||||||
if (state) {
|
if (state) {
|
||||||
|
|||||||
@ -9,6 +9,41 @@ USpineSkeletonComponent::USpineSkeletonComponent () {
|
|||||||
bAutoActivate = true;
|
bAutoActivate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool USpineSkeletonComponent::SetSkin(const FString& skinName) {
|
||||||
|
CheckState();
|
||||||
|
if (skeleton) return spSkeleton_setSkinByName(skeleton, TCHAR_TO_UTF8(*skinName)) != 0;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool USpineSkeletonComponent::setAttachment (const FString& slotName, const FString& attachmentName) {
|
||||||
|
CheckState();
|
||||||
|
if (skeleton) return spSkeleton_setAttachment(skeleton, TCHAR_TO_UTF8(*slotName), TCHAR_TO_UTF8(*attachmentName));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
FTransform USpineSkeletonComponent::GetBoneWorldTransform (const FString& BoneName) {
|
||||||
|
return FTransform();
|
||||||
|
}
|
||||||
|
|
||||||
|
FTransform USpineSkeletonComponent::GetBoneLocalTransform (const FString& BoneName) {
|
||||||
|
return FTransform();
|
||||||
|
}
|
||||||
|
|
||||||
|
void USpineSkeletonComponent::SetToSetupPose () {
|
||||||
|
CheckState();
|
||||||
|
if (skeleton) spSkeleton_setToSetupPose(skeleton);
|
||||||
|
}
|
||||||
|
|
||||||
|
void USpineSkeletonComponent::SetBonesToSetupPose () {
|
||||||
|
CheckState();
|
||||||
|
if (skeleton) spSkeleton_setBonesToSetupPose(skeleton);
|
||||||
|
}
|
||||||
|
|
||||||
|
void USpineSkeletonComponent::SetSlotsToSetupPose () {
|
||||||
|
CheckState();
|
||||||
|
if (skeleton) spSkeleton_setSlotsToSetupPose(skeleton);
|
||||||
|
}
|
||||||
|
|
||||||
void USpineSkeletonComponent::BeginPlay() {
|
void USpineSkeletonComponent::BeginPlay() {
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
}
|
}
|
||||||
@ -19,7 +54,9 @@ void USpineSkeletonComponent::TickComponent (float DeltaTime, ELevelTick TickTyp
|
|||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
if (skeleton) {
|
if (skeleton) {
|
||||||
|
BeforeUpdateWorldTransform.Broadcast(this);
|
||||||
spSkeleton_updateWorldTransform(skeleton);
|
spSkeleton_updateWorldTransform(skeleton);
|
||||||
|
AfterUpdateWorldTransform.Broadcast(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -200,6 +200,9 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, Category="Components|Spine")
|
UFUNCTION(BlueprintCallable, Category="Components|Spine")
|
||||||
UTrackEntry* AddEmptyAnimation (int trackIndex, float mixDuration, float delay);
|
UTrackEntry* AddEmptyAnimation (int trackIndex, float mixDuration, float delay);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category="Components|Spine")
|
||||||
|
UTrackEntry* GetCurrent (int trackIndex);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category="Components|Spine")
|
UFUNCTION(BlueprintCallable, Category="Components|Spine")
|
||||||
void ClearTracks ();
|
void ClearTracks ();
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,11 @@
|
|||||||
#include "spine/spine.h"
|
#include "spine/spine.h"
|
||||||
#include "SpineSkeletonComponent.generated.h"
|
#include "SpineSkeletonComponent.generated.h"
|
||||||
|
|
||||||
|
class USpineSkeletonComponent;
|
||||||
|
|
||||||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpineBeforeUpdateWorldTransformDelegate, USpineSkeletonComponent*, skeleton);
|
||||||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpineAfterUpdateWorldTransformDelegate, USpineSkeletonComponent*, skeleton);
|
||||||
|
|
||||||
class USpineAtlasAsset;
|
class USpineAtlasAsset;
|
||||||
UCLASS(ClassGroup=(Spine), meta=(BlueprintSpawnableComponent))
|
UCLASS(ClassGroup=(Spine), meta=(BlueprintSpawnableComponent))
|
||||||
class SPINEPLUGIN_API USpineSkeletonComponent: public UActorComponent {
|
class SPINEPLUGIN_API USpineSkeletonComponent: public UActorComponent {
|
||||||
@ -19,6 +24,33 @@ public:
|
|||||||
USpineSkeletonDataAsset* SkeletonData;
|
USpineSkeletonDataAsset* SkeletonData;
|
||||||
|
|
||||||
spSkeleton* GetSkeleton () { return skeleton; };
|
spSkeleton* GetSkeleton () { return skeleton; };
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine")
|
||||||
|
bool SetSkin (const FString& SkinName);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine")
|
||||||
|
bool setAttachment (const FString& slotName, const FString& attachmentName);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine")
|
||||||
|
FTransform GetBoneWorldTransform (const FString& BoneName);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine")
|
||||||
|
FTransform GetBoneLocalTransform (const FString& BoneName);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine")
|
||||||
|
void SetToSetupPose ();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine")
|
||||||
|
void SetBonesToSetupPose ();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine")
|
||||||
|
void SetSlotsToSetupPose ();
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintAssignable, Category = "Components|Spine")
|
||||||
|
FSpineBeforeUpdateWorldTransformDelegate BeforeUpdateWorldTransform;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintAssignable, Category = "Components|Spine")
|
||||||
|
FSpineAfterUpdateWorldTransformDelegate AfterUpdateWorldTransform;
|
||||||
|
|
||||||
USpineSkeletonComponent ();
|
USpineSkeletonComponent ();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user