Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > Bug Reports
  New Posts New Posts
  FAQ FAQ  Forum Search

[Python] SendModelingCommand()

Author
Message
  Topic Search Topic Search
no photo View Drop Down
Member
Member


Joined: 2003 Jan 17
Online Status: Offline
Posts: 15
Direct Link To This Post Topic: [Python] SendModelingCommand()
    Posted: 2016 Dec 02 at 1:21pm

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



Edited by no photo - 2016 Dec 02 at 1:21pm
Back to Top
Yannick Puech View Drop Down
Forum Moderator
Forum Moderator


Joined: 2011 Apr 13
Location: Spain
Online Status: Offline
Posts: 1143
Direct Link To This Post Posted: 2016 Dec 05 at 2:39am
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.



MAXON
Developer Support
Back to Top
no photo View Drop Down
Member
Member


Joined: 2003 Jan 17
Online Status: Offline
Posts: 15
Direct Link To This Post Posted: 2016 Dec 05 at 7:15am
Hi Yannick,

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



Back to Top

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.