Thank you very much! Now it is working.
0
Reputation
2
Posts
2
Profile views
0
Followers
0
Following
Best posts made by Christian 0
This user does not have any upvoted posts yet.
Latest posts made by Christian 0
RE: How can I use Plane Cut in Python
posted in Cinema 4D SDK •
How can I use Plane Cut in Python
posted in Cinema 4D SDK •
Hi!
How can I use the Plane Cut Tool with Python in Cinema4D. I tried the following code but it always fails and returns false as a result. Also: is it possible to specify coordinates by using a vertex (e.g. c4d.Vector(0,0,0) to specify the cut location?
obj = doc.GetActiveObject()
settings = c4d.BaseContainer() # Settings
settings[c4d.MDATA_KNIFEPLANE_MODE] = c4d.MDATA_KNIFEPLANE_MODE_REGION_A
settings[c4d.MDATA_KNIFEPLANE_PLANE_MODE] = c4d.MDATA_KNIFEPLANE_PLANE_MODE_LOCAL
settings[c4d.MDATA_KNIFEPLANE_PLANE] = c4d.MDATA_KNIFEPLANE_PLANE_XZ
result = c4d.utils.SendModelingCommand(
command=c4d.ID_MODELING_KNIFE_PLANE, # Use the ID of the modeling command for the cut tool
list=[obj],
mode=c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,
bc=settings,
doc=doc,
)