@i_mazlov thank you very much
Posts made by pchg
-
RE: How to preserve the animation of a sphere
@i_mazlov Thanks for your explanation. How to use code to execute the "Select Connected" command and loop through all points. I have obtained all the points now, but I don't know how to execute the "Select Connected" command for each point
BaseObject* obj = doc->GetActiveObject(); PointObject* pointObj = static_cast<PointObject*>(obj); Int32 pointCount = pointObj->GetPointCount(); Vector* points = pointObj->GetPointW();
-
RE: How to preserve the animation of a sphere
@i_mazlov Or is there a way to preserve the animation after using MCOMMAND_EXPLODESEGMENTS
-
RE: How to preserve the animation of a sphere
Thanks @i_mazlov I wrote a plugin that would read the coordinates of every sphere in every frame and then output, and get all frame coordinates of all spheres to the user
-
How to preserve the animation of a sphere
Hello colleagues, I used C++ to write the C4D S26 plugin on Windows 10, I import .abc and want to explode this file, but I found using SendModelingCommand()that the sphere animation disappeared, what should I do?
BaseDocument* doc = GetActiveDocument(); BaseObject* activeObject = doc->GetActiveObject(); if (!activeObject) return break; ModelingCommandData mcd; mcd.doc = doc; mcd.op = activeObject; const bool result = SendModelingCommand(MCOMMAND_EXPLODESEGMENTS, mcd); if(result) { EventAdd(); }
Although I got all the spheres, all the sphere animation was lost, Thanks in advance!
-
RE: How to get sphere coordinates
@i_mazlov Thanks
BaseObject* activeObject = doc->GetActiveObject(); if (!activeObject) return break; ModelingCommandData mcd; mcd.doc = doc; mcd.op = activeObject; const bool result = SendModelingCommand(MCOMMAND_EXPLODESEGMENTS, mcd); if(result) { EventAdd(); }
Although I got all the spheres, all the sphere animation was lost, What should I do?
-
RE: How to get sphere coordinates
Thanks @i_mazlov
I want to get the coordinate information of all spheres under this editable objectBaseDocument* doc = GetActiveDocument(); BaseObject* obj = doc->GetActiveObject(); ModelingCommandData mcd; mcd.doc = doc; mcd.op = obj; const bool result = SendModelingCommand(MCOMMAND_EXPLODESEGMENTS, mcd);
Wrong result, result = false, or whether it should be done
const bool result = SendModelingCommand(MCOMMAND_CURRENTSTATETOOBJECT, mcd); BaseObject* res = static_cast<BaseObject*>(mcd.result->GetIndex(0)); while (res != nullptr) { Vector points = res ->GetAbsPos(); res = res -> GetNext(); }
but only one coordinate
-
How to get sphere coordinates
Hello colleagues, I used C++ to write the C4D S26 plugin on Windows 10, I import .abc and want to get the center point coordinates of each sphere, not the vertex coordinates
BaseObject* obj = doc->GetActiveObject(); PointObject* pointObj = static_cast<PointObject*>(obj); Int32 pointCount = pointObj->GetPointCount(); Vector* points = pointObj->GetPointW(); const ::Matrix globalMtx = pointObj->GetMg(); for (Int32 i = 0; i < pointCount; ++i) { Vector site = pointObj->GetMg() * points[i]; GePrint("Frame " + String::IntToString(count) + ": " + String::VectorToString(site)); }
-
How to Get cloner data in C++
I used C++ to write the C4D S26 plugin on Windows 10, I used cloner function to animate, How to get the coordinates and color information of all spheres. Thanks in advance!
-
RE: How to change the color of shaded wire in C++
@i_mazlov Thank you for your reply
-
How to change the color of shaded wire in C++
I used C++ to write the C4D S26 plugin on Windows 10, I want to change the color of the shaded wire, But don't know how to do it. Thanks in advance!
-
RE: How to obtain the selection order of objects in C++
@spedler Thank you for your help
-
How to obtain the selection order of objects in C++
I used C++ to write the C4D S26 plugin on Windows 10, I want to get the order in which BaseObject are selected by the user, User selections can be unordered, I want to know the order in which he was selected.
Thanks in advance!
-
RE: How to Obtain the .FBX Points of Objects in C++
@ferdinand Thank you for your reply
-
How to Obtain the .FBX Points of Objects in C++
Hello colleagues,
I used C++ to write the C4D S26 plugin on Windows 10, I import .FBX and want to obtain the world coordinates of each point in the composite shape. Thanks in advance!
BaseObject* obj = doc->GetActiveObject(); PointObject* pointObj = static_cast<PointObject*>(obj); Int32 pointCount = pointObj->GetPointCount(); Vector* points = pointObj->GetPointW(); const ::Matrix globalMtx = pointObj->GetMg(); for (Int32 i = 0; i < pointCount; ++i) { Vector site = pointObj->GetMg() * points[i]; GePrint("Frame " + String::IntToString(count) + ": " + String::VectorToString(site)); }
so, The point I picked is for this polygon
but,The coordinates I want are this combination image
-
How to create ToolBox in C++.
Hello colleagues,
I used C++ to write the C4D S26 plugin on Windows 10, How to create ToolBox in CreateLayout(), As this picture shows, like the Time, Creates an unfolding group
Thanks in advance!