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

    Refreshing the viewport while calculating

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 671 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 09/06/2008 at 02:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hey

      During my plugin execution I am calculating the vertexpoints for a given heigth point, refining a octahedron (link to image) to a final object (link to image)

      After executing the plugin, the viewport is not beeing refreshed until the calculation has been completed.
      For the next step in my plugin I need a redraw while this mesh is build up. Is this possible ?

      Cheers
      Sascha

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 09/06/2008 at 02:41, xxxxxxxx wrote:

        What kind of plugin did you finally choose, generator. tag etc?

        Usally you have to send MSG_UPDATE message to the object and call the EventAdd() function.

        cheers,
        Matthias

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 09/06/2008 at 02:51, xxxxxxxx wrote:

          Hey Matthias,
          I finally chose a command plugin. Within the execute I am allocating camera, target null object and my polyObject, adding them to the doc and calling several functions creating a height field, adding recursivly the new vertices and building a triangle strip (the polyobject)

          Cheers
          Sascha

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 12/06/2008 at 02:21, xxxxxxxx wrote:

            I have tried a few things with several update messages at serveral position inside my code. I don't recognize a visual update, but a higher calculation time. It seems, that, within a CommanPlugin, an editor view update is not an easy task. I am no pro, but i assume, a CommandPlugin does not use a cache like an ObjectPlugin does? The function GetVirtualObject() is called continously in an ObjectPlugin, but otoh making it difficult to bring more than one object into the document...

            Cheers
            Sascha

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 19/06/2008 at 07:52, xxxxxxxx wrote:

              Well I think, since a CommandPlugin is non-threaded, it seems, my object wouldn't be updatable during the calculation process...

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 23/06/2008 at 02:14, xxxxxxxx wrote:

                It is important that you call DrawViews(). Little example

                > \> Bool MenuTest::Execute(BaseDocument \*doc) \> { \>      StopAllThreads(); \> \>      BaseObject \*op = doc->GetActiveObject(); \>      if(!op) return TRUE; \> \>      Random rnd; \>      rnd.Init(36363); \> \>      while(TRUE) \>      { \>           Vector pos = Vector(rnd.Get11()\*100.0, rnd.Get11()\*100.0, rnd.Get11()\*100.0); \> \>           op->SetPos(pos); \> \>           op->Message(MSG_UPDATE); \>           EventAdd(); \>           DrawViews(DA_NO_THREAD|DA_FORCEFULLREDRAW); \>      } \> \>      return TRUE; \> } \>

                cheers,
                Matthias

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 23/06/2008 at 07:51, xxxxxxxx wrote:

                  Hey Matthias,

                  Thanks for this hint.

                  HOLY MOTHER MARY GOD ! Is works in some way... but it runs soooooooo damn slow... Its better not to draw every polygon connected ^^

                  [Edit]
                  Yeah, every 100th or every 150th polygon is good deal

                  Cheers
                  Sascha

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