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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-03 02:45:11 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-03 02:45:11 +0300
commit8f1847e4c33f4276c6aaf123e658f9d2043f7dcb (patch)
tree76fc524250b9a54069931c3d50e8c379fc6b982f /source/blender/makesrna/intern/rna_curve.c
parentd27c9f9d76752bffdcdf60812ee05f48482bccfc (diff)
RNA: review of commits in the past days, check the diffs for the
many small changes, but the two bigger ones are: * Sensors and controllers now use inheritance, rather than pointing to the data in a separate struct. Had to add some new RNA define functionality to support this better. * DNA_meta_types.h was marked as done but still missing many things, now completed.
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rwxr-xr-xsource/blender/makesrna/intern/rna_curve.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index e877548ab76..f7db5bc1c45 100755
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -33,6 +33,12 @@
#ifdef RNA_RUNTIME
+static int rna_Curve_texspace_editable(PointerRNA *ptr)
+{
+ Curve *cu= (Curve*)ptr->data;
+ return (cu->texflag & CU_AUTOSPACE)? PROP_NOT_EDITABLE: 0;
+}
+
#else
static void rna_def_path(BlenderRNA *brna, StructRNA *srna);
@@ -45,6 +51,9 @@ void rna_def_curve(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Curve", "ID", "Curve");
+
+ rna_def_ipo_common(srna);
+ rna_def_texmat_common(srna, "rna_Curve_texspace_editable");
rna_def_path(brna, srna);
rna_def_nurbs(brna, srna);
@@ -102,10 +111,6 @@ void rna_def_curve(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width).");
- prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Ipo");
- RNA_def_property_ui_text(prop, "Ipo Curve", "");
-
/* Flags */
prop= RNA_def_property(srna, "3d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_3D);
@@ -227,7 +232,7 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_ui_text(prop, "Family", "Blender uses font from selfmade objects.");
prop= RNA_def_property(srna, "str", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, "Curve", "str");
+ RNA_def_property_string_sdna(prop, NULL, "str");
RNA_def_property_ui_text(prop, "String", "");
RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set");
RNA_def_property_string_maxlength(prop, 8192); /* note that originally str did not have a limit! */
@@ -240,7 +245,7 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object.");
prop= RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "VFont");
+ RNA_def_property_struct_type(prop, "VectorFont");
RNA_def_property_pointer_sdna(prop, NULL, "vfont");
RNA_def_property_ui_text(prop, "Font", "");