Get ID of Parameters
On 30/10/2015 at 02:48, xxxxxxxx wrote:
Cinema 4D Version: 16.050
Platform: Mac OSX ;
Language(s) : C++ ;
I am wondering if there is any way to get the ID of a parameter i want to set. I know for BaseObjects I can access GetType() to achieve my goal. But I am currently facing the problem that i want to add a connector (which works) but i want to change it from the hinge type to Ballsocket but unfortunately I am unable to find out the Id of the type Parameter which I assume I have to change. Did anybody achieve something similar and can help me out?
On 30/10/2015 at 06:47, xxxxxxxx wrote:
When you are in C4D, add a Connector object.
Then open up the console (Script->Console). Make sure the Console is set to Python.
Now drag "Type" from your Connector in the AM to the link field in the Console, and press enter.
You should get:
FORCE_TYPE is the parameter id, and 0 is the chosen type, in this case Hinge.
You can change the type from Hinge to Ball and Socket, and drag it again to the console.
Now you will get 2 as a result, which is what you want to set your parameter at.
If you try a search at the plugincafe cpp documentation with "ball" or "ballso" you can find the page that you want: dynconstraintobject.h.
Here you can see all the CONSTRAINT_JOINT_TYPE's.
If you want to see the enumeration, just open dynconstraintobject.h on your hard drive.
TIP: You can drag almost everything to the console, to check what the parameter name is, and which value it has. In this case the parameter name was FORCE_TYPE and the value was first set to 0, but you want it set at 2. If you want to know a name, first try to drag it to the console ;-).
I hope this helped you.
EDIT: You can mark this as Solved.
On 02/11/2015 at 04:59, xxxxxxxx wrote:
Casimir already provided the most important information.
Just want to add another option:
Everything in Cinema 4D uses the same mechanism with resource files as you do. In the resource subfolder of your Cinema 4D installation directory you find all the resource and string files.