BaseDraw

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

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 ? 😕

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

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

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