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-11-24 18:30:37 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-24 18:30:37 +0400
commit5acde0d24c72a4ee2149d1105986f5f119231686 (patch)
tree2c6737694fc60b7151af7920f3986bd8ded2ba5f /source/blender/makesdna/DNA_curve_types.h
parentc1c3d66079adb2e0ea7b7eb9bdb2997f37623591 (diff)
Fix #29369: bpy.data.curves.new(name= "test" , type = 'SURFACE') does not create a surface
This issue it totally related on issue with changing object datablock. For curves it used to guess object type from curve datablock based on count of control points in V direction. This quess fails in case when SurfCircle datablock is trying to be reused by another surface object or as another sample empty surface databouck used to be treated as curve. Store type in Curve when creating new Curve datablock which is used in this object type quessing function. Note: Previously saved files wouldn't change behavior at all.
Diffstat (limited to 'source/blender/makesdna/DNA_curve_types.h')
-rw-r--r--source/blender/makesdna/DNA_curve_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index d189a692083..236d6dd4732 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -186,7 +186,9 @@ typedef struct Curve {
float size[3];
float rot[3];
- short texflag, pad1; /* keep a short because of give_obdata_texspace() */
+ short type; /* creation-time type of curve datablock */
+
+ short texflag; /* keep a short because of give_obdata_texspace() */
short drawflag, twist_mode;
float twist_smooth, smallcaps_scale;