THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/02/2011 at 08:02, xxxxxxxx wrote:
Well, nearly any button
Just to know how it works.
But let's take the mark missing textures button for example.
The DescID is IDC_TEXTURE_CHECKALLTEX.
Do you know a way to access it ?
I also tryed to implement the functions of the Button into my Layout via MenuAddCommand, but without any success.
import c4d, os
from c4d import *
from c4d import storage
from c4d.gui import GeDialog
BTN_VRAY = {"id": 1028, "name": "CHK_Alle ersetzen", "width": 8, "height": 8}
BTN_Test = {"id": 1029, "name": "Texturpfad ersetzen", "width": 150, "height": 25}
TXT_VRAY = {"id": 1030, "name": "Alle ersetzen", "width": 100, "height": 10, "borderstyle": BORDER_NONE}
class MyDialog(GeDialog) :
def CreateLayout(self) :
self.SetTitle("MyDialog")
self.AddButton(id = BTN_Test["id"],
flags=BFH_RIGHT,
initw=BTN_Test["width"],
inith=BTN_Test["height"],
name=BTN_Test["name"])
if self.MenuAddCommand (c4d.IDM_CM_CLOSEWINDOW) == True:
print "Done"
return True
def Command(self,id,msg) :
if id==BTN_Test["id"]:
MenuAddCommand (c4d.IDM_CM_CLOSEWINDOW) == True
return True
dialog = MyDialog()
dialog.Open(dlgtype=DLG_TYPE_MODAL_RESIZEABLE)