On 13/10/2017 at 07:50, xxxxxxxx wrote:
I have a object plugin with GetVirtualObjects().
There I create a area light with a Target Tag.
I fill the target with user data and that is all working.
Except the light does not follow the target.
When I convert the object plugin to an object (C command), it is working!
What am I missing?
def GetVirtualObjects(self, op, hierarchyhelp) :
if not(op.IsDirty(c4d.DIRTY_MATRIX | c4d.DIRTY_DATA)) :
return op.GetCache(hierarchyhelp)
#get and set parameters
data = op.GetDataInstance()
targetLink = data.GetLink(LOOKAT)
moveableLight = c4d.BaseObject(c4d.Olight)
moveableLight[c4d.LIGHT_TYPE] = c4d.LIGHT_TYPE_AREA
targetTag = moveableLight.MakeTag(c4d.Ttargetexpression)
targetTag[c4d.TARGETEXPRESSIONTAG_LINK] = targetLink
return moveableLight