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).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/01/2011 at 09:19, xxxxxxxx wrote:
User Information: Cinema 4D Version: 12 Platform: Windows ; Language(s) : C++ ;
--------- I would like to have my generator plugin return three different spheres each one slightly bigger than the other. I would like this to all happen in GetVirtualObjects() so that the sphere's options are not immediately accessible to the user. The onyl way I want the user to be able to change the spheres is through making the plugin object editable. How would I go about returning 3 different spheres in GVO? is this possible?
Thanks,
~Shawn
On 15/01/2011 at 12:51, xxxxxxxx wrote:
Create a Null object, allocate the three spheres, insert them under the Null object, configure the spheres, return the Null object.
On 15/01/2011 at 12:53, xxxxxxxx wrote:
Perfect. Worked like a charm. Thanks again Robert.
On 03/02/2011 at 01:09, xxxxxxxx wrote:
Hello, I tried this also, but the configuration of the spheres doesn't work. I set some differents radius and possitions (in GetVirtualObjects), but I see only one sphere with the defallt sizes. Where or how can I set the configurations. regards Markus
On 03/02/2011 at 02:55, xxxxxxxx wrote:
BaseObject* null = BaseObject::Alloc(Onull); if(!null) return NULL; BaseObject* sphere1 = BaseObject::Alloc(Osphere); if(!sphere1) return NULL; BaseObject* sphere2 = BaseObject::Alloc(Osphere); if(!sphere2) return NULL; BaseObject* sphere3 = BaseObject::Alloc(Osphere); if(!sphere3) return NULL; doc->InsertObject(sphere1, null, NULL, 0); doc->InsertObject(sphere2, null, sphere1, 0); doc->InsertObject(sphere3, null, sphere2, 0); return null;
You would of course need to make adjustments to each sphere's parameters to make them different sizes but this is how I did it.
Hope that helps. ~Shawn
On 03/02/2011 at 04:08, xxxxxxxx wrote:
Hello,
ok, that's the same like in my function.
NullObj = BaseObject::Alloc(Onull); if (!NullObj) return NULL; text = BaseObject::Alloc(Osplinetext); if (!text) return NULL; nurbs = BaseObject::Alloc(Oextrude); if (!nurbs) return NULL;
doc->InsertObject(nurbs,NullObj,NULL,FALSE); doc->InsertObject(text,nurbs, NULL, FALSE);
GeData data; data.SetString("hello world"); BaseContainer *bc = text->GetDataInstance(); bc->SetParameter(DescLevel(ID_PAINTSPLINETEXT_TEXT), data);
return NullObj;
But the changing of the default "Text" in the text spline doesn't work. Or the movement in the extrude NURBS object from "20" to e.g. 2 doesn't work. Do you have an idee how I can do this?
Marky
On 03/02/2011 at 06:12, xxxxxxxx wrote:
ahh, now it works.
BaseDocument *doc = GetActiveDocument();
Bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA); if (!dirty) return op->GetCache(hh);
BaseObject* null = BaseObject::Alloc(Onull); if(!null) return NULL; BaseObject* text = BaseObject::Alloc(Osplinetext); if (!text) return NULL; BaseObject* nurbs = BaseObject::Alloc(Oextrude); if (!nurbs) return NULL;
doc->InsertObject(nurbs, null,NULL,0); doc->InsertObject(text, nurbs, NULL, 0);
BaseContainer *bc = text->GetDataInstance(); bc->SetString( PRIM_TEXT_TEXT, "hello world!");
bc = nurbs->GetDataInstance(); bc->SetVector( EXTRUDEOBJECT_MOVE, Vector(0,0,2) );
return null;
thanks a lot