Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/07/2012 at 17:32, xxxxxxxx wrote:
Can I draw lines in the editor using BaseDraw through a python tag?
On 17/07/2012 at 01:08, xxxxxxxx wrote:
Yes, you can draw into the editor view overriding TagData.Draw(self, tag, op, bd, bh) : bd is the BaseDraw.
On 17/07/2012 at 01:13, xxxxxxxx wrote:
Thank you for the reply, Yannick. So, I assume that it is only possible for a .pype file, not for a python script tag.
On 17/07/2012 at 01:16, xxxxxxxx wrote:
Yes, that's fine if you're writing a TagData in python, and was my first reaction. Then I wondered if rui actually meant drawing in the editor using a python tag in the OM (i.e. right-click object, scripting tags, python).
From the look of it you should be able to. If you get the active document, then call ActiveBaseDraw on that, you should be able to draw in the designated render view in the editor. But I haven't tried it.
On 17/07/2012 at 01:28, xxxxxxxx wrote:
I am trying to do so, but the lines always appear traced (dashed) and I can't seem to find a way to make them solid. Also, I'm having a hard time drawing them in world coordinates.
On 17/07/2012 at 02:02, xxxxxxxx wrote:
Not sure about the dashed lines, but BaseView (from which BaseDraw is derived) has a screen to world coordinates function.
On 17/07/2012 at 04:34, xxxxxxxx wrote:
I will check it out Thank you.
On 17/07/2012 at 09:22, xxxxxxxx wrote:
Originally posted by xxxxxxxx From the look of it you should be able to. If you get the active document, then call ActiveBaseDraw on that, you should be able to draw in the designated render view in the editor. But I haven't tried it.
Originally posted by xxxxxxxx
You can't, the results are not the same. That might be the reason where the dashed lines come from Not quite sure who told me, but someone from the support did tell me that drawing is only allowed from the Draw() method. I also remember crashing C4D when I used to draw something within GetVirtualObjects().
On 17/07/2012 at 10:39, xxxxxxxx wrote:
Oh, ok... I will try to create a Tag plugin. Thank you.