Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Graphview OpenDialog id?

    Cinema 4D SDK
    r19 python
    3
    4
    542
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chuanzhenC
      chuanzhen
      last edited by

      graphview OpenDialog(id,master),How to set this id to make the xpresso tag open in the default layout?
      Thanks for any help!☺

      相信我,可以的!

      1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand
        last edited by ferdinand

        Hi,

        Assuming with the default layout you mean the layout you get when clicking on an exprsso node, 1001148 (the id of the "XPresso Editor" plugin) seems to do the trick. I did not bother trying to find the symbol for that ID, because I am not sure if there is even one in Python.

        import c4d
        
        """ All plugins that contain the substring "presso" in their name
        
        ===============================================================================
        Plugins with the ID 400009000:
        -------------------------------------------------------------------------------
        	<c4d.plugins.BasePlugin object called 'Start XPresso Calculation' with ID 4 at 0x00000181C3D07830>
        	child nodes: []
        ===============================================================================
        Plugins with the ID 1001145:
        -------------------------------------------------------------------------------
        	<c4d.plugins.BasePlugin object called 'XPresso Manager' with ID 4 at 0x00000181C3D07470>
        	child nodes: []
        ===============================================================================
        Plugins with the ID 1001138:
        -------------------------------------------------------------------------------
        	<c4d.plugins.BasePlugin object called 'XPresso Pool' with ID 4 at 0x00000181C3D07BB0>
        	child nodes: []
        ===============================================================================
        Plugins with the ID 1001148:
        -------------------------------------------------------------------------------
        	<c4d.plugins.BasePlugin object called 'XPresso Editor' with ID 21 at 0x00000181C3D07EB0>
        	child nodes: []
        ===============================================================================
        Plugins with the ID 1001149:
        -------------------------------------------------------------------------------
        	<c4d.plugins.BasePlugin object called 'XPresso' with ID 6 at 0x00000181C3D07F90>
        	child nodes: []
        """
        
        def main():
            # get the (first) expresso tag of the selected object
            tag = op.GetTag(c4d.Texpresso)
            if not tag:
                return
            # get the GvNodeMaster of that tag
            master = tag.GetNodeMaster()
            # open the graphview window for that master in the 'XPresso Editor' layout
            c4d.modules.graphview.OpenDialog(1001148, master)
        
        if __name__ == "__main__":
            main()
        

        Cheers
        zipit

        MAXON SDK Specialist
        developers.maxon.net

        chuanzhenC 1 Reply Last reply Reply Quote 0
        • chuanzhenC
          chuanzhen @ferdinand
          last edited by

          @zipit Thanks ,"id = 1001148" it work correctly☺

          相信我,可以的!

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by Manuel

            hello,

            ID_TREEVIEW_PLUGIN 1001145
            ID_EXPRESSION_PLUGIN 1001148
            ID_OPERATORPOOL_PLUGIN 1001138
            ID_EXPRESSION_TAG 1001149

            last one should be but it's not defined in python.
            ID_CALCULATE_PLUGIN 400009000

            cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • First post
              Last post