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

    How To Store Information

    SDK Help
    0
    14
    908
    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 23/08/2004 at 10:51, xxxxxxxx wrote:

      Yikes, I don't think that would be very effecient. What about an invisible selection tag for each collection of points? Or one of the others I mentioned (variable tag, base tag of type Tpoint)?

      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 23/08/2004 at 14:36, xxxxxxxx wrote:

        One advantage of the SelectionTag over the others is that it will be automatically updated during modeling. It isn't possible to hide the selection tag though.

        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 24/08/2004 at 10:35, xxxxxxxx wrote:

          In a nutshell I want to be able to persist a variable number of vertex arrays. What is the best practice for doing that?

          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 24/08/2004 at 10:53, xxxxxxxx wrote:

            I'd use SelectionTags. Each selection tag should have the same number of points, lines, or polygons (depending on selection type) as in the Object. The SelectionTag then just retains selected points (or lines, polygons) by setting the value to 1 for those selected in the SelectionTag, 0 for those not.

            Think of a SelectionTag as an array of boolean indices into the object's vertex, line, or polygon array which are turned on or off to create the selection. This array is stored in a BaseSelect attached to the SelectionTag.

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

              That sounds ideal except for Mikael Sterner's comment about them not supporting visiblity. If I have a lot of selection tags wouldn't that make things unwieldy?

              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 24/08/2004 at 12:59, xxxxxxxx wrote:

                Yes, it can be unwieldy. You should see imported Poser figures with polygon selections for groups and materials - it can go on forever! 🙂

                It all depends on what you need the selected vertex arrays for. If they are to be regular Selections that users or other features of C4D need (such as bone restrictions), then you are stuck with either SelectionTags or VertexMaps (work very similarly) and unwieldy lists of tags. If they are only for internal plugin use while performing some operations, you could get away with simple UCHAR arrays and set a BaseSelect using BaseSelect->FromArray() as needed.

                Point/Line/Polygon selections are store as UCHAR arrays inside a BaseSelect.

                Bone/Object Rotations/Positions/Scales are stored in a Transformation Matrix (see Set/GetMg and Set/GetMl).

                Other object parameters are stored in BaseContainers.

                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 24/08/2004 at 13:34, xxxxxxxx wrote:

                  Thanks for the advice, I really appreciate it! I'm pretty sure I would only need the data internally, but I would want it to persist. It's my understanding that in order to get automatic persistance, without using the ways mentioned above, would be to use the container. Perhaps I could create a custom data type? I believe the docs say a container can store a custom data type.

                  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 24/08/2004 at 14:39, xxxxxxxx wrote:

                    Haven't used custom data types yet, but this may be solution.

                    Good luck and let us know your solution!

                    Robert

                    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 30/08/2004 at 05:44, xxxxxxxx wrote:

                      Leebert, have you solved it? I too need to store an array of vectors into a basecontainer or something.

                      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 31/08/2004 at 06:13, xxxxxxxx wrote:

                        I've been spending my time with a paying project so I haven't gotten a chance to pursue this any further.  But I will definitely keep you updated once I can get back to it.

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