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
    • Recent
    • Tags
    • Users
    • Login

    Get class outside of thread

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 198 Views
    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.
    • H Offline
      Helper
      last edited by

      On 05/03/2014 at 12:24, xxxxxxxx wrote:

      I am trying to find a way to call a plugin gui command.

      def Command(self, id, msg) :
                if id == 10008:
                          #do somthing
      

      inside of the Command() I have another class that is threaded

      class UserThread(C4DThread) :
      

      When that gets called and values are correct I want to call 10008 of Command() from within UserThread()

      using Command(self,10008) does not work.

      Any help would be appreciated.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 11/04/2014 at 07:37, xxxxxxxx wrote:

        You must apply proper data synchronization and have a queue that will contain data which
        is processed from the main thread which in turn invokes the Command() method.

        GeDialog.Timer() is quite useful to make sure you process the data within a certain
        time interval at least.

        Best,
        -Niklas

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