BaseDraw.DrawPoints() not working?
On 22/02/2013 at 14:12, xxxxxxxx wrote:
Ultimately, I'm trying to draw a line in the GUI with many points. What I really need looks to be the "LineStrip" functions from C++ but luck would have it, doesn't appear it's supported in Python.
SO, I'm trying to use bd.DrawPoints to at least see somewhat of what a path looks like with dots. It asks for an iteratable object with vectors. I gave it a Python list of my points. It gives the error "Invalid Object Length". I'm not sure what makes my list invalid. I checked it and it's a full list of vector points. Certainly not null/None.
I noticed in the C++ version it expects a count before the array of points. I tried giving the function a manual count and it still error'd. What am I doing wrong? As usual the cryptic one sentence description on most functions barely helps.
On 22/02/2013 at 17:20, xxxxxxxx wrote:
yeah, it is (still) broken in python. i am using 3D handles as a replacement.
On 22/02/2013 at 17:55, xxxxxxxx wrote:
ugh. Well thanks for the heads up so I'm not chasing my tail. I guess I'll put in a report.
On 23/02/2013 at 08:10, xxxxxxxx wrote:
What's broken in DrawPoints?
I have some python plugins I wrote with my own custom spline class that lets me draw custom 2D splines (multiple lines with points) in the editor view like a HUD. And it uses bd.DrawPoints().
I'm not sure I understand what you're goal is Chris.
But a "line with many points" sounds a lot like a spline to me.
If that's what you're looking for. I can send you an example to look at.
On 23/02/2013 at 20:51, xxxxxxxx wrote:
A line with many points meaning, not interpolated with a few points using a built in Spline. Meaning a series of linear lines to a LOT of individual points that make up samples of where a camera is at every single frame. However, I have it all working now. I took little devil's advice and use draw handles for my points and I went back and tried DrawLine() and put it in a for loop reading of a list of vectors and I have both types now (point per frame path and solid line path)
On 23/02/2013 at 21:03, xxxxxxxx wrote:
Scott, I would be curious to see hoe you are calling DrawPoints though. I give it a list as it asked and I get invalid object length error. So I gave up. But the Handles are working beautifully.
On 23/02/2013 at 22:16, xxxxxxxx wrote:
Send me PM with your e-mail address Chris.
On 24/02/2013 at 11:50, xxxxxxxx wrote:
Thanks for the email with your class, Scott. I have to reply here as my outgoing mail server is down this weekend. I see your DrawPoints() is working. I wonder if it's because you implemented all of the arguments it asks for. In the SDK it has anything passed beyond vp in brackets as if it's optional, but I wonder if that's not the case.
I'm happy with where I landed with handles and Draw Line:
Here is what the two look like. Each of them is built by the sampled position where the camera will be throughout it's journey. The DrawHandle is used for dots (DRAWHANDLE_MINI) and the solid line is connecting them in a for loop with DrawLine()
Sold Line with DrawLine()
On 24/02/2013 at 12:28, xxxxxxxx wrote:
If I understand what you're saying.
My code proves that their is nothing wrong with the DrawPoints() function. Right?
I just want to be sure I'm not missing something.
On 24/02/2013 at 12:45, xxxxxxxx wrote:
It seems there's nothing wrong IF you implement ALL the parameters. But I only implemented the vp parameter as that's all that was said to be required in the SDK. The others were in brackets being optional. I did not implement those as I just wanted to get the points working, which they did not.
I haven't run your class yet (just looked at the code) so I didn't test on my machine, but I assume it works on yours?
On 24/02/2013 at 14:18, xxxxxxxx wrote:
The plugin I sent you works.
It draws 2D spline objects just fine and dandy.
But I also wanted to try and build in the option of being able to move the points of the splines around with the mouse after they are created.
I got hung up on that part. And haven't had time to go back and take another crack at it.