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

    Refresh Generator Object

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 374 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 08/09/2009 at 08:03, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R11 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      in the GetVirtualObject-method i create a PolgonObject with some values.
      If i change the values, the viewport doesn't refresh. I have to click somewhere in the interface and then it refreshs.
      I tried it with something like this.

      > \> op->Message(MSG_UPDATE);//and MSG_CHANGE \> EventAdd(EVENT_FORCEREDRAW); \>

      I also tried

      > DrawViews(DA_ONLY_ACTIVE_VIEW|DA_NO_THREAD|DA_NO_ANIMATION); //DrawViews(DA_NO_THREAD|DA_FORCEFULLREDRAW);

      I even overwrote the Message-method of the GeneratorObject without success.

      If i catch the MSG_GETCUSTOMICON-message in the Message-method and call EventAdd(EVENT_FORCEREDRAW); there, it works. But i don't like this dirty hack and i don't want to refresh everytime.

      Anybody an idea what i could try else?

      Thanks!

      cheers,
      Oli

      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 08/09/2009 at 08:07, xxxxxxxx wrote:

        It's hard to say, please post some simplified code showing the problem.

        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/09/2009 at 02:17, xxxxxxxx wrote:

          Ok, here some codesnips

          > \> //GetVirtualObjects \> BaseObject\* AixObject::GetVirtualObjects(PluginObject \*op, HierarchyHelp \*hh){ \>       \>      Bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA); \>       \>      if (!dirty){ \>            \>           return op->GetCache(hh); \>      } \>       \>      BaseContainer \*objectData = op->GetDataInstance(); \> \>      BaseObject \*ret = BaseObject::Alloc(Onull); \>       \>      if (!ret){ \> \>           blDelete(ret); \>           return NULL; \>      } \> \>         //...create PolygonObjects or SplineObjects \> \>      Free(polygonObject); \>      Free(splineObject); \>      segmentPoints.Free(); \>       \>      //refresh \>      EventAdd(EVENT_FORCEREDRAW); \>      DrawViews(DA_ONLY_ACTIVE_VIEW|DA_NO_THREAD|DA_NO_ANIMATION); //Tried this too DrawViews(DA_NO_THREAD|DA_FORCEFULLREDRAW); \>       \>      return ret; \> }      \>

          I also tried this.

          > \> //GetVirtualObjects \> BaseObject\* AixObject::GetVirtualObjects(PluginObject \*op, HierarchyHelp \*hh){ \>      //same as above \> \>     //refresh \>     op->Message(MSG_UPDATE); //tried also MSG_CHANGE \> \>    return ret; \> } \> \> //Message \> Bool AixObject::Message(GeListNode \*node, LONG type, void \*t_data){ \>       \>           if (type == MSG_UPDATE) \>      { \>           EventAdd(EVENT_FORCEREDRAW); \>       DrawViews(DA_ONLY_ACTIVE_VIEW|DA_NO_THREAD|DA_NO_ANIMATION);           \>           //DrawViews(DA_NO_THREAD|DA_FORCEFULLREDRAW); \>      } \> \> } \>

          cheers,
          Oli

          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 10/09/2009 at 05:37, xxxxxxxx wrote:

            You have to send the MSG_UPDATE message to the polygon object. Also please check the RoundedTube SDK example as this is a parametric generator which creates a polygon object.

            cheers,
            Matthias

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