hi,
The tool UV Peeler must have some edge selected that will be used as seems. In this thread, you will find some useful information how to do that.
To Apply the UV Peeler you have two options. One using the script log that will write for you almost all the code you need or using the function SendmodelingCommand.
There is no public symbol defined for this tool, you need to use the value itself.
import c4d
from c4d import gui
# using the script log only
def MethodeOne():
def tool() -> c4d.plugins.BasePlugin:
return c4d.plugins.FindPlugin(doc.GetAction(), c4d.PLUGINTYPE_TOOL)
c4d.CallCommand(1031207) # UV Peeler
uvPeeler = tool()
uvPeeler[c4d.MDATA_UVPEELER_MIN_U] = 0.29
c4d.CallButton(uvPeeler, c4d.MDATA_UVPEELER_APPLY)
def main():
# using the fuinction SendModelingCommand.
# Parameter of the tool must be defined.
settings = c4d.BaseContainer()
settings[c4d.MDATA_UVPEELER_MIN_U] = 0.29
settings[c4d.MDATA_UVPEELER_MAX_U] = 1
settings[c4d.MDATA_UVPEELER_MIN_V] = 0
settings[c4d.MDATA_UVPEELER_MAX_V] = 1
settings[c4d.MDATA_UVPEELER_U_UNIFORMITY] = 1
settings[c4d.MDATA_UVPEELER_V_UNIFORMITY] = 0
# There is no symbol that define the UVPeeler tool id. Use the value instead.
res = c4d.utils.SendModelingCommand(command=1031207,
list=[op],
bc=settings,
doc=doc)
c4d.EventAdd()
# Execute main()
if __name__=='__main__':
main()
Cheers,
Manuel