Solved Matrix generates no points while on vertex mode using a spline generator plugin

hey,

i got a spline tool which is unsing the ISSPLINE and GENERATOR flag.

if i set a matrix object mode to anything exept vertex it generates points accordingly to the choosen distribution mode.

if i convert the spline generator to an actual spline the vertex distribution works well.

Hi Pyr,

I've tried with a very basic spline generator and the clones are properly created under all "distribution" modes.

Here's the plugin responsible for generating the curve:

import math
import c4d
from c4d import plugins, utils

PLUGIN_ID = 99911332

class SDKSupport_11332 (plugins.ObjectData):

	def Init(self, node):
		return True

	def GetContour(self, op, doc, lod, bt):
		rad = 200
		sub = 3
		TANG = 0.415
		
		op = c4d.SplineObject(sub, c4d.SPLINETYPE_BEZIER)
		if not op: return None
		
		for i in xrange(sub):
			sn, cs = utils.SinCos(math.pi*i/float(sub-1))
			op.SetPoint(i, c4d.Vector(cs*rad,sn*rad,0.0))
			vl = c4d.Vector(sn*rad*TANG,-cs*rad*TANG,0.0)
			vr = -vl
			op.SetTangent(i, vl, vr)
		
		op.Message(c4d.MSG_UPDATE)
			
		return op

if __name__ == "__main__":
		plugins.RegisterObjectPlugin(id=PLUGIN_ID, 
			str="SDKSupport_11332", 
			description="SDKSupport_11332",
			g=SDKSupport_11332, 
			info=c4d.OBJECT_GENERATOR|c4d.OBJECT_ISSPLINE, 
			icon=None)	

Can you provide some further detail on your spline generator?

Cheers, Riccardo

Ok this was defently my fault. It works now.
I was using GetVirtualObjects instead of GetContour.