Anyway, i'll add my custom offset to the mouse coordinate to match the point from the center, as seem by default.
Best posts made by RenatoT
Latest posts made by RenatoT
Hi all,
retrieving the rotation from a Matrix limit the angles from -PI to PI so I tought that there is an Array of Vector in MoData... without luck. Maybe i'm working in ModifyPoints and is not the correct way to manage the clones rotations with angles.
Any suggestion?
Thanks in advance
Renato
Thanks R, the insert was an error, i already corrected. OBJECT_USECACHECOLOR work as expected :)
Cheers
Renato
Ok, I miss to use OBJECT_USECACHECOLOR. I found it on this older post:
https://plugincafe.maxon.net/topic/6674/7275_setting-xray-for-virtual-objects/8
Thanks Cairyn for the test.
Yes, is a right question :) ... let me check.
Hi all, i'm trying to generate an XRAY pyramid inside the GetVirtualObjects() without luck.
Here my source code:
BaseObject* pyramid = BaseObject::Alloc(Ocone);
if (pyramid) {
BaseContainer* cone_bc = pyramid->GetDataInstance();
const Float pyra_height = 0.75;
const Vector v1 = Vector(0.0, 1.0, 0.0);
const Vector v2 = Vector(1.0, 0.0, 0.0);
const Vector v3 = Vector(0.0, 0.0, 1.0);
const Vector center = bot_pos + Vector(0.0, pyra_height, 0.0);
const Matrix mg = Matrix(center, v2, v1, v3);
pyramid->SetMg(mg);
cone_bc->SetFloat(PRIM_CONE_TRAD, mid_lower * supp_scale);
cone_bc->SetFloat(PRIM_CONE_BRAD, mid_lower * 2.0 * supp_scale);
cone_bc->SetFloat(PRIM_CONE_HEIGHT, pyra_height);
cone_bc->SetFloat(PRIM_CONE_HSUB, 1);
cone_bc->SetFloat(PRIM_CONE_SEG, subdivision);
cone_bc->SetBool(PRIM_CONE_CAPS, true);
cone_bc->SetInt32(PRIM_CONE_CSUB, 1);
cone_bc->SetInt32(PRIM_CONE_FSUB, fstep);
// Try to set Xray ---------------------------
ObjectColorProperties prop;
pyramid->GetColorProperties(&prop);
prop.xray = true;
pyramid->SetColorProperties(&prop);
pyramid->SetParameter(ID_BASEOBJECT_XRAY, GeData(TRUE), DESCFLAGS_SET_0);
pyramid->Message(MSG_UPDATE);
// Try also with Container -------------------
cone_bc->SetBool(ID_BASEOBJECT_XRAY, true);
doc->InsertObject(pyramid, ret, nullptr);
}
Thanks in advance
Renato T.
Anyway, i'll add my custom offset to the mouse coordinate to match the point from the center, as seem by default.
Hi Maxime,
thanks for reply. I'm in a ToolData plugin. The viewport is where I would like use a custom mouse cursor.
Hi Maxime. Thanks for reply. At last I used the BVHTree for that.