I have many splines and I want to put each spline in an extrude object.
I'm aware of the Extrude Hierarchical option.
In fact my problem is related to Edit-Optimize script from the PixelLab.The script was initially set just for one Extrude object,but someone has improved it to work with multiple objects,as you can see in the comments from the script website page https://www.thepixellab.net/editoptimize-free-c4d-script#comment-29203
But the problem is,that if you have many splines grouped in one Extrude object ,then the script will make just one editable object,but i need to produce separate editable objects from each of the splines.
If you have each spline in a separate Extrude object then the script will create separate editable objects.
That's why i wonder if there is a way to assign an Extrude object to each of the splines.
Or if somebody knows how to improve the script to work in that way,would be awesome!
Here is the script:
"""
Group Each
adamalbo
respect to bretbays
Name-US: join command
Description-US: makes youre object editable
"""
import c4d
from c4d import gui
def main():
doc.StartUndo()
sel=doc.GetSelection()
for x in sel:
co=c4d.BaseObject(1011010)
doc.AddUndo(c4d.UNDOTYPE_CHANGE, x)
xPos=x.GetMg()
xPosL=x.GetMl()
null=co
name=x.GetName()+ str ("_algn")
doc.AddUndo(c4d.UNDOTYPE_NEW, null)
null.SetName(name)
doc.InsertObject(null, None, x)
null.SetMg(xPos)
doc.SetSelection(null, c4d.SELECTION_ADD)
doc.SetSelection(x, c4d.SELECTION_SUB)
x.InsertUnder(null)
x.SetMg(xPos)
c4d.CallCommand(12236)
doc.SetSelection(null, c4d.SELECTION_ADD)
null.SetPhong(True,True,c4d.utils.Rad(80))
doc.EndUndo()
c4d.EventAdd()
if __name__=='__main__':
main()