Created
January 10, 2017 18:36
-
-
Save MikeUdin/d0cc84c7be28aa1d6fb2928852f84dc0 to your computer and use it in GitHub Desktop.
Script creates new Sweep Nurbs object from selected edge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import c4d | |
from c4d import utils | |
# This script creates new Sweep Nurbs object from selected edge | |
# Author: Mike Udin, | |
# Tutorial here http://mikeudin.net/2017/01/10/cinema-4d-python-send-modelling-command | |
# 2016 | |
def main(): | |
settings = c4d.BaseContainer() | |
res = utils.SendModelingCommand(command = c4d.MCOMMAND_EDGE_TO_SPLINE, | |
list = [op], | |
mode = c4d.MODELINGCOMMANDMODE_EDGESELECTION, | |
bc = settings, | |
doc = doc) | |
sweep = c4d.BaseObject(5118) | |
circle = c4d.BaseObject(5181) | |
circle[c4d.PRIM_CIRCLE_RADIUS] = 5 | |
circle.InsertUnder(sweep) | |
op.GetDown().InsertAfter(circle) | |
doc.InsertObject(sweep) | |
c4d.EventAdd() | |
if __name__=='__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment