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

    Display Control Issue

    Scheduled Pinned Locked Moved SDK Help
    17 Posts 0 Posters 1.2k 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 04/08/2011 at 11:28, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12.048 
      Platform:    Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Howdy,

      There's an issue with R12 display control and HyperNURBS.

      What I'm doing in ToolData::InitDisplayControl() is turning off the display of the HN Mesh using:

      displayBD->SetParameter(DescLevel(BASEDRAW_DISPLAYFILTER_SDS),GeData(FALSE),DESCFLAGS_SET_0);
      

      ... and then turning it back on in TooData::FreeDisplayControl() using:

      displayBD->SetParameter(DescLevel(BASEDRAW_DISPLAYFILTER_SDS),dispFilterSDS,DESCFLAGS_SET_0);
      

      ... the "dispFilterSDS" is a class member variable to store the current setting before turning it off.

      But, the viewport is still displaying the HN Mesh in R12.048. Seems like it was working fine in previous versions. At the moment, it works fine in R9.6 through R11.5. I can't remember if it was working in R12 versions prior to 12.048, because I don't have any of those versions installed anymore.

      Is this a bug, or did something change and I have to alter my code to accommodate the change?

      Adios,
      Cactus Dan

      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 11/08/2011 at 06:14, xxxxxxxx wrote:

        What is displayBD?

        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 11/08/2011 at 09:13, xxxxxxxx wrote:

          Howdy,

          That's simply a member variable to store the BaseDraw pointer when InitDisplayControl() is called to be used when FreeDisplaycontrol() is called, since the BaseDraw is not passed to that function:

          displayBD = bd;
          

          Adios,
          Cactus Dan

          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 18/08/2011 at 09:00, xxxxxxxx wrote:

            Howdy,

            Any word on this?

            Or, is there a way to display the colors on the HyperNURBS mesh itself, when painting over the cage points?

            Adios,
            Cactus Dan

            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 22/08/2011 at 08:04, xxxxxxxx wrote:

              Sorry for the delay. I'll try to find an answer for this.

              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 22/08/2011 at 10:18, xxxxxxxx wrote:

                Howdy,

                Thanks, Matthias. 😉

                Adios,
                Cactus Dan

                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/11/2011 at 18:48, xxxxxxxx wrote:

                  Howdy,

                  Anything yet?

                  Adios,
                  Cactus Dan

                  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 01/12/2011 at 04:43, xxxxxxxx wrote:

                    Hi Dan, sorry for the late reply.

                    Or, is there a way to display the colors on the HyperNURBS mesh itself, when painting over the cage points?

                    As far as I know not, or maybe over a scene hook. The vertex map tag seems to do something like this. The joint weight painting on the other hand requires the user to disable the HyperNURBS before painting.

                    Btw. I was able to switch on/off the HyperNURBS display filter in Init/FreeDisplayControl without problems.

                    Here my test code:

                      
                    class LiquidToolData : public ToolData  
                    {  
                      public:  
                          LiquidToolData() { m_bdisplayfilter = TRUE; }  
                          virtual Bool InitDisplayControl(BaseDocument *doc, BaseContainer &data, BaseDraw *bd, const AtomArray *active);  
                          virtual void FreeDisplayControl(void);  
                          virtual Bool DisplayControl(BaseDocument *doc, BaseObject *op, BaseObject *chainstart, BaseDraw *bd, BaseDrawHelp *bh, ControlDisplayStruct &cds);  
                      
                      private:  
                          Bool m_bdisplayfilter;  
                    };  
                      
                    Bool LiquidToolData::InitDisplayControl(BaseDocument *doc, BaseContainer &data, BaseDraw *bd, const AtomArray *active)  
                    {  
                      GeData d;  
                      
                      if (!bd->GetParameter(DescLevel(BASEDRAW_DISPLAYFILTER_SDS), d, DESCFLAGS_GET_0)) return FALSE;  
                      
                      m_bdisplayfilter = d.GetBool();  
                      
                      return bd->SetParameter(DescLevel(BASEDRAW_DISPLAYFILTER_SDS), GeData(FALSE), DESCFLAGS_SET_0);  
                    }  
                      
                    void LiquidToolData::FreeDisplayControl()  
                    {  
                      BaseDocument *doc = NULL;  
                      doc = GetActiveDocument();  
                      if (!doc) return;  
                      
                      BaseDraw *bd = NULL;  
                      bd = doc->GetActiveBaseDraw();  
                      if (!bd) return;  
                      
                      bd->SetParameter(DescLevel(BASEDRAW_DISPLAYFILTER_SDS), m_bdisplayfilter, DESCFLAGS_SET_0);  
                    }  
                      
                    Bool LiquidToolData::DisplayControl(BaseDocument *doc, BaseObject *op, BaseObject *chainstart, BaseDraw *bd, BaseDrawHelp *bh, ControlDisplayStruct &cds)  
                    {  
                      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 01/12/2011 at 09:06, xxxxxxxx wrote:

                      Howdy,

                      Thanks for the reply Matthias, but your code isn't actually working. It's only turning on the display of the cage mesh, so that both the cage mesh and the HyperNURBS mesh are displaying.

                      I copied your code to the Liquid tool in the sdk project, and here is the result:

                      You can see that both the cage mesh and the HyperNURBS mesh are displaying.

                      That creates a problem with my weight painting tool with both meshes visable:

                      Maybe your test object was such that when the cage mesh displayed, it completely covered the HyperNURBS mesh? Can you test it again on your end?

                      Adios,
                      Cactus Dan

                      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 02/12/2011 at 05:59, xxxxxxxx wrote:

                        Yeah, you are right. I think it's neccesary to really disable the HyperNURBS.

                        I have asked the developers about the HyperNURBS coloring. I'll let you know when I get an answer.

                        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 02/12/2011 at 06:01, xxxxxxxx wrote:

                          Howdy,

                          Maybe it is a bug or something, because it was working fine prior to R12?

                          Adios,
                          Cactus Dan

                          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 02/12/2011 at 06:15, xxxxxxxx wrote:

                            Btw. my code is simply disabling the HN Mesh display filter. This should not cause to display both the control mesh and the HN mesh. Maybe there is something else in your code or test scene?

                            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 02/12/2011 at 07:01, xxxxxxxx wrote:

                              Howdy,

                              Yes, the code you posted is supposed to turn off the HN display, but it isn't. What it's doing instead is simply turning on the display of the control mesh's polygons.

                              Here is your code with a simple cube in a HyperNURBS:

                              The display is set to lines so you can see that the HN mesh is only hidden by the cube, but it is still displaying.

                              That's why I'm thinking it is a bug or something.

                              Edit:
                              Could it also be that prior to R12 is where the bug is that was allowing it to work from within a tool's display control when it wasn't supposed to work there?

                              Adios,
                              Cactus Dan

                              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 02/12/2011 at 07:19, xxxxxxxx wrote:

                                I need to do make some more tests. I'll let know as soon as I find out something.

                                Btw. I got an answer on the HyperNURBS coloring. This is not really possible or at least requires alot of drawing on your side.

                                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 02/12/2011 at 07:39, xxxxxxxx wrote:

                                  Howdy,

                                  OK, thanks.

                                  I'm also considering to test moving the code to turn HN off and on, up to the ToolData::Init() and ToolData::Free() functions to see if it will work there.

                                  It's just that it worked so nicely before R12 from within the display control because when the user selected an object that was not a joint weighted to the skin, the HN display would return, and it would be nice to see it working that way again. That's how it worked with the Claude Bonet tool.

                                  Adios,
                                  Cactus Dan

                                  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 24/12/2011 at 15:11, xxxxxxxx wrote:

                                    Howdy,

                                    Well, I moved the code to turn off HyperNURBS to the ToolData::Init() and to turn it back on in the ToolData::Free() and it works from there.

                                    This seems to confirm my sus**cion that the issue of it not working from the display control functions, is an R12/R13 bug.

                                    Adios,
                                    Cactus Dan

                                    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 05/01/2012 at 07:20, xxxxxxxx wrote:

                                      Howdy,

                                      So, is this issue a bug? And if so, will it be fixed at some point in R13?

                                      Adios,
                                      Cactus Dan

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