Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    The slider tool returns False.

    General Talk
    r21 python
    2
    2
    518
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      x_nerve
      last edited by

      Hi:

      I try to use sliding tool, but utils.SendModelingCommand always returns False, whether edge mode, or point mode.May I ask why this is?

      import c4d
      from c4d import utils
      
      def main():
      
          settings = c4d.BaseContainer()
      
          settings[c4d.MDTA_SLIDE_OFFSET] = 5
          settings[c4d.MDTA_SLIDE_SHIFT] = 0
          settings[c4d.MDTA_SLIDE_OFFSET_MODE] = 0
          settings[c4d.MDTA_SLIDE_OFFSET_LIMIT] = 0
          settings[c4d.MDTA_SLIDE_CURVATURE] = 1
          settings[c4d.MDTA_SLIDE_CLONE] = 0
          settings[c4d.MDATA_INTERACTIVE] = 1
      
          utils.SendModelingCommand(command = c4d.ID_MODELING_SLIDE_TOOL,
                                      list = [op],
                                       mode = c4d.MODELINGCOMMANDMODE_EDGESELECTION,
                                      bc = settings, doc = doc)
      
          op.Message(c4d.MSG_UPDATE)
          c4d.EventAdd()
          
      
      if __name__=='__main__':
          main()
      
      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @x_nerve the ID used is not the correct one you should use: 431000021 for edge mode and 431000030 for point mode, unfortunately, there are no symbols for these tools.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 1
        • First post
          Last post