Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Register
    • Login

    Interact with Plugin Dialog [R21][Win][python]

    Cinema 4D SDK
    python r21 r20 r19
    3
    7
    867
    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.
    • P
      ph1lh00k
      last edited by Manuel

      Hi all,

      I'm new to C4D and to the forum (so please forgive me if I'm not posting correctly).

      As the title suggests, I'm struggling to figure out how to interact with a Plugin Dialog...

      After hours of searching online for a solution, the closest I got was this post - which doesn't seem to have a solution. ={

      Basically, I'm writing a script to automate the setup of assets in C4D... It imports models from one or more FBX files and then needs to apply some textures to them. I need to use an existing plugin to set up and apply the textures...

      I have the plugin ID, and I can load it with CallCommand, but then I can't seem to interact with the dialog at all. ={

      I've tried to use the CallButton and CallFunction commands, but get no response or return from them...?

      Any help would be very much appreciated.

      Thanks,
      Phil

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

        Hi,

        welcome to the forum. The most important thing to understand is that Cinema has two methods of describing GUIs: dialogs and descriptions. You can find more information about them here. c4d.CallButton() is only meant to work with descriptions and .CallFunction() is not related to your problem. So, if the plugin presents its GUI as a dialog, you are out of luck.

        It is difficult to give you any further advice without more information.

        1. Post the code you have written. It is impossible to see what is going wrong otherwise.
        2. Specify as precisely as possible what you are doing. Examples or simplifications (e. g. : I need a plugin, better: I need the plugin XYZ) are usually counterproductive.

        It is also worth mentioning that this scripting style of chaining commands to the application - a style one might be used to from other packages - is usually not the way to go in Cinema.

        Cheers
        zipit

        MAXON SDK Specialist
        developers.maxon.net

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

          hello and welcome to the forum,

          First, for your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here.

          • Q&A New Functionality.
          • How to Post Questions especially the tagging part.

          I've added the tags and marked this thread as a question so when you considered it as solved, please change the state 🙂

          About you question :

          We need to have a bit more informations. Are you coding in the script manager or somewhere else ? (python generator, python tag, a plugin)

          we have an example on how to import an obj that can be adapt to fbx.

          We also have an example on how to create material and assign to an objet

          And of course lots more examples that could help you to understand how it work.

          Of course don't hesitate to ask question on this forum.

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • P
            ph1lh00k
            last edited by

            Hi zipit, Manuel...

            Thanks for the replies.

            @Manuel, I did have a quick scan of the "How to Post Questions" post, but obviously misunderstood the tagging part. I added the "tags" in the title! =P Will be sure to look more closely next time.

            Ok, I'll try to flesh out the details a bit more...

            The steps are like this :

            • A standalone Python app allows the user to specify multiple "assets" to process.
            • Each asset has one or more fbx files and a set of textures.
            • The app writes out a "process" text file (with all the relevant data) for each asset to a process directory and then launches C4D.
            • I have a very basic ".pyp" file in the plugins directory that calls my python "processing" script on launch.
            • This script gets the list of "process" files and then iterates through them :
              • The FBX file(s) are imported into a fresh scene.
              • The plugin is loaded. (it's this one here - used to set up materials specifically for different renderers)
                Here is where I'm stuck. At this point I need to be able to :
              • Set a number of variables in a "c4d.gui.GeDialog" class...
              • Call a number of functions from the same class...

            Essentially, I need to be able to access variables and functions within a GeDialog class instance that has been loaded by a plugin... (I think that's the right way to put it)

            Thanks again,
            Phil

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

              Hi,

              that is not possible. The GeDialog of aCommandData plugin that you do not own, is not accessible to you (at least I am not aware of a way to do so).

              Cheers
              zipit

              MAXON SDK Specialist
              developers.maxon.net

              1 Reply Last reply Reply Quote 0
              • P
                ph1lh00k
                last edited by

                Hi zipit,

                I thought that might be the case... ={

                Ah well - I'll have to figure out another way... Thanks for your help.

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

                  hello,

                  I'll mark this thread as solved tomorrow if you have nothing to add.

                  Cheers,
                  Manuel

                  MAXON SDK Specialist

                  MAXON Registered Developer

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