Can now switch the skeletal mesh on a character
This commit is contained in:
@@ -125,55 +125,40 @@ public:
|
||||
UFUNCTION(BlueprintPure, meta = (BlueprintAutocast), Category = "Luprex|Animation Step")
|
||||
static int64 AnimationStepID(const FlxAnimationStep& step) { return step.Hash; }
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Using mat_xxxx values from the animation step, update the actor's
|
||||
// material parameters. Doing this may involve creating or replacing
|
||||
// dynamic material instances for the actor.
|
||||
=======
|
||||
// Scan an animation step for key-value pairs of the
|
||||
// form mat_XXXX={x,y,z}. For each match, create a
|
||||
// dynamic material instance on the actor's mesh
|
||||
// components and set the vector parameter XXXX.
|
||||
// Materials are restored to their base (non-dynamic)
|
||||
// state before applying, so parameters from previous
|
||||
// calls do not persist.
|
||||
>>>>>>> 9b1dd00a45a7b17c3546f8574d00e5ec78f17c75
|
||||
//
|
||||
UFUNCTION(BlueprintCallable, Meta = (DefaultToSelf = "actor"), Category = "Luprex|Animation Step")
|
||||
static void AnimationStepApplyMaterials(const FlxAnimationStep& step, AActor* actor);
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Look for a mesh=name key-value pair in the animation step.
|
||||
// If found, load the named mesh and apply it to the actor's
|
||||
// mesh component. The actor must have exactly one mesh component.
|
||||
// If FallbackToBP is true, and mesh=name is not present, looks
|
||||
// for a bp=name pair instead.
|
||||
=======
|
||||
// Look for a mesh=name key-value pair. If found, load
|
||||
// the named mesh and apply it to the actor's mesh
|
||||
// component. The actor must have exactly one mesh
|
||||
// component.
|
||||
>>>>>>> 9b1dd00a45a7b17c3546f8574d00e5ec78f17c75
|
||||
// Loads a new static mesh, using the animation step to choose it.
|
||||
// If the chosen mesh is already installed, no changes are made.
|
||||
// Looks for 'mesh=name' first; if not found and FallbackToBP is
|
||||
// true, looks for 'bp=name'. If no mesh is successfully loaded,
|
||||
// uses the Fallback mesh. Failed loads are logged once.
|
||||
//
|
||||
UFUNCTION(BlueprintCallable, Meta = (DefaultToSelf = "actor"), Category = "Luprex|Animation Step")
|
||||
static void AnimationStepApplyMesh(const FlxAnimationStep& step, bool FallbackToBP, AActor* actor);
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex|Animation Step")
|
||||
static void AnimationStepApplyStaticMesh(const FlxAnimationStep& step, bool FallbackToBP,
|
||||
UStaticMeshComponent* MeshComp, UStaticMesh* Fallback = nullptr);
|
||||
|
||||
// Loads a new skeletal mesh, using the animation step to choose it.
|
||||
// If the chosen mesh is already installed, no changes are made.
|
||||
// Looks for 'mesh=name' first; if not found and FallbackToBP is
|
||||
// true, looks for 'bp=name'. If no mesh is successfully loaded,
|
||||
// uses the Fallback mesh. Failed loads are logged once.
|
||||
//
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex|Animation Step")
|
||||
static void AnimationStepApplySkeletalMesh(const FlxAnimationStep& step, bool FallbackToBP,
|
||||
USkeletalMeshComponent* MeshComp, USkeletalMesh* Fallback = nullptr);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
<<<<<<< HEAD
|
||||
// An animation step that doesn't actually store the step,
|
||||
// it just contains a pointer to the string.
|
||||
//
|
||||
////////////////////////////////////////////////
|
||||
=======
|
||||
// FlxAnimationStepView
|
||||
//
|
||||
// A lightweight, non-owning view of an animation
|
||||
// step (hash + body as a string_view).
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
>>>>>>> 9b1dd00a45a7b17c3546f8574d00e5ec78f17c75
|
||||
|
||||
struct FlxAnimationStepView {
|
||||
int64 Hash;
|
||||
@@ -266,13 +251,8 @@ private:
|
||||
FlxStreamBuffer Decoder;
|
||||
|
||||
public:
|
||||
<<<<<<< HEAD
|
||||
// Initialize the FlxAnimationStepDecoder.
|
||||
//
|
||||
=======
|
||||
// Initialize from an encoded step body.
|
||||
//
|
||||
>>>>>>> 9b1dd00a45a7b17c3546f8574d00e5ec78f17c75
|
||||
FlxAnimationStepDecoder(std::string_view body) : Decoder(body) {}
|
||||
|
||||
// Return true if the parser has reached EOF.
|
||||
|
||||
Reference in New Issue
Block a user