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

    DrawView update ISSUE

    Cinema 4D SDK
    python
    2
    7
    903
    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.
    • M
      mdk7b2
      last edited by mdk7b2

      DrawView update ISSUE

      I am developing a kind of, simple, "tweak tech" as follows:

      The second selected "tweak point" coordinates are used to place the first selected "tweak point" so
      both points result at the same coordinate, then the modeling command c4d.MCOMMAND_OPTIMIZE is called,
      sometimes "artifacts" lines appears, I noted such lines always point to "wolrd axis".

      when zoomming (finger mouse wheel) such lines desappear as shown in the .gif file,
      I have tried the following with little effect:

      c4d.DrawViews(c4d.DRAWFLAGS_FORCEFULLREDRAW, bd)
      c4d.EventAdd(c4d.EVENT_FORCEREDRAW)

      Is the an effective way for updating the view?

      thanks in advance.

      # The call secuence as follows:
      
      
      
      def MouseInput(self, doc, data, bd, win, msg):
      
      	...
      
      	def ExecuteTweak(self, bd):
      
      		...
      
      		self.DataDict[TP_Object].SetPoint(...) # setting the point at the second point coordinate
      		self.DataDict[TP_Object].Message(c4d.MSG_UPDATE)
      
      		...
      		
      		self.Optimize() # OptimizeSettings[c4d.MDATA_OPTIMIZE_UNUSEDPOINTS] = False
      	
      		c4d.DrawViews(c4d.DRAWFLAGS_FORCEFULLREDRAW, bd)
      		c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
      

      image at sdk_support(at)maxon(dot)net

      1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov
        last edited by

        Hello @mdk7b2,

        Thanks for reaching out to us. Your question is not forgotten and will be answered as soon as possible. Please, excuse the delay, it's a little busy time now.

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • M
          mdk7b2
          last edited by

          More evidence at sdk support email

          Thanks and take all the time you need i move on πŸ™‚

          1 Reply Last reply Reply Quote 0
          • i_mazlovI
            i_mazlov
            last edited by

            Hi @mdk7b2,

            Thanks for your patience and sorry for the delayed answer.

            I can clearly see the issue you're struggling with, however, I cannot reproduce it without a sample code. Without the code that demonstrates the issue I can only speculate on possible reasons, for example you might want to check c4d.MSG_POINTS_CHANGED and c4d.MSG_POLYGONS_CHANGED messages to explicitly declare the change of the object's geometry.

            To ease any further investigation, please, share a miminal code snippet that shows the issue.

            Cheers,
            Ilia

            MAXON SDK Specialist
            developers.maxon.net

            1 Reply Last reply Reply Quote 0
            • M
              mdk7b2
              last edited by

              I have testesd both option you mention with out solving the issue, I even tried c4d.MSG_CHANGE, soon I submit a sample code.
              Also I'll try a different approach with WELD command, i will search the forum on how to use it since the help doc on this command is not clear.

              Again: soon I submit a sample code.

              Thanks

              1 Reply Last reply Reply Quote 0
              • M
                mdk7b2
                last edited by

                ISSUE SOLVED

                Issue caused by a mess in the normals, yes my little knowledge in 3D makes me forget
                objects are not only vertex and polygons also normals.

                Check sdk_support(at)maxon(dot)net

                Thanks Maxon πŸ™‚

                1 Reply Last reply Reply Quote 0
                • i_mazlovI
                  i_mazlov
                  last edited by

                  Hi @mdk7b2,

                  Glad to hear and thank you for sharing your solution! πŸ‘

                  Good luck and let me know if you have any further questions.

                  Cheers,
                  Ilia

                  MAXON SDK Specialist
                  developers.maxon.net

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