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:
authorCampbell Barton <ideasman42@gmail.com>2010-07-17 21:50:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-17 21:50:20 +0400
commit1bb0c84236ec98647dabdd944d8575f32db33650 (patch)
treeddcc766363bc4c88bfba0f149b2285b7bfd70dc4 /source/blender/makesrna
parenta3d822f857657d45a62eda02467712561b4ab08a (diff)
- added text3d.body_format to be able to set bold/italic/smallcaps etc on text.
- the length of a new text object wasnt set on creation. - tex3d and controllers rna name was being set to its body (rather then ID name) - remove reference to wave objects which are very old and not used anymore.
Diffstat (limited to 'source/blender/makesrna')
-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
3 files changed, 8 insertions, 7 deletions
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}};