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

    SetDrawParameter & LineZOffset

    SDK Help
    0
    37
    22.8k
    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 28/09/2006 at 01:57, xxxxxxxx wrote:

      Aw.. damn.. you are right of couse.. what i told you can't work. It works fine for tools because they draw after objects. Even if you paint with inverted Z test, the next object will still paint above these lines.

      I'm wondering how bones are implemented. They seem to have no problem.

      Perhaps the only way to get your lines is to use a scenehook plugin. If you can make it draw after the objects drawpass, then you could just loop over all your bones and do the drawing as i mentioned it above.

      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 28/09/2006 at 09:33, xxxxxxxx wrote:

        Howdy,

        Well, it looks like a SceneHookData() may not work. The documentation says this: "This is a data class to register a function that will be called on every scene prepare, for example before redraw and before rendering." From what that says, it gets called before drawing, so that doesn't sound like it could work.

        I'm curious though, is it possible to call an object's Draw() function from within a tag's Draw() function, and would it be safe to do that? I mean if both tag and object Draw() functions are normally called from within the same thread, it should be safe, right? Maybe? It sounds logical, but then I don't have enough experience with C++ to know for sure.

        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 28/09/2006 at 14:27, xxxxxxxx wrote:

          You should really test when Draw is called. What the docs mention is about the Execute function.

          Theoretically it should be safe. However first you must get a pointer the corresponding ObjectData instance for your object. The safest way to do it is probably by using the message function with MSG_RETRIEVEPRIVATEDATA. And return/send whatever data you need. You could actually send the BaseDraw Pointer and call the object draw function as reaction on the message.

          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 28/09/2006 at 14:56, xxxxxxxx wrote:

            You can also get the node data using something like this (not illegal and it works) :

            MyObject* myo = static_cast<MyObject*>(obj->GetNodeData());

            This allows you to call methods in your ObjectData. Just make sure to check for NULL and heed the advice about virtual functions.

            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 28/09/2006 at 15:30, xxxxxxxx wrote:

              Howdy,

              Well, thanks for all the help, but I may end up abandoning the idea.

              I noticed that the tag's Draw() function gets called three times, and that seems a bit too often to be branching out to each joint just to draw them on top of the polygon mesh. :o(

              Anyway, I am curious to know how the bones are doing it, 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 29/09/2006 at 03:28, xxxxxxxx wrote:

                GetNodeData(), thanks for the hind. I was looking for something like this, but could not find it.

                I still suggest that using a SceneHook will work. It allows more control over when the drawing happens ( highlight pass ) and the draw function should always be called. I'm convinced that bones are drawn this way.

                It would be nice now to know for sure... Mikael ? David ?

                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 29/09/2006 at 09:28, xxxxxxxx wrote:

                  Howdy,

                  > Quote: Originally posted by Michael Welter on 29Β SeptemberΒ 2006
                  >
                  > * * *
                  >
                  > GetNodeData(), thanks for the hind. I was looking for something like this, but could not find it.
                  >
                  >
                  > * * *

                  Yes, I knew about that. It works well for being able to communicate between your plugin classes, to retrieve pointers to stored data.

                  > Quote: _I still suggest that using a SceneHook will work. It allows more control over when the drawing happens ( highlight pass ) and the draw function should always be called. I'm convinced that bones are drawn this way.
                  >
                  > * * *
                  _


                  I may give that a try, but maybe for the next update of the plugin. ;o)

                  > Quote: It would be nice now to know for sure... Mikael ? David ?
                  >
                  > * * *
                  >
                  > * * *

                  Yes, I would like to know for sure, too.

                  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 04/10/2006 at 11:43, xxxxxxxx wrote:

                    It's surely a hack to call the object's Draw() function from the tag's, but I can't see how it could be dangerous. More like code reuse... πŸ™‚
                    The Scenehook solution might be the simplest, though, provided that its Draw() function is always called after objects'.

                    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 05/10/2006 at 20:24, xxxxxxxx wrote:

                      Howdy,

                      Thanks Mikael, I'll consider giving that a try when I do another update. ;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 06/02/2007 at 13:48, xxxxxxxx wrote:

                        Dan,

                        Did you ever find a solution here and what was it? πŸ™‚

                        I am looking into something similar for my bones while some other related features are added.

                        If you went with a SceneHook, how do you do the drawing? Do you recurse the document's objects for you own and draw them then?

                        Thanks!

                        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 06/02/2007 at 13:58, xxxxxxxx wrote:

                          Howdy,

                          Nope, not yet. :o(

                          Actually, I haven't tried it anymore, and just went on to other things.

                          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 06/02/2007 at 14:18, xxxxxxxx wrote:

                            Hello Dan,

                            Nothing huh?

                            Well, if I find a way, it will be posted here. πŸ™‚

                            Thanks!

                            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 06/02/2007 at 14:25, xxxxxxxx wrote:

                              Howdy,

                              Cool, good luck with it.

                              It just seemed like too much to do, and there were more important things for me to solve.

                              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 03/06/2007 at 11:10, xxxxxxxx wrote:

                                Howdy,

                                OK, I think I'm going to give this a shot again, but I have no idea how to use a scene hook or how to even set one up. There is no example of a SceneHookData plugin in the SDK project. I've found some bits and pieces of code here on the cafe, but not a complete example.

                                I'm going to see if I can figure this out from the bits and pieces, but I'll welcome any complete example anyone is willing to share. πŸ˜‰

                                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 04/06/2007 at 22:56, xxxxxxxx wrote:

                                  Howdy,

                                  Well, I figured out how to set up the SceneHookData and it works!

                                  Seems that if I draw in screen coordinates using the 2D drawing functions, it draws on top of the polygon mesh using the SCENEHOOKDRAW_ACTIVE_PASS flag. Since I'm only drawing lines anyway, that works out great.

                                  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 05/06/2007 at 12:44, xxxxxxxx wrote:

                                    Great news, Dan!

                                    Please post a screenshot so we can see the cool results (this could be over at CGTalk if you like).

                                    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 05/06/2007 at 13:46, xxxxxxxx wrote:

                                      Howdy,

                                      Here is the result:

                                      I had to write my own dotted line drawing routine, though, using BaseDraw's Point2D() function.

                                      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 05/06/2007 at 21:36, xxxxxxxx wrote:

                                        Very nice, Dan. I may have to speak with you on how you accomplished this with a SceneHook in the future. πŸ™‚

                                        Take care,

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