diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c0c915fe..461a00de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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** diff --git a/spine-ue4/Config/DefaultEngine.ini b/spine-ue4/Config/DefaultEngine.ini index bc632b8a4..3bb982b78 100644 --- a/spine-ue4/Config/DefaultEngine.ini +++ b/spine-ue4/Config/DefaultEngine.ini @@ -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 + diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp index 0a988f0fa..ea4c7c2a3 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp @@ -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 &Animations) { CheckState(); if (skeleton) { diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h index 9c35e9026..cae0ae162 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h @@ -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 &Animations);