Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
@m_magalhaes Thank you
@mp5gosu Thank you solved my problem
@dada said in I want to use C + + to implement GUI. Messagedialog(‘no sel’) in Python I don't know how to start:
Cinema 4D Version: 21
User Information: Cinema 4D Version: 12 Platform: Language(s) : C++ ;
 I want to use C + + to implement a small prompt box shown in the figure above 我的C++代码:
Bool DADA_ToolSet_Dialog::Command(Int32 id, const BaseContainer & msg) { switch (id) { case(ID_DADA_Point_TO_Circle): { BaseDocument *doc = GetActiveDocument(); BaseObject *obj1 = doc->GetActiveObject(); String name = obj1->GetName(); if (obj1 == NULL) { break; } } } }
@m_magalhaes I'll write it in your way
Thank you very much.
Cheers!
@m_magalhaes 非常感谢 我用另外一个办法解决了不用求矩阵 代码如下
PointObject *slpoint = ToPoint(obj1); //转换为点对象 BaseSelect *pointsel = slpoint->GetPointS();//获取选择的点 Int32 pointConst = slpoint->GetPointCount();//获取所有的点 Vector *points = slpoint->GetPointW();//获取所有点的坐标 Vector pt; Int32 i; for (i = 0; i < pointConst; i++)//利用for循环来不断读取所有点的数据 { if (pointsel->IsSelected(i))//来判断当前的点是否选择住 { pt += points[i];//若果选择 所有向量相加 } }
User Information: Cinema 4D Version: 21.115 Platform: Windows ; Language(s) : C++ ; I've converted objects to polygons, And selected a point
And print out the serial number of these points
How can I get the coordinates of these points
Here's my code
BaseDocument*doc = GetActiveDocument(); BaseObject * obj1 = doc->GetActiveObject(); if (obj1->GetType()!= Opolygon) { break; } PointObject *slpoint = ToPoint(obj1); BaseSelect *pointsel = slpoint->GetPointS(); Int32 seg = 0, i, a, b; while (pointsel->GetRange(seg++, LIMIT <Int32> ::MAX,&a,&b)) { for ( i = a; i < b; i++) { ApplicationOutput("aa: @"_s, i); } }
@rsodre I will already use python to create scripts and my own plugins But I want to write my own script in C ++ Thank you for your reply
@s_bach Thank you in advance for your reply I refer to what you said and went to the SDK documentation I can't successfully create a cheapest plugin of my own I want to ask Are there any tutorials that are particularly suitable for newbies in C ++, I found links to some resources on this forum But the tutorials that are clicked are older versions and are not applicable to c4dR21 and Visual Studio 2017 I hope there is a video tutorial that teaches me how to configure Visual Studio 2017 and successfully create the first plugin of my own I can pay to buy this video tutorial I would like to use what I learned to write my own C ++ plugin
I want to write the simplest plug-in in C + +
But I've already configured the SDK
I went through some tutorials and found that the vs version is updated a lot. I don't know how to configure it
I would like to ask vs2017 and R21 for a tutorial on writing the simplest plug-in
It's better to have a video tutorial so that I can understand my English faster. It's not very good