Navigation

    • Register
    • Login
    • Search
    1. Home
    2. Ashton_FCS_PluginDev
    A

    Ashton_FCS_PluginDev

    @Ashton_FCS_PluginDev

    I am a 3D and Tech Artist
    & make plugins for Cinema 4D.๐Ÿ˜Š.
    www.artstation.com/fieldcreatorsstudios
    My_IG:
    https://www.instagram.com/ap_ashton_thecreator
    Gumroad:
    https://gumroad.com/fcstudios

    9
    Reputation
    15
    Posts
    232
    Profile views
    0
    Followers
    4
    Following
    Joined Last Online
    Website gist.github.com/ApAshton3DPluginDev Age 30

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    Ashton_FCS_PluginDev Follow

    Best posts made by Ashton_FCS_PluginDev

    RE: Goodbye

    Man thank you so much for all of your deep hard work and support, Sebastian. Best wishes for your new life chapter! and be safe. lol I still working on the node editor via Python ๐Ÿ˜‰ small demo vid for you: Node Graph Editor via C4D Python API Video
    I will share it with the c4d py devs community when I'am done.
    2020-02-16_17-40-38.png

    posted in Maxon Announcements •
    LinkBoxList and ProcessBar Cinema-4D GUI Script Example

    I just wanted to shared this with you y'all and for anyone who might need this.
    This Cinema 4D script allow you to see how a c4d.CUSTOMGUI_INEXCLUDE_LIST and c4d.CUSTOMGUI_PROGRESSBAR gui works. And this will also show, you can change or set the process bar color and other ui colors too.
    Quick video on how it works!
    GitHub Link
    2019-12-28_18-38-18.png
    Cheers!๐Ÿ˜Š
    ApAshton

    posted in General Talk •
    RE: Get all texture tags & show texture paths,but reflection channel throw error? :(

    For anyone who would like to use or learn from the script. You can download full script from github. ( Get And Copy Textures From Texture Tags )

    posted in Cinema 4D SDK •
    RE: Custom menu in C4D top menu bar with custom Python commands

    @BigRoy Hi and I am not to sure what you are asking for, but I hope this help you out, I didn't had time to type out a quick code but I hope these pics below help you.
    Now from what I know, you have to make a command plugin with a ID to add to your tool to the custom menu.
    So basically you need to make it a plugin so c4d can call or load your custom menu that is the (PluginMessage()) when the plugin is loaded. For scripts that's a no.

    These are how my studio tools menu look in c4d :
    2019-12-26_18-15-21.png
    2019-12-26_19-05-52.png

    This when you press V key button and the c4d pipe menu comes up :
    2019-12-26_18-17-04.png

    The code in your .pyp file :
    2019-12-26_18-08-26.png
    2019-12-26_18-12-52.png

    Cheers! ๐Ÿ‘ ๐Ÿ˜€
    If you anymore questions free to contact me I don't mine helping in the best way I can.
    Fackbook: https://www.facebook.com/ap.base.1
    Email: [email protected]

    posted in Cinema 4D SDK •
    RE: Add Commands to ShowPopupDialog

    @bentraje
    Hope this will help you out its a small demo I did.
    Quick video on how it look inside Cinema 4d. Here
    Download Demo Test : GitHub Link
    Code:

    # Imports
    import os
    import sys
    import c4d
    from c4d import plugins, gui, bitmaps, documents, storage, utils
    from c4d.gui import GeDialog as WindowDialog
    from c4d.plugins import CommandData, TagData, ObjectData
    
    iPath = os.path.join(os.path.dirname(__file__), 'res', "yourIcon.png")
    
    def CustomCommandPopupMenu():
        """" Popup Commands Ids Only Menu """
        menu = c4d.BaseContainer()
        menu.InsData(0, '') # Append separator
        menu.InsData(PLUG_2['ID'], "CMD")           # eg: menu.InsData(00000000, "CMD")
        menu.InsData(0, '') # Append separator
        menu.InsData(PLUG_3['ID'], "CMD")
        result = gui.ShowPopupDialog(cd=None, bc=menu, x=c4d.MOUSEPOS, y=c4d.MOUSEPOS)
        return True    
    
    class CMDTool(CommandData):
    
        def __init__(self, CMD):
            super(CMDTool, self).__init__()
            self.CMDTool = CMD
    
        def Init(self, op):
            return True
        def Message(self, type, data):
            return True
      
        def Execute(self, doc):
    
            if self.CMDTool == "PCT":
                CustomCommandPopupMenu()
    
            if self.CMDTool == "PCT1":
                gui.MessageDialog("PlugCafeTool2")
    
            if self.CMDTool == "PCT2":
                gui.MessageDialog("PlugCafeTool2")
    
        def RestoreLayout(self, sec_ref):
            return True
        def ExecuteOptionID(self, doc, plugid, subid):
            gui.MessageDialog("PlugCafeTool2 Options")
            return True
    
    # ----------------------------------------------------
    #               Plugin Registration
    # ----------------------------------------------------
    #  // Plugin Flags Tpyes  //
    class PluginFlags:
        """ Register Info Plugin Flags Tpyes """
        # Plugin General Flags :
        HidePlugin = c4d.PLUGINFLAG_HIDE
        HideTool = c4d.PLUGINFLAG_HIDEPLUGINMENU
        RefreshPlugin = c4d.PLUGINFLAG_REFRESHALWAYS
        SmallNodePlugin = c4d.PLUGINFLAG_SMALLNODE
        # Command Plugin Flags:
        OptionGear = c4d.PLUGINFLAG_COMMAND_OPTION_DIALOG   # A info flag / Command has additional options. The user can access them through a small gadget.
        # Tag Plugin Flags :
        TagVis = c4d.TAG_VISIBLE                            # The tag can be seen in the object manager.
        TagMul = c4d.TAG_MULTIPLE                           # Multiple copies of the tag allowed on a single object.
        TagHier = c4d.TAG_HIERARCHICAL                      # The tag works hierarchical, so that sub-objects inherit its properties (e.g. the material tag).
        TagExp = c4d.TAG_EXPRESSION                         # The tag is an expression.
        TagTem = c4d.TAG_TEMPORARY                          # Private.
        # Object Plugin Flags:
        oMod = c4d.OBJECT_MODIFIER                          # Modifier object. Deforms the surrounding object. (E.g. bend.)
        oHier = c4d.OBJECT_HIERARCHYMODIFIER                # Hierarchical modifier. Deforms the surrounding objects together with other instances in a hierarchy chain. Only the top-most instance of the plugin in a chain is called. (E.g. bones.)Hierarchical modifier. Deforms the surrounding objects together with other instances in a hierarchy chain. Only the top-most instance of the plugin in a chain is called. (E.g. bones.)
        oGen = c4d.OBJECT_GENERATOR                         # Generator object. Produces a polygonal or spline representation on its own. (E.g. primitive cube.)
        oInput = c4d.OBJECT_INPUT                           # Used in combination with OBJECT_GENERATOR. Specifies that the generator uses builds a polygon or spline, using its subobjects as input. (E.g. Sweep Subdivision Surface, Boolean.)
        oPart = c4d.OBJECT_PARTICLEMODIFIER                 # Particle modifier.
        oSpline = c4d.OBJECT_ISSPLINE                       # The object is a spline.
        oCamera = c4d.OBJECT_CAMERADEPENDENT                # Camera dependent.
        oPointObj = c4d.OBJECT_POINTOBJECT                  # Point Object.
        oPolyObj = c4d.OBJECT_POLYGONOBJECT                 # Polygon object.
    PF = PluginFlags()
    # // Register Plugin Add-on Tool Tpyes to Cinema 4D //
    def RegisterCommandData(id, str_name, infoflags, iconName, helpInfo, dataClass):
        """ A CommandData Tool Plugin Register """
        DESCRIPTIONS = "" #ToolInfo_Description(helpInfo)
        plugin_Icon = c4d.bitmaps.BaseBitmap()
        plugin_Icon.InitWith(iconName)
        result = plugins.RegisterCommandPlugin(id=id,                       # Plugin register ID.
                                            str=str_name,                   # This is for the Plugin Name to show in the Plugins lic4d.storage.
                                            info=infoflags,                 # If you want a option button once you have a ExecuteOptionID in Data Class, 
                                                                            # then put in Flags info=c4d.PLUGINFLAG_COMMAND_OPTION_DIALOG|c4d.PLUGINFLAG_COMMAND_HOTKEY,
                                            icon=plugin_Icon,               # Plugin Icon Image.
                                            help=DESCRIPTIONS,              # The plugin help info is on what the plugin does.
                                            dat=dataClass)                  # The plugin data class.
        return True
    # // Register Tools // 
    PLUG_1 = {'ID':1050002, 'Icon':iPath, 'Name':"CommandTools Menu",'flags':0, 'Data':CMDTool("PCT"), 'Info':""}
    PLUG_2 = {'ID':1051421, 'Icon':iPath, 'Name':"PlugCafeTool-1", 'flags':PF.HideTool, 'Data':CMDTool("PCT1"), 'Info':""}
    PLUG_3 = {'ID':1054336, 'Icon':iPath, 'Name':"PlugCafeTool-2", 'flags':PF.HideTool|PF.OptionGear, 'Data':CMDTool("PCT2"), 'Info':""}
    
    if __name__ == '__main__':
        dir, file = os.path.split(__file__)
        RegisterCommandData(PLUG_1["ID"], PLUG_1["Name"], PLUG_1["flags"], PLUG_1["Icon"], PLUG_1["Info"], PLUG_1["Data"])
        RegisterCommandData(PLUG_2["ID"], PLUG_2["Name"], PLUG_2["flags"], PLUG_2["Icon"], PLUG_2["Info"], PLUG_2["Data"])
        RegisterCommandData(PLUG_3["ID"], PLUG_3["Name"], PLUG_3["flags"], PLUG_3["Icon"], PLUG_3["Info"], PLUG_3["Data"])
    

    cheers & good luck!
    Ap Ashton

    posted in Cinema 4D SDK •
    RE: Attach XPresso Graph to GUI via Python

    A little update on the node editor via Python ๐Ÿ˜‰ small demo: Node Graph Editor via C4D Python API Video
    I will share with the c4d py devs community when I'am done with this beast of a script.
    2020-02-16_17-40-38.png

    posted in Cinema 4D SDK •

    Latest posts made by Ashton_FCS_PluginDev

    RE: The console does not correctly recognize object properties

    hi,
    I see you trying to see your properties active from your object or tag plugin. Well just try to delete your (symbolcache file) and restart c4d and it will be fix.
    lol I is run into this all the time when making NodeData Plugins.
    5ecb46fb-00fa-4221-84b8-faaacc0472c7-image.png

    cheers

    posted in Cinema 4D SDK •
    RE: Why ToolData Plugin Not Keeping the Input Data Values to the GUI Widgets SubDialog?

    @m_magalhaes Thank you! and it makes sense.๐Ÿ‘ Heres a update of the code and Demo Video. And hope it helps anyone who might need this or was wondering how a simple Tool Data GUI works.
    172b5199-9a7e-42d0-bf04-85d53307e59e-image.png
    You see I just add the AddComboBox, AddEditText for testing also. ๐Ÿ˜Š ๐Ÿ‘
    Code in .pyp file:

    #  // Imports for Cinema 4D //
    import c4d
    from c4d import plugins, gui, bitmaps, documents, storage, utils
    import os
    import sys
    
    PLUGIN_ID = 1054512
    
    def GetDataFromLinkBox(ui_ins, uiLinkID):
        DATA = ui_ins.FindCustomGui(uiLinkID, c4d.CUSTOMGUI_LINKBOX).GetLink()
        objDATA = DATA
        objName = DATA.GetName()
        objGUID = DATA.GetGUID()
        return objDATA, objName, objGUID
    
    def SetDataFromLinkBox(ui_ins, uiLinkID, Data):
        LinkWidget = ui_ins.FindCustomGui(uiLinkID, c4d.CUSTOMGUI_LINKBOX)
        LinkWidget.SetLink(Data)
        return True
    
    
    class DemoDialog(gui.SubDialog):
        # Main Properties
        UIDATA_PARAMETERS = {}
        LinkBC = c4d.BaseContainer()
        IDUI_CUSTOMGRP_LINK1 = 1003
        IDUI_GRG_OBJ_GUID = 1004
        MODE_MENU = 1005
        MODE_MENU_LIST = {
                            "Mode 1":{'id':1, 'icon':"&i12298&"}, # (12298) # Model Icon Id (Eg:"&i12298&Model")
                            "Mode 2":{'id':2, 'icon':"&i12139&"}, # (12139) # Points Icon Id
                            "Mode 3":{'id':3, 'icon':"&i12187&"}  # (12187) # Polygons Icon Id
                         }
    
        def __init__(self, arg):
            # Checks if the argument passed is a dictionary
            if not isinstance(arg, dict):
                raise TypeError("arg is not a dict.")
            self.UIDATA_PARAMETERS = arg
    
        def CreateLayout(self):
            """ Window GUI elements layout that display to the User. """
            ui = self
            ui.GroupBegin(0, c4d.BFH_MASK, 2, 2, "", c4d.BFV_GRIDGROUP_EQUALCOLS)
            ui.AddStaticText(0, c4d.BFH_RIGHT, 0, 12, "Object:", c4d.BORDER_WITH_TITLE_BOLD)
            ui.AddCustomGui(ui.IDUI_CUSTOMGRP_LINK1, c4d.CUSTOMGUI_LINKBOX, "", c4d.BFH_MASK, 240, 12, ui.LinkBC) 
            ui.AddStaticText(0, c4d.BFH_RIGHT, 0, 12, "Object GUID:", c4d.BORDER_WITH_TITLE_BOLD)
            ui.AddEditText(ui.IDUI_GRG_OBJ_GUID, c4d.BFH_MASK, 240, 12)   
            ui.AddStaticText(0, c4d.BFH_RIGHT, 0, 12, "Modes:", c4d.BORDER_WITH_TITLE_BOLD)
            ui.AddComboBox(ui.MODE_MENU, c4d.BFH_SCALEFIT, 100, 15, False)
            for eachMode in sorted(ui.MODE_MENU_LIST):
                itemMode = ui.MODE_MENU_LIST.get(str(eachMode))           
                ui.AddChild(ui.MODE_MENU, itemMode['id'],  itemMode['icon']+str(eachMode))         
            ui.GroupEnd()
            return True
    
        def InitValues(self):
            """ Called when the dialog is initialized by the GUI / GUI's startup values basically. """
            SetDataFromLinkBox(ui_ins=self, uiLinkID=self.IDUI_CUSTOMGRP_LINK1, Data=self.UIDATA_PARAMETERS['grouplink'])
            self.SetString(self.IDUI_GRG_OBJ_GUID, self.UIDATA_PARAMETERS['grouplinkGUID'])
            self.SetLong(self.MODE_MENU, self.UIDATA_PARAMETERS['modeSelect'])
            return True
    
        def Command(self, id, msg):
            """ Excuting Commands for UI Widget Elements Functions. """
            if id == self.IDUI_CUSTOMGRP_LINK1:
                obj, objName, objID = GetDataFromLinkBox(ui_ins=self, uiLinkID=self.IDUI_CUSTOMGRP_LINK1)
                self.UIDATA_PARAMETERS['grouplink'] = obj
                self.UIDATA_PARAMETERS['grouplinkGUID'] = objID
                self.SetString(self.IDUI_GRG_OBJ_GUID, str(objID))
                print("Linked Object:{0} | ID:{1} | GUI-ID:{2}").format( objName, objID, id )
    
            if id == self.MODE_MENU:
                for i in self.MODE_MENU_LIST:
                    getModeID = self.MODE_MENU_LIST.get(str(i))
                    if self.GetLong(self.MODE_MENU) == getModeID["id"]:
                        self.UIDATA_PARAMETERS['modeSelect']=getModeID["id"]
            return True
    
    class PyToolDemo(plugins.ToolData):
    
        def __init__(self):
            self.UI_DATA = { 'grouplink':None, 
                             'grouplinkGUID':None,
                             'modeSelect':2 }
    
        def GetState(self, doc):
            if doc.GetMode()==c4d.Mpaint:
                return 0
            return c4d.CMD_ENABLED 
        def InitDefaultSettings(self, doc, data):
            pass
        def InitTool(self, doc, data, bt):
            return True
        def KeyboardInput(self, doc, data, bd, win, msg):
            return True
        def MouseInput(self, doc, data, bd, win, msg):
            return True
        def GetCursorInfo(self, doc, data, bd, x, y, bc):
            return True
    
        def AllocSubDialog(self, bc):     
            return DemoDialog(getattr(self, "UI_DATA", self.UI_DATA))
    
    if __name__ == "__main__":
        bmp = bitmaps.BaseBitmap()
        dir, file = os.path.split(__file__)
        fn = os.path.join(dir, "res", "tool_icon.tif")
        bmp.InitWith(fn)
        plugins.RegisterToolPlugin(id=PLUGIN_ID, 
                                    str="MyPyToolDemo",
                                    info=0, 
                                    icon=bmp, 
                                    help="Your Data Staying ToolData UI",
                                    dat=PyToolDemo())
    
    posted in Cinema 4D SDK •
    Why ToolData Plugin Not Keeping the Input Data Values to the GUI Widgets SubDialog?

    User Information:
    Cinema 4D Version: R19/R21;
    Platform: Windows ;
    Language(s) : Python ;

    Hello Everyone!
    This my first time making a tool data plugin. Now the problem is in R21 I drag the object into the link box and it don't stay and when I change the tool data or the settings dont stay , and i did this with other c4d gui widgets , eg: combobox, it just reset to the default value you set in the GeDialog.InitValues(). Now in R19 I drag the object into the link box and it stay but when I change the tool data or the settings dont stay.
    You can see the short streamable videos below on what is happen inside C4D and take look at the code also. I hope there a easy fix for this problem and not a bug. lol
    Inside R21: Video
    Inside R19: Video

    Code:

    import c4d
    from c4d import plugins, gui, bitmaps, documents, storage, utils
    import os
    import sys
    
    PLUGIN_ID = 1054512
    
    def GetDataFromLinkBox(ui_ins, uiLinkID):
        DATA = ui_ins.FindCustomGui(uiLinkID, c4d.CUSTOMGUI_LINKBOX).GetLink()
        objDATA = DATA
        objName = DATA.GetName()
        objGUID = DATA.GetGUID()
        return objDATA, objName, objGUID
    
    class DemoDialog(gui.SubDialog):
    
        UIDATA_PARAMETERS = {}
        LinkBC = c4d.BaseContainer()
        IDUI_CUSTOMGRP_LINK1 = 1003
    
        def __init__(self, arg):
            # Checks if the argument passed is a dictionary
            if not isinstance(arg, dict):
                raise TypeError("arg is not a dict.")
            self.UIDATA_PARAMETERS = arg
    
        def CreateLayout(self):
            ui = self
            ui.GroupBegin(0, c4d.BFH_SCALEFIT, 2, 0, "")
            ui.AddStaticText(0, c4d.BFH_RIGHT, 0, 12, "Object:", c4d.BORDER_WITH_TITLE_BOLD)
            ui.AddCustomGui(ui.IDUI_CUSTOMGRP_LINK1, c4d.CUSTOMGUI_LINKBOX, "", c4d.BFH_MASK, 240, 12, ui.LinkBC)            
            ui.GroupEnd()
            return True
    
        def Command(self, id, msg):
    
            if id == self.IDUI_CUSTOMGRP_LINK1:
               obj, objName, objID = GetDataFromLinkBox(ui_ins=self, uiLinkID=self.IDUI_CUSTOMGRP_LINK1)
               self.UIDATA_PARAMETERS['grouplink'] = obj
               self.UIDATA_PARAMETERS['grouplinkGUID'] = objID
               print("Linked Object:{0} | ID:{1} | GUI-ID:{2}").format( objName, objID, id )
    
            return True
    
    class ToolDemo(plugins.ToolData):
    
        def __init__(self):
            self.UI_DATA = { 'grouplink':None, 'grouplinkGUID':None }
    
        def GetState(self, doc):
            if doc.GetMode()==c4d.Mpaint:
                return 0
            return c4d.CMD_ENABLED 
        def InitDefaultSettings(self, doc, data):
            pass
            # expects None as return value
        def InitTool(self, doc, data, bt):
            return True
        def KeyboardInput(self, doc, data, bd, win, msg):
            return True
        def MouseInput(self, doc, data, bd, win, msg):
            return True
        def GetCursorInfo(self, doc, data, bd, x, y, bc):
            return True
            
        def AllocSubDialog(self, bc):     
            return DemoDialog(getattr(self, "UI_DATA", self.UI_DATA))
    
    if __name__ == "__main__":
        bmp = bitmaps.BaseBitmap()
        dir, file = os.path.split(__file__)
        fn = os.path.join(dir, "res", "tool_icon.tif")
        bmp.InitWith(fn)
        plugins.RegisterToolPlugin(id=PLUGIN_ID, 
                                    str="MyPyToolDemo",
                                    info=0, 
                                    icon=bmp, 
                                    help="Tool",
                                    dat=ToolDemo())
    

    And I am just wondering is c4d.plugins.SculptBrushToolData is better system than c4d.plugins.ToolData. Cause it look like description .res.. UI is for the tool plugin is more easy, like Node Data, Object Data Tags etc....
    Any help would be very much appreciated.

    cheers, Ashton

    posted in Cinema 4D SDK •
    RE: Attach XPresso Graph to GUI via Python

    A little update on the node editor via Python ๐Ÿ˜‰ small demo: Node Graph Editor via C4D Python API Video
    I will share with the c4d py devs community when I'am done with this beast of a script.
    2020-02-16_17-40-38.png

    posted in Cinema 4D SDK •
    RE: Goodbye

    Man thank you so much for all of your deep hard work and support, Sebastian. Best wishes for your new life chapter! and be safe. lol I still working on the node editor via Python ๐Ÿ˜‰ small demo vid for you: Node Graph Editor via C4D Python API Video
    I will share it with the c4d py devs community when I'am done.
    2020-02-16_17-40-38.png

    posted in Maxon Announcements •
    RE: Add Commands to ShowPopupDialog

    @bentraje
    Hope this will help you out its a small demo I did.
    Quick video on how it look inside Cinema 4d. Here
    Download Demo Test : GitHub Link
    Code:

    # Imports
    import os
    import sys
    import c4d
    from c4d import plugins, gui, bitmaps, documents, storage, utils
    from c4d.gui import GeDialog as WindowDialog
    from c4d.plugins import CommandData, TagData, ObjectData
    
    iPath = os.path.join(os.path.dirname(__file__), 'res', "yourIcon.png")
    
    def CustomCommandPopupMenu():
        """" Popup Commands Ids Only Menu """
        menu = c4d.BaseContainer()
        menu.InsData(0, '') # Append separator
        menu.InsData(PLUG_2['ID'], "CMD")           # eg: menu.InsData(00000000, "CMD")
        menu.InsData(0, '') # Append separator
        menu.InsData(PLUG_3['ID'], "CMD")
        result = gui.ShowPopupDialog(cd=None, bc=menu, x=c4d.MOUSEPOS, y=c4d.MOUSEPOS)
        return True    
    
    class CMDTool(CommandData):
    
        def __init__(self, CMD):
            super(CMDTool, self).__init__()
            self.CMDTool = CMD
    
        def Init(self, op):
            return True
        def Message(self, type, data):
            return True
      
        def Execute(self, doc):
    
            if self.CMDTool == "PCT":
                CustomCommandPopupMenu()
    
            if self.CMDTool == "PCT1":
                gui.MessageDialog("PlugCafeTool2")
    
            if self.CMDTool == "PCT2":
                gui.MessageDialog("PlugCafeTool2")
    
        def RestoreLayout(self, sec_ref):
            return True
        def ExecuteOptionID(self, doc, plugid, subid):
            gui.MessageDialog("PlugCafeTool2 Options")
            return True
    
    # ----------------------------------------------------
    #               Plugin Registration
    # ----------------------------------------------------
    #  // Plugin Flags Tpyes  //
    class PluginFlags:
        """ Register Info Plugin Flags Tpyes """
        # Plugin General Flags :
        HidePlugin = c4d.PLUGINFLAG_HIDE
        HideTool = c4d.PLUGINFLAG_HIDEPLUGINMENU
        RefreshPlugin = c4d.PLUGINFLAG_REFRESHALWAYS
        SmallNodePlugin = c4d.PLUGINFLAG_SMALLNODE
        # Command Plugin Flags:
        OptionGear = c4d.PLUGINFLAG_COMMAND_OPTION_DIALOG   # A info flag / Command has additional options. The user can access them through a small gadget.
        # Tag Plugin Flags :
        TagVis = c4d.TAG_VISIBLE                            # The tag can be seen in the object manager.
        TagMul = c4d.TAG_MULTIPLE                           # Multiple copies of the tag allowed on a single object.
        TagHier = c4d.TAG_HIERARCHICAL                      # The tag works hierarchical, so that sub-objects inherit its properties (e.g. the material tag).
        TagExp = c4d.TAG_EXPRESSION                         # The tag is an expression.
        TagTem = c4d.TAG_TEMPORARY                          # Private.
        # Object Plugin Flags:
        oMod = c4d.OBJECT_MODIFIER                          # Modifier object. Deforms the surrounding object. (E.g. bend.)
        oHier = c4d.OBJECT_HIERARCHYMODIFIER                # Hierarchical modifier. Deforms the surrounding objects together with other instances in a hierarchy chain. Only the top-most instance of the plugin in a chain is called. (E.g. bones.)Hierarchical modifier. Deforms the surrounding objects together with other instances in a hierarchy chain. Only the top-most instance of the plugin in a chain is called. (E.g. bones.)
        oGen = c4d.OBJECT_GENERATOR                         # Generator object. Produces a polygonal or spline representation on its own. (E.g. primitive cube.)
        oInput = c4d.OBJECT_INPUT                           # Used in combination with OBJECT_GENERATOR. Specifies that the generator uses builds a polygon or spline, using its subobjects as input. (E.g. Sweep Subdivision Surface, Boolean.)
        oPart = c4d.OBJECT_PARTICLEMODIFIER                 # Particle modifier.
        oSpline = c4d.OBJECT_ISSPLINE                       # The object is a spline.
        oCamera = c4d.OBJECT_CAMERADEPENDENT                # Camera dependent.
        oPointObj = c4d.OBJECT_POINTOBJECT                  # Point Object.
        oPolyObj = c4d.OBJECT_POLYGONOBJECT                 # Polygon object.
    PF = PluginFlags()
    # // Register Plugin Add-on Tool Tpyes to Cinema 4D //
    def RegisterCommandData(id, str_name, infoflags, iconName, helpInfo, dataClass):
        """ A CommandData Tool Plugin Register """
        DESCRIPTIONS = "" #ToolInfo_Description(helpInfo)
        plugin_Icon = c4d.bitmaps.BaseBitmap()
        plugin_Icon.InitWith(iconName)
        result = plugins.RegisterCommandPlugin(id=id,                       # Plugin register ID.
                                            str=str_name,                   # This is for the Plugin Name to show in the Plugins lic4d.storage.
                                            info=infoflags,                 # If you want a option button once you have a ExecuteOptionID in Data Class, 
                                                                            # then put in Flags info=c4d.PLUGINFLAG_COMMAND_OPTION_DIALOG|c4d.PLUGINFLAG_COMMAND_HOTKEY,
                                            icon=plugin_Icon,               # Plugin Icon Image.
                                            help=DESCRIPTIONS,              # The plugin help info is on what the plugin does.
                                            dat=dataClass)                  # The plugin data class.
        return True
    # // Register Tools // 
    PLUG_1 = {'ID':1050002, 'Icon':iPath, 'Name':"CommandTools Menu",'flags':0, 'Data':CMDTool("PCT"), 'Info':""}
    PLUG_2 = {'ID':1051421, 'Icon':iPath, 'Name':"PlugCafeTool-1", 'flags':PF.HideTool, 'Data':CMDTool("PCT1"), 'Info':""}
    PLUG_3 = {'ID':1054336, 'Icon':iPath, 'Name':"PlugCafeTool-2", 'flags':PF.HideTool|PF.OptionGear, 'Data':CMDTool("PCT2"), 'Info':""}
    
    if __name__ == '__main__':
        dir, file = os.path.split(__file__)
        RegisterCommandData(PLUG_1["ID"], PLUG_1["Name"], PLUG_1["flags"], PLUG_1["Icon"], PLUG_1["Info"], PLUG_1["Data"])
        RegisterCommandData(PLUG_2["ID"], PLUG_2["Name"], PLUG_2["flags"], PLUG_2["Icon"], PLUG_2["Info"], PLUG_2["Data"])
        RegisterCommandData(PLUG_3["ID"], PLUG_3["Name"], PLUG_3["flags"], PLUG_3["Icon"], PLUG_3["Info"], PLUG_3["Data"])
    

    cheers & good luck!
    Ap Ashton

    posted in Cinema 4D SDK •
    LinkBoxList and ProcessBar Cinema-4D GUI Script Example

    I just wanted to shared this with you y'all and for anyone who might need this.
    This Cinema 4D script allow you to see how a c4d.CUSTOMGUI_INEXCLUDE_LIST and c4d.CUSTOMGUI_PROGRESSBAR gui works. And this will also show, you can change or set the process bar color and other ui colors too.
    Quick video on how it works!
    GitHub Link
    2019-12-28_18-38-18.png
    Cheers!๐Ÿ˜Š
    ApAshton

    posted in General Talk •
    RE: Custom menu in C4D top menu bar with custom Python commands

    @BigRoy Hi and I am not to sure what you are asking for, but I hope this help you out, I didn't had time to type out a quick code but I hope these pics below help you.
    Now from what I know, you have to make a command plugin with a ID to add to your tool to the custom menu.
    So basically you need to make it a plugin so c4d can call or load your custom menu that is the (PluginMessage()) when the plugin is loaded. For scripts that's a no.

    These are how my studio tools menu look in c4d :
    2019-12-26_18-15-21.png
    2019-12-26_19-05-52.png

    This when you press V key button and the c4d pipe menu comes up :
    2019-12-26_18-17-04.png

    The code in your .pyp file :
    2019-12-26_18-08-26.png
    2019-12-26_18-12-52.png

    Cheers! ๐Ÿ‘ ๐Ÿ˜€
    If you anymore questions free to contact me I don't mine helping in the best way I can.
    Fackbook: https://www.facebook.com/ap.base.1
    Email: [email protected]

    posted in Cinema 4D SDK •
    RE: Attach XPresso Graph to GUI via Python

    @s_bach Okay I will give it a try , and I will do a open source example project for anyone, who would love to do this with python only for Cinema 4D. lol I been making different types c4d python plugins for 3 years now, from 2015 for my studio I work for and I love making c4d plugins. But this will be my first time using GeUserArea Class to the fullest lol.๐Ÿคฃ

    posted in Cinema 4D SDK •
    RE: Attach XPresso Graph to GUI via Python

    @s_bach Okay I look at that tread, So pyQt is out of the window sense it's not good to use or wont work the right way and maxon is not going to add it or support it and don't do it for a commercial plugin, The only way is using c4d.gui.GeUserArea (GeUserArea) like Octane Node Graph and cmNodes. It will just be alot of work, when doing this with GeUserArea. I just want make sure I'm understanding everything correctly?

    posted in Cinema 4D SDK •