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

    BaseDraw

    PYTHON Development
    0
    5
    787
    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 21/02/2011 at 07:03, xxxxxxxx wrote:

      Hi Guys,

      Can somone explain me how to use the BaseDraw class right, or give me an example please ?

      Here's a code for the Python Generator Object:

        
      import c4d  
        
      def main() :  
          draw = doc.GetActiveBaseDraw()  
        draw.SetMatrix_Matrix(op,draw.GetMg())  
        draw.SetPen(c4d.Vector(255))  
        
        frame = doc.GetTime().GetFrame(doc.GetFps())  
        draw.DrawCircle2D(0,50,frame)  
      

      The Circle only appears left top of the EditorView, but i want it to appear in the Coordinate System.

      And, just by the way: why does Cinema crash when i Save the Scene and open it again ? 😞
      I'm sure it has to do with

        
          draw = doc.GetActiveBaseDraw()
      

      Much thanks in advance !!
      nux

      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/02/2011 at 11:32, xxxxxxxx wrote:

        Nobody knows ? 😕

        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/02/2011 at 12:25, xxxxxxxx wrote:

          Hi, to use the BaseDraw for drawing operations you have to use it in the drawing context.
          The Python Generator offers no drawing context, this is only possible in Plugins.

          To draw in the viewport you can override ObjectData.Draw, TagData.Draw, ...
          The examples in the documentation contain examples how to do this.

          Cheers, Seb

          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 25/02/2011 at 07:26, xxxxxxxx wrote:

            It would be pretty useful actually if the Python Generator had a drawing context. Would there be a possiblity adding this to it ? 🙂

            Thanks for the reply,
            Niklas

            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 25/02/2011 at 08:05, xxxxxxxx wrote:

              The Python Generator is especially made for prototyping or render relevant objects. So other contexts are only available for plugins.

              Cheers, Sebastian

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