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

    [Python] SendModelingCommand()

    Bugs
    0
    3
    1.0k
    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.
    • H
      Helper
      last edited by

      On 02/12/2016 at 13:21, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   18 
      Platform:     Mac  ;  
      Language(s) :       PYTHON  ;

      ---------
      Hi,

      there seems to be an issue with c4d.utils.SendModelingCommand() using MCOMMAND_JOIN as command ID in Release 18.048.

      import c4d
      from c4d import gui
      #Welcome to the world of Python
        
      def main() :
          
          olist = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_0)   
          settings = c4d.BaseContainer()                 # Settings    
          res = c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_JOIN,
                                              list = olist,
                                              bc = settings,
                                              doc = doc)
                                          
          doc.InsertObject(res[0].GetClone())    
          c4d.EventAdd()
          
          
      if __name__=='__main__':
          main()
      

      While with Release 17 the results are as expected. SMC connects all selected objects.
      In R18.028 the result contains only one object of the selected object.

      Greets
      Peter

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 05/12/2016 at 02:39, xxxxxxxx wrote:

        Hi Peter,

        For MCOMMAND_JOIN to always work the objects to join must be children of a parent object, a null for instance.
        Pass the list argument as [null] with null the parent null object variable.

        The command worked pre-R18 with multi-selection of objects but now the objects to join have to be arranged under a parent object.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 05/12/2016 at 07:15, xxxxxxxx wrote:

          Hi Yannick,

          thank you for your explanation. I'll give it a try.
          Are there other Modeling IDs with a different behavior in R18?

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