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
    • Login

    Problem with a refresh

    SDK Help
    0
    23
    14.1k
    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
      Helper
      last edited by

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

      On 09/01/2008 at 15:50, xxxxxxxx wrote:

      sigh...

      I tried this:

      > tag- >Message(MSG_UPDATE);
      > mat->Message(MSG_UPDATE);
      > obj->Message(MSG_UPDATE);
      > EventAdd();

      I still only refreshes the first time. And I'm sure that I have the right tag because two lines above I change the projection on the same tag.

      The only thing that really works is sending an update to the document every time.

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

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

        On 09/01/2008 at 16:09, xxxxxxxx wrote:

        Have you considered C++? 🙂

        Although the MultiMessage() is not recommended, if it works continue using it. Though it's not good that it doesn't work in R9 at all.

        Another possibility is to do what you said you needed to do manually - deselect and reselect the tag. This can done in COFFEE by setting the BIT_ATAG with SetBit(), DelBit(), ToggleBit(). The problem is that I don't think that these work in R10 - because R10 has made these deprecated for a new set of flags and COFFEE isn't up-to-date to use them.

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

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

          On 09/01/2008 at 16:46, xxxxxxxx wrote:

          I heard people say that we have to push Maxon into putting more time into the C.O.F.F.E. developpment, and now I know why. Thought that it could handle such easy things like changing the projection of a material with a button.

          On the other hand this might be a good occasion for taking a look into C++ (which I once learned in school, but that was a loong time ago) 🙂

          I tried to use the
          > doc- >SetActiveTag(obj, tag);
          method to select a tag, but it seams that COFFEE doesn't provide a way to select NO tag.

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

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

            On 09/01/2008 at 16:55, xxxxxxxx wrote:

            Howdy,

            Did you try this:

            > _
            > doc- >SetActiveTag(obj, NULL);
            > _

            I'm not sure if that works in coffee, though.

            Adios,
            Cactus Dan

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

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

              On 09/01/2008 at 17:05, xxxxxxxx wrote:

              Yes, I get an error: Incompatible values... NIL / OBJECT

              🙂

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

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

                On 09/01/2008 at 17:29, xxxxxxxx wrote:

                Howdy,

                Hmmm, that's too bad. It works that way in C++. Maybe it IS a good time to check into C++. ;o)

                Adios,
                Cactus Dan

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

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

                  On 10/01/2008 at 03:42, xxxxxxxx wrote:

                  Yeah, so in the future I might flood this forum with a lot of noob questions about this and that in C++. So beware, I'm comming. 🙂

                  I'm probably going to change the username, lol

                  Anyway, thank you for your help, guys.

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

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

                    On 10/01/2008 at 03:46, xxxxxxxx wrote:

                    We are currently investigating why there is a refresh missing.

                    cheers,
                    Matthias

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

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

                      On 17/01/2008 at 08:59, xxxxxxxx wrote:

                      I think I blamed COFFEE for the wrong reason. C++ has the same problem.

                      > // setting the projection to UVW
                      > BaseContainer container = tag- >GetData();
                      > container.SetData(TEXTURETAG_PROJECTION, 6);
                      > tag->SetData(container);

                      Here I changed the projection of a texture tag 'tag'. Then I do a refresh with
                      > EventAdd(EVENT_FORCEREDRAW);
                      As already menshioned, this works only for the first time. After that I have to select and deselect the texture tag to make the changes happen. Selection/deselection another object doesn't refresh the scene, only selecting/deselection the texture tag.

                      I tried several way of doing the refresh in C++.
                      > tag- >Message(MSG_UPDATE);
                      > mat->Message(MSG_UPDATE);
                      > obj->Message(MSG_UPDATE);

                      I even tried to do the select/deselect mannually as stated by Robert, but none of these work. Only the first time they work.

                      And since C++ has no MultiMessage() Method I don't know how to make the changes except deleting the texture tag and creating a new one with the new projection.

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

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

                        On 17/01/2008 at 09:43, xxxxxxxx wrote:

                        To change the projection here, you need to use something like this:

                        tag- >SetParameter(DescLevel(TEXTURETAG_PROJECTION), GeData(TEXTURETAG_PROJECTION_UVW), 0L);

                        You'll find that some parameters can be set using its BaseContainer while others require using SetParameter(). The latter case mainly for parameters displayed in the Attributes Manager which are stored in Description resources.

                        A better way to work with BaseContainers in C++ is this:

                        BaseContainer* bc = tag- >GetDataInstance();
                        bc->SetX(id, value);

                        Hope that helps! 🙂

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

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

                          On 17/01/2008 at 10:09, xxxxxxxx wrote:

                          Yeah, I have read about the SetParameters. But the method via BaseContainer also works. He makes the changes, but doesn't display them.

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

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

                            On 17/01/2008 at 12:06, xxxxxxxx wrote:

                            It works - up to the point where the changes aren't updated in the A.M. That's why you must use SetParameter() for this. Think of the Description as a wrapper around the BaseContainer which stores the value as well as configuration of the gui element used in the A.M.

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

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

                              On 21/01/2008 at 06:58, xxxxxxxx wrote:

                              Turned out the missing refresh is a bug.

                              cheers,
                              Matthias

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