Sweep Modifier
-
Hello,
I'm working on a modifer object that is meant to modify a spline object by changing the number of points in the spline. In the process of doing so I encountered some peculiar behaviour with the Sweep object when it interacts with my modifer.
-
Hi John,
Having a modifier that changes the number of points (especially when you reduce them) isn't a very good idea, because in some setups you can have some dependencies that would be at least broken or even lead to the unstable execution. I think a better idea in this case would be to look in the direction of a generator object instead.
With that's said, I've just briefly checked your code in the latest Cinema 4D version (that hasn't been release yet) and the issue is not reproducible there. This might be due to the undefined behavior of such modifier or due to some internal changes that I'm not aware of, this I can't say for sure.
Cheers,
Ilia -
@i_mazlov Thanks for the response. I was afraid that that would be the case.
John Thomas
-
Hey,
Please note that both options, a modifier that changes the number of points of its host, and a spline generator that has another spline as an input, are not great. We have internally two cases that do exactly these two things: The bevel deformer and the spline mask spline generator. But third parties do not easily replicate both because they require detailed knowledge of our API and in some cases access to non-public things.
For deformers, Ilia already gave a great explanation. In short, if you are not careful, you can crash Cinema 4D. For the other case, a spline generator which takes another spline as an input, you will run into the issue that splines are not intended to have as objects as inputs. This means you are not getting passed a
HierarchyHelp
inObjectData::GetContour
with which you could ensure that your child object dependencies are up to date (because by default they are being built after you). There are patterns to solve this, and you run here at worst into the problem of a laggy/malfunctioning plugin and no crashes. But I would still advise going down that rabbit hole when avoidable.When you really must do this and now want to go down the spline generator road, I would recommend opening a new topic on that before you start.
Cheers,
Ferdinand