Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuho Vepsalainen <bebraw@gmail.com>2007-06-14 18:36:27 +0400
committerJuho Vepsalainen <bebraw@gmail.com>2007-06-14 18:36:27 +0400
commita499da719217a3009a7014203a91f914742da74a (patch)
tree14709a1d36e451f168d2f993323b4671d3a39387 /source/blender/blenkernel/intern
parent0ed2e0e706de6aa322807602599528c207157666 (diff)
Curve Selection Tool Refactor:
This commit refactors curve selection system to use certain curve selections functions that encapsulate setting of selection flags. New function to select adjacent control points was introduced too. Refactoring made it possible to simplify certain existing selection functions quite a bit. New functionality was delivered as well. Select more/less works now with NURBS as expected. Also two new curve selection functions were added: Select Every Nth and Select Random. See http://wiki.blender.org/index.php/BlenderDev/Curve_Selection_Tools for further information.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/curve.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 142bedadc93..769c31ad8a9 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -324,7 +324,20 @@ int count_curveverts(ListBase *nurb)
return tot;
}
-
+int count_curveverts_without_handles(ListBase *nurb)
+{
+ Nurb *nu;
+ int tot=0;
+
+ nu= nurb->first;
+ while(nu) {
+ if(nu->bezt) tot+= nu->pntsu;
+ else if(nu->bp) tot+= nu->pntsu*nu->pntsv;
+
+ nu= nu->next;
+ }
+ return tot;
+}
/* **************** NURBS ROUTINES ******************** */