Custom attributes
You can import custom attributes created in modeling tools such as Maya.
Currently, you can only import custom animated attributes. Attributes that aren't animated can't be imported.
In the Asset View, select the animation asset.
When the assets are built, Xenko imports the custom attributes from the FBX file.
2. Control custom attributes with a script
Add a script to read the custom attributes and copy their value to another property. This can be a separate script, or part of another .
To look up an attribute, use . For example, if you have the node with the custom attribute , use .
```csusing Xenko.Animations;using Xenko.Engine;using Xenko.Rendering;using Xenko.Audio;using Xenko.Rendering.Materials;
SceneSystem.SceneInstance.Processors.OfType
// Animation result may be Null if animation hasn't been played yet. var animResult = animationProcessor.GetAnimationClipResult(animationComponent); if (animResult == null) return;
// Read the value of the animated custom attribute: float emmisiveIntensity; unsafe { fixed (byte* structures = animResult.Data) { foreach (var channel in animResult.Channels) { if (!channel.IsUserCustomProperty) continue;
"myNode_myProperty") emmisiveIntensity = value; } } }
// Bind the material parameter: