THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/10/2011 at 08:32, xxxxxxxx wrote:
How can I have an ObjectPlugin using GetContour()
to always refresh/update?
I have a simple spline generator that makes a spline
and set its points to the points of a point object.
(Similar to the TracerObject in a simple way)
The issue is that when I move any of the points of
the polygon object, the "source", the generated spline does
not update what ever I try.
It only updates if I click something in its AM.
Thing is, if I use GetVirtualObjects() instead, it updates
without problem. (Thou I then don't get a usable spline in return
as it's not seen as a spline object by ie Mograph stuff, Cloners, MoSpline etc)
Below is the very basic what I do and what parts I use.
Where/how do I tell GetCountour not cache itself?
Cheers
Lennart
def Init(self,op) :
data = op.GetDataInstance()
data.SetReal(c4d.ID_SOMETHING,n)
return True
#def GetVirtualObjects(self,op,hierarchyhelp) :
def GetContour(self,op,doc,lod,bt) :
bc = op.GetDataInstance()
mysomething = bc.GetReal(c4d.ID_SOMETHING)
pointobject = doc.SearchObject("EditedCube")
pcount = pointobject.GetPointCount()
spline = c4d.BaseObject(c4d.Ospline)
spline.ResizeObject(pcount,0)
spline.SetAllPoints(pointobject.GetAllPoints())
spline.Message(c4d.MSG_UPDATE)
return spline
plugins.RegisterObjectPlugin()