软件性质: | 脚本 |
---|---|
适用版本: | C4D R15 – C4D R16 – C4D R17 – C4D R18 |
软件版本: | Version: unknown |
系统平台: | Win?MAC |
软件语言: | 英文 |
C4D多边形分离脚本 DupePolysInPlace
DupePolysInPlace
Creates a copy of the selected polygons within the same object.
Either unzip the .py file into your scripts folder, or copy-paste the code below inside C4D’s Script Manager
- import c4d
- from c4d import gui
- def main():
- ? ? #——————————————————————-
- ? ? # change this to another tool you want to macro
- ? ? toolID = c4d.ID_MODELING_CLONE_TOOL
- ? ? #——————————————————————-
- ? ? previousTool = doc.GetAction()
- ? ? c4d.CallCommand(toolID)
- ? ? tool = c4d.plugins.FindPlugin(doc.GetAction(), c4d.PLUGINTYPE_TOOL)
- ? ? #——————————————————————-
- ? ? # attributes you want to setup before applying tool
- ? ? tool[c4d.MDATA_CLONE_CNT]? ?? ?? ?= 1
- ? ? tool[c4d.MDATA_CLONE_OFFSET]? ?? ?= 0.0
- ? ? tool[c4d.MDATA_CLONE_HOLES]? ?? ? = 0.0
- ? ? tool[c4d.MDATA_CLONE_SCALE]? ?? ? = 1.0
- ? ? tool[c4d.MDATA_CLONE_ROTATION]? ? = 0.0
- ? ? tool[c4d.MDATA_CLONE_LOCALMOVE]? ?= c4d.Vector(0.0, 0.0, 0.0)
- ? ? tool[c4d.MDATA_CLONE_LOCALSCALE]??= c4d.Vector(1.0, 1.0, 1.0)
- ? ? tool[c4d.MDATA_CLONE_LOCALROTATE] = c4d.Vector(0.0, 0.0, 0.0)
- ? ? tool[c4d.MDATA_CLONE_KEEPFORM]? ? = True
- ? ? #——————————————————————-
- ? ? c4d.CallButton(tool, c4d.MDATA_APPLY)
- ? ? doc.SetAction(previousTool)
- ? ? c4d.EventAdd()
- if __name__==’__main__’:
- ? ? main()
复制代码
评论0