As the selections are stored in an array you have to go through the array of all points of an object and check if they are selected or not. The can be easily be done with a COFFEE-Expression or a COFFEE Node.
Have a look at the COFFEE SDK and the "GetPointSelection()" and "IsSelected (point_no)" commands.
There are a lot of examples available in the SDK. If you just need those commands that deal with points and selections you'll not have to learn much. Basically these line do the job:
main (doc, op)
for (i=0; i
//You reach these lines if the point with the index "i" is selected
// Do something with this point here
I just wrote this without checking if it works, but it should :-)
Re: xpresso by izzo on Sep 28, 2003 at 11:40:50 pm
thanx...i'll try it...well i have no experience with c++ neither Java so it's a bit hard to do it 4 me...i've checked the sdk and examples too...and spent whole day tryin to change the code but no success :o)...thanx again
btw...do i find somewhere on net sumtin' about c++ (4 dummies :) )...of course 4 free:o) ?
Don't mix things up please. COFFEE has some similar syntax with C++, but other parts are quite different. If you just need to do some polygons or points manipulations, you'll not have to work with C++, as COFFEE and XPresso can handle this. C++ also has the downside that you need an extra compiler / debugger for it. COFFEE can be written within Cinemas COFFEE Editor or even with a simple Text-Software. All the debugging will be handled by Cinema.
Have you downloaded the right SDK? There is a separate COFFEE SDK beside the C++ SDK.
Re: xpresso by govinda on Sep 29, 2003 at 5:34:42 am
Björn Marl, aka Srek, has some useful Xpresso presets available on his site, which he helpfully populated with 'Remark' nodes to explain what he's doing. I've been reverse-engineering and reusing a file called 'nullbitespline.c4d' to access the points on a spline, which allows you to animate a spline without using PLA or morphing. But, and this is a big but, I have no idea where I downloaded or got this file from. It might have come with v.8, and I'm too lazy to check the disk. It's probable that Björn created this file also, but I don't see it on his site.
I started the same way, by looking for all uncompiled examples I can find and working through the SDK.
I just started with C++ lately as COFFEE has still some weak parts or isn't able to access all aspects of objects (deformed meshes for example). With Xpresso some of these weak parts haven been eliminated, so it still makes sense to dig into COFFEE and it's combination with XPresso. No one said it will be easy, but it's worth the effort :-)