Message 1 of 2
C# transform controller SetValue not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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();
}
}
}