[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30444] trunk/blender/source/blender: - added text3d.body_format to be able to set bold/italic/ smallcaps etc on text.
Dalai Felinto
dfelinto at gmail.com
Sat Jul 17 21:11:00 CEST 2010
>" - controllers rna name was being set to its body (rather then ID name)"
> - RNA_def_struct_name_property(srna, prop);
Hi Campbell,
I see that the def_struct_name was totally misplaced in the
rna_controller (probably a copy/paste error - my mistake). But I don't
get the relation with the commit message. As you know Controllers have
no ID ...
Cheers,
Dalai
2010/7/17 Campbell Barton <ideasman42 at gmail.com>:
> Revision: 30444
> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30444
> Author: campbellbarton
> Date: 2010-07-17 19:50:20 +0200 (Sat, 17 Jul 2010)
>
> Log Message:
> -----------
> - 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.
>
> Modified Paths:
> --------------
> trunk/blender/source/blender/blenkernel/BKE_object.h
> trunk/blender/source/blender/blenkernel/intern/curve.c
> trunk/blender/source/blender/blenkernel/intern/object.c
> trunk/blender/source/blender/makesdna/DNA_object_types.h
> trunk/blender/source/blender/makesrna/intern/rna_controller.c
> trunk/blender/source/blender/makesrna/intern/rna_curve.c
> trunk/blender/source/blender/makesrna/intern/rna_object.c
>
> Modified: trunk/blender/source/blender/blenkernel/BKE_object.h
> ===================================================================
> --- trunk/blender/source/blender/blenkernel/BKE_object.h 2010-07-17 17:36:53 UTC (rev 30443)
> +++ trunk/blender/source/blender/blenkernel/BKE_object.h 2010-07-17 17:50:20 UTC (rev 30444)
> @@ -83,7 +83,6 @@
> 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);
>
> Modified: trunk/blender/source/blender/blenkernel/intern/curve.c
> ===================================================================
> --- trunk/blender/source/blender/blenkernel/intern/curve.c 2010-07-17 17:36:53 UTC (rev 30443)
> +++ trunk/blender/source/blender/blenkernel/intern/curve.c 2010-07-17 17:50:20 UTC (rev 30444)
> @@ -148,7 +148,7 @@
> 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");
>
> Modified: trunk/blender/source/blender/blenkernel/intern/object.c
> ===================================================================
> --- trunk/blender/source/blender/blenkernel/intern/object.c 2010-07-17 17:36:53 UTC (rev 30443)
> +++ trunk/blender/source/blender/blenkernel/intern/object.c 2010-07-17 17:50:20 UTC (rev 30444)
> @@ -948,12 +948,6 @@
> la->id.icon_id = 0;
> }
>
> -void *add_wave()
> -{
> - return 0;
> -}
> -
> -
> /* *************************************************** */
>
> static void *add_obdata_from_type(int type)
> @@ -967,7 +961,6 @@
> 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 @@
> 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:
>
> Modified: trunk/blender/source/blender/makesdna/DNA_object_types.h
> ===================================================================
> --- trunk/blender/source/blender/makesdna/DNA_object_types.h 2010-07-17 17:36:53 UTC (rev 30443)
> +++ trunk/blender/source/blender/makesdna/DNA_object_types.h 2010-07-17 17:50:20 UTC (rev 30444)
> @@ -301,7 +301,7 @@
> #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.) */
>
> Modified: trunk/blender/source/blender/makesrna/intern/rna_controller.c
> ===================================================================
> --- trunk/blender/source/blender/makesrna/intern/rna_controller.c 2010-07-17 17:36:53 UTC (rev 30443)
> +++ trunk/blender/source/blender/makesrna/intern/rna_controller.c 2010-07-17 17:50:20 UTC (rev 30444)
> @@ -229,7 +229,6 @@
>
> 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);
>
> Modified: trunk/blender/source/blender/makesrna/intern/rna_curve.c
> ===================================================================
> --- trunk/blender/source/blender/makesrna/intern/rna_curve.c 2010-07-17 17:36:53 UTC (rev 30443)
> +++ trunk/blender/source/blender/makesrna/intern/rna_curve.c 2010-07-17 17:50:20 UTC (rev 30444)
> @@ -342,13 +342,13 @@
> 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 @@
> 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 @@
> 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);
>
> Modified: trunk/blender/source/blender/makesrna/intern/rna_object.c
> ===================================================================
> --- trunk/blender/source/blender/makesrna/intern/rna_object.c 2010-07-17 17:36:53 UTC (rev 30443)
> +++ trunk/blender/source/blender/makesrna/intern/rna_object.c 2010-07-17 17:50:20 UTC (rev 30444)
> @@ -1433,7 +1433,6 @@
> {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}};
>
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>
More information about the Bf-committers
mailing list