@ferdinand Thank you very much for your reply
Posts made by pchg
-
RE: How to Swap location in Object Manager
-
How to Swap location in Object Manager
Hello colleagues, I used C++ to write the C4D S26 plugin on Windows 10. Swap the positions of 2 and 10 in the Object Manager. I cannot find the relevant API.
BaseDocument* doc = GetActiveDocument(); Int32 count = selection->GetCount(); AutoAlloc<AtomArray> selection; doc->GetActiveObjects(selection, GETACTIVEOBJECTFLAGS::CHILDREN); BaseObject* obj_2 = static_cast<BaseObject*>(selection->GetIndex(count - obj_10)); BaseObject* obj_10 = static_cast<BaseObject*>(selection->GetIndex(count - obj_2));
What should we do next?Thanks in advance!
-
How to obtain the color of each ball in each frame
Hello colleagues, I used C++ to write the C4D S26 plugin on Windows 10, This is an animation, How to obtain the color of each ball in each frame, Colors are set in a Linear Field.Thanks in advance!
-
How to modify the index
Hello colleagues, I used C++ to write the C4D S26 plugin on Windows 10, How can I modify the index of these cubes.what should I do?
-
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