3
$\begingroup$

the question is simple - how to copy all the attributes of the curve data to another curve object by python? I need to make it look the same - same cutom bevel, same extrude, same offset... same attributes. Is there any simple python solution?

enter image description here

$\endgroup$
2
  • $\begingroup$ Just to make sure: You'd like to transfer all properties of one curve to another? $\endgroup$
    – brockmann
    Commented Jun 26, 2021 at 7:13
  • $\begingroup$ Yes - I've just uploaded the blend file as well. I am thinking about looping over all the attributes and copy them one by one by script. Or somehow replace just the curve itself and keep the attributes - that would be the most elegant solution - but I have no idea how to do that... If it would be Maya - you would just switch one node for another node - but in blender? $\endgroup$ Commented Jun 26, 2021 at 8:37

2 Answers 2

1
$\begingroup$

I think I've solved it! Instead of copying all the attributes (that would be overkill) I discovered - If I will join the curve into original curve - it will inherit all the properties. So I do that in python and then delete old curve data. Of course first I have to match all transforms... If I won't move the pivot, it seams like it's working!

$\endgroup$
1
  • $\begingroup$ Would be great to attach also the python code, so others can learn from you (including me :) ). Thank you $\endgroup$
    – vklidu
    Commented Jul 28, 2021 at 19:21
-1
$\begingroup$

if you hover over the menu entry with "python tooltips" checked in preferences, you see:

enter image description here

So ...

bpy.ops.object.make_links_data(type='OBDATA') should work.

$\endgroup$
1
  • $\begingroup$ This was the first thing I've tried. But it doesn't work - it will replace the curve completely, I need to keep the curve (squares) and transfer only "attributes" - bevel, offset, extrude etc... gyazo.com/2e975a14963aa69ff1d55175d8fbf75d $\endgroup$ Commented Jun 25, 2021 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .