Disappearing cros section in sweep
-
On 23/02/2016 at 09:35, xxxxxxxx wrote:
Hi guys!
I'm working on an object plugin that has a sweep inside. Via a link field I specify the cross section spline, that should go inside sweep. When I convert the plugin object to editable something weird happens.
When the linked Spline is above the plugin object in the objects panel the cross section disappears from the sweep. When it is below the plugin object everything works out as expected.Has anyone experienced something similar or has any idea why this happens?
-
On 24/02/2016 at 02:02, xxxxxxxx wrote:
Hello,
I guess you are creating a generator and the "sweep inside" is a virtual sweep object created in your GetVirtualObjects() function?
Can you post some code how exactly you access and use the cross section spline from your link?
Best wishes,
Sebastian -
On 29/02/2016 at 03:44, xxxxxxxx wrote:
For testing purposes I boiled it down to this:
def GetVirtualObjects(self, op, hh) :
sweep = c4d.BaseObject(c4d.Osweep)
spline = c4d.SplineObject(2, c4d.SPLINETYPE_BEZIER)
spline.SetPoint(0, c4d.Vector(0, 0, 0))
spline.SetPoint(1, c4d.Vector(1000, 0, 0))
crossection = op[c4d.T_LINK].GetClone()spline.InsertUnder(sweep)
crossection.InsertUnder(sweep)return sweep
Still with the same effect.
-
On 29/02/2016 at 09:20, xxxxxxxx wrote:
Hello,
there seem to be some issues with this specific use case. You could try to use the child objects of your generator as arguments (with the flag OBJECT_INPUT set). This would be more like the typical Cinema 4D workflow. Or you could try if the same happens with a Python Generator object and links defined as user data.
Best wishes,
Sebastian -
On 02/03/2016 at 03:50, xxxxxxxx wrote:
Thanks for the suggestions. I was hoping to avoid having to use child objects, but I might try it.
Thanks again.