[Bf-committers] OOPS Parenting & Patch
car
bf-committers@blender.org
Fri, 4 Jun 2004 10:16:13 -0400
Can you zip the file or offer it on a server ? Copy and paste never
works for me.
On Jun 4, 2004, at 4:31 AM, Campbell Barton wrote:
> Hi, Added curved splines to OOPS.
> This looks nices and I recon is more useable... straight lines all
> over the place dont indicate very well whats going on... though a lot
> has to do with how the user sets up things..
>
> It works fine bit there are 2 issues.
> The line glMap1f(GL_MAP1_VERTEX_3, 0.0f, 100.0f, 3,
> 4,&ctrlPoints[0][0]);
> Only accepts points with 3 (XYZ) Locations, oops only needs X and Y
> since its 2D. Couldent find any command that used XY's onle so I have
> kept glMap1f as is.
> The other issue is that 100 may be too many steps to make up the
> spline. Since its only to look nice we might be able to do with ~40.
> Im not that fussed but sombody may want to change it.
>
> The Next think Id like to do is rewrite the shuffle code to take into
> account parent child hierarchy.
> - Cam
>
> Campbell Barton wrote:
>
>> I like the idea of users setting up parent/child stuff with the
>> mouse, as well as Key Shortcuts. since the key shortcuts allow you to
>> set up many children at once.
>>
>> Im lookin at adding spline curves to the oops view- I think it would
>> make links more obvious (as to where there going from/to)
>> Any comments on this?
>>
>> - Cam
>>
>> Matt Ebb wrote:
>>
>>>
>>> On 4 Jun 2004, at 2:41 AM, Alexander Ewering wrote:
>>>
>>>> Sorry, this is probably more appropriate for bf-funboard, but then
>>>> again,
>>>> I wasn't the one with the first post :-)
>>>
>>>
>>>
>>> No, incessant whining and flamebait is appropriate neither here nor
>>> on bf-funboard. It's getting tiresome and distracting. If you've got
>>> a concrete proposal or a relevant point to make, do it like Stephen,
>>> succinctly and on-topic.
>>>
>>> To try and be somewhat constructive here, well, it looks like
>>> there's a communication breakdown if two people on this list
>>> (including Campbell, an experienced professional user and developer)
>>> are unsure that this feature exists or of how it works. Indeed
>>> there's nothing in the interface that even suggests it's possible.
>>> In Shake, you can manipulate the layout of nodes freely, and then
>>> select them for editing by clicking on a UI control on the selected
>>> node. ( http://mke3.net:9000/blender/ui/misc/shake_node_sel.png ) We
>>> could adopt a similar method for the OOPS window, keeping the
>>> ctrl-click-to-activate behaviour, too. You know, right-brained
>>> artists wanting to think visually and all that crazy stuff... Who
>>> would have thought.
>>>
>>> Matt
>>
>>
>>
>>
>
>
> --
> Campbell J Barton
>
> 133 Hope Street
> Geelong West, Victoria 3218 Australia
>
> URL: http://www.metavr.com
> e-mail: cbarton@metavr.com
> phone: AU (03) 5229 0241
>
> Index: source/blender/src/drawoops.c
> ===================================================================
> RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawoops.c,v
> retrieving revision 1.13
> diff -u -r1.13 drawoops.c
> --- source/blender/src/drawoops.c 14 Mar 2004 16:59:46 -0000 1.13
> +++ source/blender/src/drawoops.c 4 Jun 2004 08:11:56 -0000
> @@ -129,8 +129,13 @@
> void draw_oopslink(Oops *oops)
> {
> OopsLink *ol;
> - float vec[4];
> -
> + float ptA[2];
> + float ptB[2];
> + /* All these are used for spline drawing */
> + int i;
> + float ctrlPoints[4][3];
> + glEnable(GL_MAP1_VERTEX_3);
> +
> if(oops->type==ID_SCE) {
> if(oops->flag & SELECT) {
> if(oops->id->lib) cpack(0x4080A0);
> @@ -150,11 +155,35 @@
> while(ol) {
> if(ol->to && ol->to->hide==0) {
>
> - give_oopslink_line(oops, ol, vec, vec+2);
> + give_oopslink_line(oops, ol, ptA, ptB);
> +
> + /* Set up control points for spline */
> + /* Location ptA*/
> + ctrlPoints[0][0] = ptA[0];
> + ctrlPoints[0][1] = ptA[1];
> + /* Handle ptA*/
> + ctrlPoints[1][0] = ptA[0];
> + ctrlPoints[1][1] = (ptA[1] + ptB[1])/2;
> + /* Handle ptB*/
> + ctrlPoints[2][0] = ptB[0];
> + ctrlPoints[2][1] = (ptA[1] + ptB[1])/2;
> + /* Location ptB*/
> + ctrlPoints[3][0] = ptB[0];
> + ctrlPoints[3][1] = ptB[1];
> +
> + /*Make 0 only 2D coords needed*/
> + ctrlPoints[0][2] = 0.0f;
> + ctrlPoints[1][2] = 0.0f;
> + ctrlPoints[2][2] = 0.0f;
> + ctrlPoints[3][2] = 0.0f;
>
> + glMap1f(GL_MAP1_VERTEX_3, 0.0f, 100.0f, 3, 4,&ctrlPoints[0][0]);
> +
> glBegin(GL_LINE_STRIP);
> - glVertex2fv(vec);
> - glVertex2fv(vec+2);
> + for(i=0;i <=100;i++)
> + {
> + glEvalCoord1f((GLfloat) i);
> + }
> glEnd();
> }
> ol= ol->next;