mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-16 03:51:37 +08:00
[ue4] Added USpineSkeletonComponent::SetSlotColor(). Closes #1904.
This commit is contained in:
parent
f567c18cfa
commit
50de8ea77c
@ -35,6 +35,7 @@
|
||||
* Materials on `SkeletonRendererComponent` are now blueprint read and writeable. This allows setting dynamic material instances at runtime.
|
||||
* Added `InitialSkin` property to `USpineWidget`. This allows previewing different skins in the UMG Designer. Initial skins can still be overridden via blueprint events such as `On Initialized`.
|
||||
* **Breaking changes**: `SpineWidget` no longer has the `Scale` property. Instead the size x/y properties can be used.
|
||||
* Added `SetSlotColor` on `USpineSkeletonComponent` to easily set the color of a slot via blueprints.
|
||||
|
||||
## C# ##
|
||||
* **Breaking changes**
|
||||
|
||||
@ -60,3 +60,13 @@ PhysXTreeRebuildRate=10
|
||||
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)
|
||||
|
||||
|
||||
|
||||
|
||||
[/Script/Engine.RendererSettings]
|
||||
r.DefaultFeature.Bloom=False
|
||||
r.DefaultFeature.AmbientOcclusion=False
|
||||
r.DefaultFeature.AmbientOcclusionStaticFraction=False
|
||||
r.DefaultFeature.AutoExposure=False
|
||||
r.UsePreExposure=False
|
||||
r.DefaultFeature.MotionBlur=False
|
||||
|
||||
|
||||
@ -105,8 +105,7 @@ FTransform USpineSkeletonComponent::GetBoneWorldTransform (const FString& BoneNa
|
||||
CheckState();
|
||||
if (skeleton) {
|
||||
Bone* bone = skeleton->findBone(TCHAR_TO_UTF8(*BoneName));
|
||||
if (!bone) return FTransform();
|
||||
if (!bone->isAppliedValid()) this->InternalTick(0, false);
|
||||
if (!bone) return FTransform();
|
||||
|
||||
// Need to fetch the renderer component to get world transform of actor plus
|
||||
// offset by renderer component and its parent component(s). If no renderer
|
||||
@ -139,7 +138,6 @@ void USpineSkeletonComponent::SetBoneWorldPosition (const FString& BoneName, con
|
||||
if (skeleton) {
|
||||
Bone* bone = skeleton->findBone(TCHAR_TO_UTF8(*BoneName));
|
||||
if (!bone) return;
|
||||
if (!bone->isAppliedValid()) this->InternalTick(0, false);
|
||||
|
||||
// Need to fetch the renderer component to get world transform of actor plus
|
||||
// offset by renderer component and its parent component(s). If no renderer
|
||||
@ -243,6 +241,16 @@ bool USpineSkeletonComponent::HasSlot (const FString SlotName) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void USpineSkeletonComponent::SetSlotColor(const FString SlotName, const FColor color) {
|
||||
CheckState();
|
||||
if (skeleton) {
|
||||
Slot *slot = skeleton->findSlot(TCHAR_TO_UTF8(*SlotName));
|
||||
if (slot) {
|
||||
slot->getColor().set(color.R, color.B, color.G, color.A);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void USpineSkeletonComponent::GetAnimations(TArray<FString> &Animations) {
|
||||
CheckState();
|
||||
if (skeleton) {
|
||||
|
||||
@ -110,6 +110,9 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
||||
bool HasSlot(const FString SlotName);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
||||
void SetSlotColor(const FString SlotName, const FColor color);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "Components|Spine|Skeleton")
|
||||
void GetAnimations(TArray<FString> &Animations);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user