Maniphest T39656

Ctrl+Click for Nurbs Surfaces
Confirmed, NormalTO DO

Assigned To
Arihant Joshi (AJ)
Authored By
Campbell Barton (campbellbarton)
Apr 9 2014, 1:04 PM
Tags
  • BF Blender
  • Good First Issue
Subscribers
Arihant Joshi (AJ)
Bastien Montagne (mont29)
Campbell Barton (campbellbarton)
Fred Gobry (chbug)
Geraldine Chua (gschua)
Hugo Sales (someonewithpc)
Janusch Patas (patjan)
10 More Subscribers

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.

Revisions and Commits

Event Timeline

Campbell Barton (campbellbarton) created this task.Apr 9 2014, 1:04 PM
Campbell Barton (campbellbarton) raised the priority of this task from to Normal.
Campbell Barton (campbellbarton) updated the task description.
Campbell Barton (campbellbarton) added a project: Good First Issue.
Campbell Barton (campbellbarton) edited a custom field.
Campbell Barton (campbellbarton) updated the task description.
Campbell Barton (campbellbarton) added a subscriber: Campbell Barton (campbellbarton).
Walid Shouman (walid) claimed this task.Apr 9 2014, 1:24 PM
Bastien Montagne (mont29) added a project: BF Blender.May 20 2014, 4:16 PM
Bastien Montagne (mont29) added a subscriber: Bastien Montagne (mont29).
蒋琦琦 (tintinlotus) added a subscriber: 蒋琦琦 (tintinlotus).May 31 2014, 2:25 PM
x (robschia) added a subscriber: x (robschia).EditedJul 12 2014, 11:43 AM

EDIT: wrong comment

x (robschia) removed a subscriber: x (robschia).Jul 12 2014, 1:20 PM
Hugo Sales (someonewithpc) claimed this task.Mar 23 2015, 11:07 PM
Hugo Sales (someonewithpc) added a subscriber: Walid Shouman (walid).
Hugo Sales (someonewithpc) removed Hugo Sales (someonewithpc) as the assignee of this task.Jan 15 2016, 11:43 AM
Linganesan (Maninesan) added a subscriber: Linganesan (Maninesan).Jan 25 2016, 7:20 AM
Michał Ziobro (Muchomor) claimed this task.Jan 28 2016, 1:31 PM
Michał Ziobro (Muchomor) added a comment.Jan 28 2016, 6:05 PM

Hmm, for me it just works now

Michał Ziobro (Muchomor) removed Michał Ziobro (Muchomor) as the assignee of this task.Jan 28 2016, 6:06 PM
Michał Ziobro (Muchomor) added a subscriber: Michał Ziobro (Muchomor).
Tom Corwine (tcorwine) added a subscriber: Tom Corwine (tcorwine).Feb 15 2016, 1:09 AM
Tom Corwine (tcorwine) claimed this task.Feb 15 2016, 2:32 AM

Is anyone working on this?

Tom Corwine (tcorwine) added a comment.Feb 21 2016, 2:37 AM

@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) added a revision: D1863: T39656 Ctrl+Click for Nurbs.Mar 20 2016, 3:28 PM
Campbell Barton (campbellbarton) updated the task description.Mar 21 2016, 3:00 AM
Campbell Barton (campbellbarton) added a comment.EditedMar 21 2016, 3:02 AM

@Tom Corwine (tcorwine), updated task,

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

and pressing EKey.

Tom Corwine (tcorwine) added a comment.Mar 21 2016, 3:15 AM

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

Tom Corwine (tcorwine) removed Tom Corwine (tcorwine) as the assignee of this task.Jul 9 2016, 10:00 PM

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.Jul 13 2016, 9:57 PM
Ricardo Fonseca (rfonseca) added a subscriber: Ricardo Fonseca (rfonseca).

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.

Ricardo Fonseca (rfonseca) added a comment.Jul 17 2016, 10:07 PM

@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.

Tom Corwine (tcorwine) added a comment.Nov 1 2016, 9:24 PM

@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.

Campbell Barton (campbellbarton) removed Ricardo Fonseca (rfonseca) as the assignee of this task.Mar 3 2017, 3:06 PM
Arihant Joshi (AJ) added a subscriber: Arihant Joshi (AJ).Jan 22 2018, 7:23 AM
Arihant Joshi (AJ) claimed this task.Jan 22 2018, 7:27 AM
In T39656#381326, @Ricardo Fonseca (rfonseca) wrote:

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^^

Geraldine Chua (gschua) added a subscriber: Geraldine Chua (gschua).Mar 20 2018, 1:12 PM
Geraldine Chua (gschua) added a comment.Mar 20 2018, 1:21 PM

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.

Achal Pandey (achalpandeyy) mentioned this in D4246: T39656 Ctrl+Click for Nurbs.Jan 24 2019, 12:11 PM
George Vogiatzis (Gvgeo) mentioned this in T63009: Quick Hacks cleanup.May 6 2019, 8:13 AM
Kalyan (coder.kalyan) added a subscriber: Kalyan (coder.kalyan).Jun 14 2019, 2:01 PM

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

Nicholas Rishel (nicholas_rishel) renamed this task from Ctrl+Click for Nurbs to Ctrl+Click for Nurbs Surfaces.May 13 2020, 4:07 AM
Nicholas Rishel (nicholas_rishel) added a subscriber: Nicholas Rishel (nicholas_rishel).May 13 2020, 4:13 AM

Surface's Nurbs (e.g. add -> Surface -> Nurbs Curve) still don't have this functionality.

@Kalyan (coder.kalyan) probably checked the Curve's Nurbs Curve which does work; easy mix up.

Scott Wilson (propersquid) added a subscriber: Scott Wilson (propersquid).May 14 2020, 3:09 AM
William Alexander (willalexander) added a subscriber: William Alexander (willalexander).Aug 18 2020, 12:59 AM
William Alexander (willalexander) added a comment.Sep 6 2020, 12:21 AM

Hi,

I am new to Blender development, but I think a solution to task 1 would be to create a new poll callback function for the CURVE_OT_vertex_add operator.

This function would return ‘true’ for objects of type OB_CURVE, and for objects of type OB_SURF which are 1 dimensional curves (i.e whose pntsv value = 1)

Currently the BD_operator_editcurve function is used, which only returns true for objects of OB_CURVE type.

Janusch Patas (patjan) added a subscriber: Janusch Patas (patjan).Dec 27 2020, 11:59 PM
Fred Gobry (chbug) added a subscriber: Fred Gobry (chbug).Jan 11 2022, 6:56 AM

I'll try to tackle this one as a starter project. Don't hold your breath quite yet.

Shrey Aggarwal (shrey_agg) added a subscriber: Shrey Aggarwal (shrey_agg).Jan 16 2022, 9:38 AM