I’m trying to set value for a node’s transform controller, but not working:
using Autodesk.Max;
using System.Windows;
namespace TestLibrary
{
public partial class TestWindow : Window
{
private readonly static IGlobal globalInterface = GlobalInterface.Instance;
private readonly static IInterface coreInterface = globalInterface.COREInterface;
private void Button_Click(object sender, RoutedEventArgs e)
{
int time = coreInterface.Time;
IINode selNode = coreInterface.GetSelNode(0);
if (selNode == null) MessageBox.Show("Selection empty.");
else
{
IMatrix3 matrix = globalInterface.Matrix3.Create(true);
selNode.TMController.SetValue(time,matrix,true,GetSetMethod.Absolute);
globalInterface.COREInterface.RedrawViews(time, RedrawFlags.Normal, null);
}
}
public TestWindow()
{
InitializeComponent();
}
}
}
What is wrong in my code?