<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Updating a spline]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">How to update a spline if the number of points changes ?</p>
<p dir="auto">If the number of points is the same, we can use the following function:</p>
<pre><code>def spline_update(spline,tabPoint):
	dim = len(tabPoint)
	for i in range(0,dim):
		spline.SetPoint(i,tabPoint[i])

	spline.Message(c4d.MSG_UPDATE)
	return spline
</code></pre>
<p dir="auto">If the number of points changes, we must use the <strong>ResizeObject()</strong> method</p>
<p dir="auto">I'm looking for an example, which will save me from doing tests.</p>
]]></description><link>http://developers.maxon.net/forum/topic/14832/updating-a-spline</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 14:13:31 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/14832.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2023 04:54:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Updating a spline on Wed, 28 Jun 2023 14:12:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a></p>
<p dir="auto">I made this function which works fine:</p>
<pre><code>def spline_update(doc,spline,tabNewPoint):
	tabPoint = spline.GetAllPoints()
	
	dim = len(tabNewPoint)
	if len(tabPoint) != dim:
		spline.ResizeObject(dim)
	
	for i in range(0,dim):
		point = tabNewPoint[i]
		spline.SetPoint(i,point)

	spline.Message(c4d.MSG_UPDATE)
	return spline
</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/71930</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/71930</guid><dc:creator><![CDATA[Kantronin]]></dc:creator><pubDate>Wed, 28 Jun 2023 14:12:15 GMT</pubDate></item><item><title><![CDATA[Reply to Updating a spline on Wed, 28 Jun 2023 09:59:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/kantronin">@<bdi>Kantronin</bdi></a>,</p>
<p dir="auto">I have moved your topic due to being in the wrong forum. You might want to look at our <a href="https://github.com/PluginCafe/cinema4d_py_sdk_extended/blob/master/scripts/04_3d_concepts/modeling/geometry/geometry_splineobject_s26.py" target="_blank" rel="noopener noreferrer nofollow ugc">geometry_splineobject_s26.py</a> example, as it demonstrates all fundamental aspects of the type, including resizing it.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/71927</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/71927</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Wed, 28 Jun 2023 09:59:11 GMT</pubDate></item></channel></rss>