On 29/11/2017 at 04:13, xxxxxxxx wrote:
[Original Topic] Convert between SplineData and base container?
In a previous Topic, I learn how to create a default spline user data.
But there comes some other problems.
<1> If I want to use c4d.SplineData to set some value first, then turn it into a base container for adding it to user data,
<2> or use c4d.SplineData to change some value in a predefined "SplineData" base container,
how can I do?
On 29/11/2017 at 05:41, xxxxxxxx wrote:
def main() :
obj = doc.GetActiveObject()
if not obj: return
# Create Spline Data
bc = c4d.GetCustomDatatypeDefault(c4d.CUSTOMDATATYPE_SPLINE)
bc[c4d.DESC_NAME] = "Spline"
splineID = obj.AddUserData(bc)
# Assign default vaue
spline = c4d.SplineData()
obj[splineID] = spline
Basicly SplineData do not get a Basecontainer but it's the host objet that have one. And you copy or set this basecontainer that link to a SplineData.
On 29/11/2017 at 08:53, xxxxxxxx wrote:
Thank you for your patience and detail answer!
I learn a lot!
Thank you again!