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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-01-05 13:40:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2011-01-05 13:40:38 +0300
commit64c3ea272e7be85c0f589a6f28eae28d7e7d0a9e (patch)
tree05372140ca547e1c9d2bccf90df528cf9da087dc /source/blender/editors/object
parent730634ca51d730630b083c8312b99c2b3fc7f49f (diff)
Todo item: linked curve objects behaves incorrect with modifiers
Use object's displists for storing deformed tesselated curve. Was unable to totally get rid of curve's displist because of how texture space is calculating.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index fdf46ea19a7..696d8bc2c6f 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1036,9 +1036,7 @@ static EnumPropertyItem convert_target_items[]= {
static void curvetomesh(Scene *scene, Object *ob)
{
- Curve *cu= ob->data;
-
- if(cu->disp.first==0)
+ if(ob->disp.first==0)
makeDispListCurveTypes(scene, ob, 0); /* force creation */
nurbs_to_mesh(ob); /* also does users */
@@ -1188,7 +1186,7 @@ static int convert_exec(bContext *C, wmOperator *op)
cu= newob->data;
- if (!cu->disp.first)
+ if (!newob->disp.first)
makeDispListCurveTypes(scene, newob, 0);
newob->type= OB_CURVE;
@@ -1225,8 +1223,12 @@ static int convert_exec(bContext *C, wmOperator *op)
for(nu=cu->nurb.first; nu; nu=nu->next)
nu->charidx= 0;
- if(target == OB_MESH)
+ if(target == OB_MESH) {
curvetomesh(scene, newob);
+
+ /* meshes doesn't use displist */
+ freedisplist(&newob->disp);
+ }
}
else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
ob->flag |= OB_DONE;
@@ -1243,6 +1245,9 @@ static int convert_exec(bContext *C, wmOperator *op)
newob->data= copy_curve(ob->data);
} else {
newob= ob;
+
+ /* meshes doesn't use displist */
+ freedisplist(&newob->disp);
}
curvetomesh(scene, newob);