Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetKeyControlInterface returns null... :(

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
budaibanderas
426 Views, 2 Replies

GetKeyControlInterface returns null... :(

Hello!

I have another question

And i would be very happy if anyone could give me advice

Control *c = MatrixCtrl->GetRotationController();
IKeyControl *ikc = GetKeyControlInterface(c);

 Above is the code which I want to use. MatrixCtrl is a simple Control, and the ikc is always null.

Can anyone give me advise how could i solve this?

2 REPLIES 2
Message 2 of 3
istan
in reply to: budaibanderas

I am sure you did not properly register your controler. Check the samples. e.g. eulrctrl.cpp
Message 3 of 3
budaibanderas
in reply to: istan

Thanks for your suggestion. I've looked at the code and found my mistake.

For others who may ran into this problem, I share my mistake.

My mistake was:

I've created one newdefaultmatrix3controller for my subcontroller.

But i should create a float subcontroller for each rotation axis.

So i created RotXCtrl,RotYCtrl,RotZCtrl subcontrollers as newdefaultfloatcontrollers

Then called their setValues and after that I called the addKey. and now it works.

 

Once again many thaks for you

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report