On 28/01/2013 at 07:12, xxxxxxxx wrote:
Hi everybody, I'm newbie with this api although I've experience programming (not precisely python or coffee ) I've found than many times I wish fire a event..for example
the user select knife..I can't found in the documentation (I've not reading this so deep sorry) how know when the tool is used...would be interesting can use event-handler or nice callback for chain events:
c4d.CallCommand(<knife tool code> , lambda vectorOfCut: print("you cut in "+ vectorOfCut))
c4d.CallCommand(<knife tool code> , lambda _: c4d.CallCommand(<other tool>, print("both tools executed"))) #here when the first tool is executed fire my other tool
although the python lambdas are really limited I think than maybe this would be a good feature and not so hard to implement ...
On 28/01/2013 at 08:32, xxxxxxxx wrote:
first of all, c4d has some sort of event system, they are called messages and do come in
different versions of access and reach. in cpp you also have the option of scene hooks to
alter fundamentally the behaviour of c4d.
c4d.CallCommand is a scripting command and is not meant to pass any parameter
except for the toolid. there is c4d.utils.sendModelingcommand which gives you more
access to the tools, but it is also quite buggy. you will not be able to execute the
knife tool with smc. generally speaking you won't be able to execute modelling tools
programmatically with the sdk at a larger scale.