THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/03/2011 at 11:13, xxxxxxxx wrote:
I'm trying to get the polygons that are attached to point index of a cube. But I can't figure out how to instantiate the Neighbor class.
Does anyone have an example of this?
On 17/03/2011 at 11:22, xxxxxxxx wrote:
The neighbor class contains a Init method. In combination with Neighbor.GetPointPolys( pnt ) you san get the neighbor polygons.
On 17/03/2011 at 11:44, xxxxxxxx wrote:
And maybe this Open Source plugin helps you.
Open Edges - Py4D Open Source plugin - nux95 - cgsociety
On 17/03/2011 at 12:33, xxxxxxxx wrote:
That's exactly what I needed.
This is an example of all I was trying to do with it:
from c4d import gui,utils
def main() :
obj = doc.GetActiveObject()
AllPoints = obj.GetPointS() # Gets all the points
PointIndex = AllPoints.Select(1) # Gets point index #1
nb = utils.Neighbor() # Assigns neighbor to a variable
nb.Init(obj) # Instantiates the neighbor class
selected = nb.GetPointPolys(PointIndex) # Gets the id's of those neighboring polygons
I'm sure the SDK about this makes sense to people with years of coding experience. But I couldn't figure out what it was was trying to tell me on how to use this class.
Thanks a lot for the for the example file.
On 17/03/2011 at 14:19, xxxxxxxx wrote:
In my opinion, the Init() function is described very well.
I started Coffee 3 months ago and Python about 1 month ago.
On 17/03/2011 at 15:40, xxxxxxxx wrote:
I'm sure it is.
But what do you do if you suck at reading SDK's. And can't find any tutorials to teach you how to read them?
Welcome to my world.
On 17/03/2011 at 15:46, xxxxxxxx wrote:
At the beginning I really didn't understand anything in SDK's. But it became easier by time.
But I sometimes don't understand SDKs, too, since the entries are not always that senseful.