Page MenuHome

Ctrl+Click for Nurbs
Open, NormalPublic

Description

With Meshes and Curves, you can select a point, press Ctrl+LMB, and the point is extruded to the mouse.

This however does not work for Nurbs, even though you can extrude a point, Ctrl+LMB does not work.

Try:

  • Add -> surface -> nurbs curve
  • Enter editmode
  • Select an end-point
  • Ctrl+Click... nothing happens

The same works for a curve or a mesh.

This could be split into 2 tasks

  • Get Ctrl+Click working for single nurbs curves.
  • Get Ctrl+Click working for nurbs surfaces (using the extrude code), This should extrude and place the newly extruded vertices at the mouse position, as is done with mesh data.

Related Objects

Event Timeline

Hmm, for me it just works now

Is anyone working on this?

@Campbell Barton (campbellbarton) What is the intended behavior of Ctrl+LMB for nurbs surfaces? Right now, extrude (e) seems to have the same behavior as grab (g).

@Tom Corwine (tcorwine), updated task,

Extrude at the end points of nurbs surfaces wlll extrude properly.
Try opening

and pressing EKey.

@Campbell Barton (campbellbarton) Okay, thanks for the feedback. I'll go back and take another look.

I’m going to take myself off this since I’ve been neglecting it. I may come back, but it’s up for grabs now.

Ricardo Fonseca (rfonseca) claimed this task.

I'd like to work on this.

It's my first try at contributing to Blender, so it might take me a few days/weeks to figure it out, but I'll try my best.

If I see I am taking too much time with it, I'll leave it up for grabs.

Think I know where to start looking.

@Campbell Barton (campbellbarton)
I found the pieces of code needed for reference of what to do.

I just have a few questions regarding them.

I am trying to do the second task, the one related with the nurbs surfaces, since I saw that for simple nurbs curves it was working (although the diff revision of Tom's commit says it needs reviewing).

The function CURVE_OT_vertex_add is for simple curves, but CURVE_OT_extrude is for surfaces which confused me as there are SURFACE_OT_... functions.

As I saw that with meshs like, let's say, a plane, the CTRL+Click would work as in simple curves, I searched for the function that did that for the mesh as it could apply for surfaces (as I assumed that a surface could, maybe, be seen as a mesh).

However I extruded the nurbs surface curve along the z axis, and observed what would happen if I selected the end points of one side and hit Extrude on the panel of the Surface Tools (the operator called in this case is CURVE_OT_extrude). Since its behaviour seemed a bit similar to what we want to acheive (I think the wanted behaviour is extruding like that but by adding two new control points at the mouse position and extruding until there), I'm wondering if I should use that function as reference instead of the one of the mesh.

Given that, I think I should create another operator that makes use of CURVE_OT_extrude and also has a similar behaviour as CURVE_OT_vertex_add but creating two new control points.

Just one more thing: if indeed I should create a new operator, should that operator start with SURFACE or CURVE? The naming, as I said before, confused me a little bit when compared with its purpose.

Sorry to bother with this long description.

@Ricardo Fonseca (rfonseca) My patch still had issues which I can go back and take another look at if you still wanted to tackle the second part.

I'd like to work on this.
It's my first try at contributing to Blender, so it might take me a few days/weeks to figure it out, but I'll try my best.
If I see I am taking too much time with it, I'll leave it up for grabs.
Think I know where to start looking.

What he said^^

Hi! I'm really sorry for not asking permission to work on this task earlier, but I was really eager to dive into the blender code base, and this is my first submitted revision.

This patch essentially checks if the selected vertices of the surface are in a row or column (similar to how the normal extrude triggered by E key works), duplicates the selected vertices and places them at the location of the mouse point. I believe it fulfills the original intent of this task.

I believe this is implemented now, we can consider closing?