Drawing polygon(s)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/04/2012 at 05:15, xxxxxxxx wrote:
It's really a matter of using the BaseContainer of the object to access your AM parameters. and using the values your get from there to edit or manipulate the geometry you create in GVO..
so for example since you would be working from GVO, you would get the basecontainer of your object by doing
BaseContainer* bc = op->GetDataInstance();
then if you want to access your attributes from there you would do something like,
Real myParam = bc->GetReal(MY_PARAMETER_NAME);
then let's say you wanted to manipulate the point count of your polygon, you would do,
PolygonObject* obj = PolygonObject::Alloc(myParam, myParam/4);
in that way you could dynamically manipulate the polygonobject you are creating.
~Shawn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/04/2012 at 19:24, xxxxxxxx wrote:
Hi Shawn,
thanks again! I've been able to get gui elements to do things which is great (though only simple things thus far). Customgui elements seem to be a bit more difficult, but I'm fumbling my way through them!
I've started the GVO loop for the polys. But there's a bit of wind outside so I might have to go for a windsurf first and come back to it later!!!
One thing I should ask though - if I'm drawing polys through GVO that are being obtained through the Tpolygon tag data, does my plugin need to be registered as an OBJECT_GENERATOR? Or can I just have OBJECT_POLYGON and OBJECT_POINT there? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/04/2012 at 01:33, xxxxxxxx wrote:
It needs to be OBJECT_GENERATOR because you're generating a new object. You don't need OBJECT_POLYGONOBJECT or OBJECT_POINTOBJECT. In some cases, like the HyperNURBS or the Array object, you would also need OBJECT_INPUT indicating that the generator takes a child object and generates something from it.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/04/2012 at 02:20, xxxxxxxx wrote:
Hm, I just did a few builds with just the GENERATOR but I can't seem to copy polygons over to it. It seems to only let me copy polys to it if I have the POLYOBJECT and POINTOBJECT in there as well. I'm guessing that it won't matter too much if they stay..?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/04/2012 at 03:58, xxxxxxxx wrote:
Hi folks,
my apologies for being such a pest about this.
I've had a think about this GVO function stuff and the GENERATOR registration flag, and I think there's something I need to know a bit more about.
If I don't have the OBJECT_GENERATOR flag in the registration, then GVO won't run/work will it? If that's the case, then how does Cinema's editable polygon meshes work? They must not work through GVO? They don't have the green tick..?
Pest out...
WP. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/04/2012 at 06:46, xxxxxxxx wrote:
If the flag is not set, nothing will be generated (is my understanding). You have to distinguish between a parametric object, which has various parameters you can change like width, height, etc. and an editable polygon object.
The C4D primitives are parametric objects which are generators - so in the Cube object, if you could see its source code, it would have OBJECT_GENERATOR set. But once you make it editable you lose the generator and it's just another poly object. These don't have the OBJECT_GENERATOR flag set.
I've just written a very basic object generator as an example, and it and the accompanying tutorial will be on my site later today. I'll post a link here when done so you can see how it works.
Steve
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/04/2012 at 09:43, xxxxxxxx wrote:
Okay, this new tutorial is up on my site and you can find it at http://www.microbion.co.uk/graphics/c4d/create_plugins6.htm
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/04/2012 at 03:54, xxxxxxxx wrote:
Hi Steve,
firstly - thanks for the tutorial link. I hope you didn't rush that out for my part! There's some very useful and easy-to-understand info there. I'll spend a few days having a play, and to mix 'n' match things into my own experimental object. I'm already seeing parts that I can build on to utilise in my plugins! I suggest other capital N Newbies like myself out there take a look if you're following this thread.
Second - going back to your first post of the latest two has got me wondering. You mention that primitives are parametric objects, which are in turn generator objects. What I'm trying to make however sounds like it's not a generator object, as what I'm trying to achieve is just a plain editable polygon object. If we use the cube as an example, instead of it being a Cinema parametric Ocube with fillet options etc, I want the cube to be just a plain editable polygon object (as if the Ocube has been made editable). That way I can use Cinema's modelling tools on it. I'll see if I can upload a video showing what my dilema is, it might explain it better than what my words can
Thanks for the tutorial link again. Simple examples like these are very useful to turn too!
WP. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/04/2012 at 05:46, xxxxxxxx wrote:
Alrighty, here's a poorly made 1 minute video showing what happens when my plugin is in a scene. The link is one of those annoying download sites but I haven't got anywhere else to put it. For this one off it'll unfortunately have to do. I've never screen-captured or made a video downloadable before (oddly enough). Might have to consider YouTube uploads. Anyway, it should be enough to show visually inside Cinema where my plugin falls short, and may help to decipher what code elements I'm missing/needing.
Polygon Display Video
WP. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/04/2012 at 08:30, xxxxxxxx wrote:
Originally posted by xxxxxxxx
You mention that primitives are parametric objects, which are in turn generator objects. What I'm trying to make however sounds like it's not a generator object, as what I'm trying to achieve is just a plain editable polygon object. If we use the cube as an example, instead of it being a Cinema parametric Ocube with fillet options etc, I want the cube to be just a plain editable polygon object (as if the Ocube has been made editable). That way I can use Cinema's modelling tools on it. I'll see if I can upload a video showing what my dilema is, it might explain it better than what my words can =
Thanks. I can't look at the video right now but I will as soon as I can. From what you say though you are really trying to insert a new polygon object into the scene and then edit it manually in the usual way. In that case a generator object won't do which means an ObjectData plugin is not the right choice. The reason is that an ObjectData returns its object through GetVirtualObjects and you cannot insert a new object into a scene from GVO - it'll crash.
I'm guessing here but from the sound of it what you need is a CommandData plugin. With this you would click the plugin in the Plugins menu, perhaps change any required settings in a dialog, and maybe hit an OK button to insert the object into the scene. Then the plugin is done with and you can edit the object as you normally would.
Steve