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

    "Reset to Default" issue

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 619 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 05/06/2012 at 15:34, xxxxxxxx wrote:

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

      ---------
      I created an object plugin and when I use the "Reset to Default" command to one of its parameters in the attributes manager the value will always be set to "0" instead of the value I defined in the objects init function.

      So where or how do I have to define preset values so that they will be recognized and used at a "Reset to Default"?

      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/06/2012 at 15:41, xxxxxxxx wrote:

        I've stumbled on something similar in Python but for me it turned out
        that the init value type and the parameter description mismatched.
        (One was a float the other something else, I can't remember right now)
        Maybe check for that?

        Cheers
        Lennart

        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/06/2012 at 16:27, xxxxxxxx wrote:

          Okay, I guess this problem could be the downside of using SetParameter as recommended by Matthias Bober instead of the GetDataInstance method.

          I think this way you maybe just alter a parameter value but don't set it as it's default value which remain unaffected by SetParameter, right?

          Edit:
          Or maybe I'm wrong!

          I now tried accessing the BaseContainer with GetDataInstance to set my base values but it didn't work either.

          When I right click the parameter in the attributes manager and choose "Reset to Default" it is set to zero again.

          And to countercheck I tried it with the spherify deformer example from the SDK with both methods and it worked in both cases as it should!?

          I'm still confused.

          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/06/2012 at 17:32, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            I've stumbled on something similar in Python but for me it turned out
            that the init value type and the parameter description mismatched.
            (One was a float the other something else, I can't remember right now)
            Maybe check for that?

            Cheers
            Lennart

            Hi Lennart,

            thanks for the hint, I checked it but it doesn't seems to be the problem here.

            Kind regards,
            Tom

            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 06/06/2012 at 08:44, xxxxxxxx wrote:

              Have you set default values in the overridden ObjectData::Init method?

              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 06/06/2012 at 12:57, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                Have you set default values in the overridden ObjectData::Init method?cheers,Matthias

                Yes

                Edit:
                Okay, I finaly hunted it down.
                I used the same (in this case not so unique) ID for my SNHookClass as for my ObjectData class in this concerned project.

                Oddly enough that worked so far, apart from the reset to default problem.

                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 13/06/2012 at 06:43, xxxxxxxx wrote:

                  Glad you solved it.

                  cheers,
                  Matthias

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