Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 06/04/2016 at 11:49, xxxxxxxx wrote:
Hi, guys! I'm trying to make my plugin window respond to the existence the selected objects in the Object Manager. I use this method in Dialog class:
def CoreMessage(self, id, msg) : if id == c4d.EVMSG_DOCUMENTRECALCULATED: doc = c4d.documents.GetActiveDocument() objs = (len(doc.GetActiveObjects(1))>0) if objs: self.SetBool(31,False) self.SetBool(30,True) else: self.SetBool(30,False) self.SetBool(31,True) self.SetString(13, self.core_mes[int(objs)]) for x in (30,23,24,60) : self.Enable(x,objs) # return True return True
Maybe there is something better for such cases? Because in this case the events count is too much, and I need only select objects in the OM. Thx! G M T
|
Звуковая функция ограничена 100 символами Настройки : История : Справка : Обратная связьЗакрыть
On 07/04/2016 at 02:34, xxxxxxxx wrote:
Hello,
I don't think there is any better solution. There is no special message that would be sent if just the object selection changes. So your solution is probably as good as it can get.
Best wishes, Sebastian