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:
-rw-r--r--source/blender/blenkernel/BKE_object.h1
-rw-r--r--source/blender/blenkernel/intern/curve.c2
-rw-r--r--source/blender/blenkernel/intern/object.c8
-rw-r--r--source/blender/makesdna/DNA_object_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_controller.c1
-rw-r--r--source/blender/makesrna/intern/rna_curve.c13
-rw-r--r--source/blender/makesrna/intern/rna_object.c1
7 files changed, 10 insertions, 18 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 07c3da48792..2a7ba4f98c9 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -83,7 +83,6 @@ struct Lamp *copy_lamp(struct Lamp *la);
void make_local_lamp(struct Lamp *la);
void free_camera(struct Camera *ca);
void free_lamp(struct Lamp *la);
-void *add_wave(void);
struct Object *add_only_object(int type, char *name);
struct Object *add_object(struct Scene *scene, int type);
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 5015e0cef6c..d355a520a8c 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -148,7 +148,7 @@ Curve *add_curve(char *name, int type)
cu->vfont->id.us+=4;
cu->str= MEM_mallocN(12, "str");
strcpy(cu->str, "Text");
- cu->pos= 4;
+ cu->len= cu->pos= 4;
cu->strinfo= MEM_callocN(12*sizeof(CharInfo), "strinfo new");
cu->totbox= cu->actbox= 1;
cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "textbox");
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 012b38570da..75b5e6d9331 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -948,12 +948,6 @@ void free_lamp(Lamp *la)
la->id.icon_id = 0;
}
-void *add_wave()
-{
- return 0;
-}
-
-
/* *************************************************** */
static void *add_obdata_from_type(int type)
@@ -967,7 +961,6 @@ static void *add_obdata_from_type(int type)
case OB_CAMERA: return add_camera("Camera");
case OB_LAMP: return add_lamp("Lamp");
case OB_LATTICE: return add_lattice("Lattice");
- case OB_WAVE: return add_wave();
case OB_ARMATURE: return add_armature("Armature");
case OB_EMPTY: return NULL;
default:
@@ -987,7 +980,6 @@ static char *get_obdata_defname(int type)
case OB_CAMERA: return "Camera";
case OB_LAMP: return "Lamp";
case OB_LATTICE: return "Lattice";
- case OB_WAVE: return "Wave";
case OB_ARMATURE: return "Armature";
case OB_EMPTY: return "Empty";
default:
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 601d2ef4fa5..2bd95b6f015 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -301,7 +301,7 @@ extern Object workob;
#define OB_LAMP 10
#define OB_CAMERA 11
-#define OB_WAVE 21
+// #define OB_WAVE 21
#define OB_LATTICE 22
/* 23 and 24 are for life and sector (old file compat.) */
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 43297f29945..c5a57971001 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -229,7 +229,6 @@ void RNA_def_controller(BlenderRNA *brna)
prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Module", "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used");
- RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 9301e8dd142..394a17903e2 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -342,13 +342,13 @@ static void rna_Curve_resolution_v_update_data(Main *bmain, Scene *scene, Pointe
void rna_Curve_body_get(PointerRNA *ptr, char *value)
{
Curve *cu= (Curve*)ptr->id.data;
- strcpy(value, cu->str);
+ BLI_strncpy(value, cu->str, cu->len+1);
}
int rna_Curve_body_length(PointerRNA *ptr)
{
Curve *cu= (Curve*)ptr->id.data;
- return strlen(cu->str);
+ return cu->len;
}
/* TODO - check UTF & python play nice */
@@ -357,8 +357,7 @@ void rna_Curve_body_set(PointerRNA *ptr, const char *value)
int len= strlen(value);
Curve *cu= (Curve*)ptr->id.data;
- cu->pos = len;
- cu->len = len;
+ cu->len= cu->pos = len;
if(cu->str) MEM_freeN(cu->str);
if(cu->strinfo) MEM_freeN(cu->strinfo);
@@ -805,8 +804,12 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_ui_text(prop, "Body Text", "contents of this text object");
RNA_def_property_string_funcs(prop, "rna_Curve_body_get", "rna_Curve_body_length", "rna_Curve_body_set");
RNA_def_property_string_maxlength(prop, 8192); /* note that originally str did not have a limit! */
- RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+
+ prop= RNA_def_property(srna, "body_format", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "strinfo", "len");
+ RNA_def_property_struct_type(prop, "TextCharacterFormat");
+ RNA_def_property_ui_text(prop, "Character Info", "Stores the style of each character");
/* pointers */
prop= RNA_def_property(srna, "text_on_curve", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 8b285c42e11..4576a754f96 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1433,7 +1433,6 @@ static void rna_def_object(BlenderRNA *brna)
{OB_MBALL, "META", 0, "Meta", ""},
{OB_LAMP, "LAMP", 0, "Lamp", ""},
{OB_CAMERA, "CAMERA", 0, "Camera", ""},
- {OB_WAVE, "WAVE", 0, "Wave", ""},
{OB_LATTICE, "LATTICE", 0, "Lattice", ""},
{OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
{0, NULL, 0, NULL, NULL}};