Thanks, Maxime. No urgency from my side. Just stumbled across it, when actually trying to do something completely different.
My best wishes to the entire team.
Unfortunately it seems to have issues. No other code than te snippet found in docs is needed:
dId = c4d.DescID(c4d.DescLevel(30), c4d.DescLevel(40), c4d.DescLevel(50)) dId<<2
Here in my R21 on Win10 this results in:
TypeError: unsupported operand type(s) for <<: 'c4d.DescID' and 'int'
Trying to call
__lshift__() directly results in
NotImplemented, which could be a hint ;)
the API of the SplineObject seems to suggest, one could have a spline with the open and closed segments (as one can set the closed flag on a per segment basis in SplineObject.SetSegment()). But I simply can't get it to work.
Basically I'm doing something like the following, always ending up with all open segments:
import c4d def main(): spline = c4d.SplineObject(6, c4d.SPLINETYPE_LINEAR) spline.ResizeObject(7, 2) spline.SetPoint(0, c4d.Vector(0.0, 0.0, 100.0)) spline.SetPoint(1, c4d.Vector(100.0, 0.0, 100.0)) spline.SetPoint(2, c4d.Vector(100.0, 100.0, 100.0)) spline.SetSegment(0, 3, True) spline.SetPoint(3, c4d.Vector(0.0, 0.0, 200.0)) spline.SetPoint(4, c4d.Vector(100.0, 0.0, 200.0)) spline.SetPoint(5, c4d.Vector(100.0, 100.0, 200.0)) spline.SetSegment(1, 3, False) spline.Message(c4d.MSG_UPDATE) doc.InsertObject(spline) c4d.EventAdd() if __name__=='__main__': main()
Playing around with the Spline Pen, I'm somewhat afraid, this feature of the API is not working at all, as the Pen starts working with two spline objects as soon as a segment of the other "openess" gets involved.
Not urgent at all, I can work with the obvious workaround of multiple splines.
While writing this, I took a look at the C++ API and now, I'm pretty sure, I can answer the question myself already. In C++ such option does not seem to exist. Strangely so, this additional "closed" parameter in Python is not even optional.
So, it's maybe more a request for a documentation fix than a real question.
Ah, that novel!
Yeah, sorry. Not one of my personal highlights. Sometimes answering simple questions can be more difficult than one might expect. Such changes can involve quite a few people and seemingly easy processes can become quite lengthy (up to the point, where you (or rather I) forget about the beginning). And certain topics might be regarded so sensitive, that communication on even remotely related topics can get difficult (e.g. due to legal issues). But then again, in the end it was in my responsibility to gather the info you needed or wanted, and I failed to provide it to you. Or at least provide you with a semi-satisfactory answer without touching things I was not allowed to. Sorry!
And see? I'm pretty sure, my follow up will not make the same mistakes (as he or she is most likely human maybe others...). So, if it's not the same anymore without me, then probably better!
Thanks to everybody in this thread for all your kind words.
As mentioned earlier, this place won't be the same without you.
You may overestimate my contribution. Silently watching from the side line, my feeling is, Riccardo, Sebastian, Maxime and Manuel, though being handicapped by a little loss of man power, not only managed to continue to do a great job in here, but even managed to further improve. Just let the dust of change settle a bit and they'll excel even more.
And with the recent unraveling of the plot, this "ending of your novel" has sure taken a new twist.
I'm not quite sure where you are heading and which plot recently unraveled. But please believe me, my departure was not so much related to Maxon and certainly not connected to any announcements on Maxon's strategy of the recent past. I left a group of friends behind, mostly for private and to a certain extent selfish reasons, which I won't discuss in public. Yet, please, try not to read between the lines and do not interpret my silence against Maxon or the SDK Team. I really enjoyed being part of the ride. Having had the chance to meet all of you in here was really great. It's just sometimes you need to stop eating, when it tastes best. I'm pretty sure Forest Gump also said some fitting words, I just can't remember...
Dear Plugin Café community,
end of this month I will be leaving MAXON to spice up my life, seeking new endeavors.
Despite me looking forward to my next steps, I can not deny, I'm also leaving with a tear in my eyes.
For me it was an absolute joy to work for MAXON and even more so to work in this community.
Thanks to everybody for your contribution to Cinema 4D.
Rest assured, the SDK Team is in good shape and will continue to be there for you.
Even more so, as I also have some good (or maybe even better) news. Manuel Magalhaes joined the SDK Team last Monday, it won't take long to see him contributing to this community. Everybody say: Welcome, Manuel!
I'm sorry you are having issues with Cinema 4D.
You have ended up in MAXON's support forum for 3rd party developers.
This is actually not a good place for user support requests. Instead I suggest to use the support form on our website.
I'm glad you found something working for you. I just want to mention, this way of using the deform cache directly will only work for very specific setups, for arbitrary object configurations you will most likely need to iterate through the cache. So, I think, it's worth to give those manuals another read.
Also Maxime has posted some snippets in Getting a polygonal version of an animated mesh, which might be useful for you.