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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-03-06 03:30:41 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-03-06 03:30:41 +0400
commit0114d78c33edfaef5bc412eefcb5d52a0a6823b0 (patch)
tree2deb1401eb9152ccf44855b8674ee75560b1ad9f /source/blender/makesrna/intern/rna_curve.c
parent1eb893a11410955a9cf3ceb41ab50d515f5393b1 (diff)
Code cleanup in rna files (huge, higly automated with py script).
Addresses: * C++ comments. * Spaces after if/for/while/switch statements. * Spaces around assignment operators.
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rw-r--r--source/blender/makesrna/intern/rna_curve.c572
1 files changed, 286 insertions, 286 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 91d3c3a0d3f..dbd0320bd2f 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -72,14 +72,14 @@ EnumPropertyItem curve_type_items[] = {
{CU_NURBS, "NURBS", 0, "Ease", ""},
{0, NULL, 0, NULL, NULL}};
-static const EnumPropertyItem curve3d_fill_mode_items[]= {
+static const EnumPropertyItem curve3d_fill_mode_items[] = {
{0, "FULL", 0, "Full", ""},
{CU_BACK, "BACK", 0, "Back", ""},
{CU_FRONT, "FRONT", 0, "Front", ""},
{CU_FRONT|CU_BACK, "HALF", 0, "Half", ""},
{0, NULL, 0, NULL, NULL}};
-static const EnumPropertyItem curve2d_fill_mode_items[]= {
+static const EnumPropertyItem curve2d_fill_mode_items[] = {
{0, "NONE", 0, "None", ""},
{CU_BACK, "BACK", 0, "Back", ""},
{CU_FRONT, "FRONT", 0, "Front", ""},
@@ -105,31 +105,31 @@ static const EnumPropertyItem curve2d_fill_mode_items[]= {
/* highly irritating but from RNA we cant know this */
static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index, int *pt_index)
{
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs(cu);
Nurb *nu;
- int i= 0;
+ int i = 0;
- for(nu= nurbs->first; nu; nu= nu->next, i++) {
- if(nu->type == CU_BEZIER) {
- if(point >= (void *)nu->bezt && point < (void *)(nu->bezt + nu->pntsu)) {
+ for (nu = nurbs->first; nu; nu = nu->next, i++) {
+ if (nu->type == CU_BEZIER) {
+ if (point >= (void *)nu->bezt && point < (void *)(nu->bezt + nu->pntsu)) {
break;
}
}
else {
- if(point >= (void *)nu->bp && point < (void *)(nu->bp + (nu->pntsu * nu->pntsv))) {
+ if (point >= (void *)nu->bp && point < (void *)(nu->bp + (nu->pntsu * nu->pntsv))) {
break;
}
}
}
- if(nu) {
- if(nu_index) {
- *nu_index= i;
+ if (nu) {
+ if (nu_index) {
+ *nu_index = i;
}
- if(pt_index) {
- if(nu->type == CU_BEZIER) *pt_index= (int)((BezTriple *)point - nu->bezt);
- else *pt_index= (int)((BPoint *)point - nu->bp);
+ if (pt_index) {
+ if (nu->type == CU_BEZIER) *pt_index = (int)((BezTriple *)point - nu->bezt);
+ else *pt_index = (int)((BPoint *)point - nu->bp);
}
}
@@ -138,71 +138,71 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index,
static StructRNA *rna_Curve_refine(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
- short obtype= curve_type(cu);
+ Curve *cu = (Curve*)ptr->data;
+ short obtype = curve_type(cu);
- if(obtype == OB_FONT) return &RNA_TextCurve;
- else if(obtype == OB_SURF) return &RNA_SurfaceCurve;
+ if (obtype == OB_FONT) return &RNA_TextCurve;
+ else if (obtype == OB_SURF) return &RNA_SurfaceCurve;
else return &RNA_Curve;
}
static void rna_BezTriple_handle1_get(PointerRNA *ptr, float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- values[0]= bt->vec[0][0];
- values[1]= bt->vec[0][1];
- values[2]= bt->vec[0][2];
+ values[0] = bt->vec[0][0];
+ values[1] = bt->vec[0][1];
+ values[2] = bt->vec[0][2];
}
static void rna_BezTriple_handle1_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- bt->vec[0][0]= values[0];
- bt->vec[0][1]= values[1];
- bt->vec[0][2]= values[2];
+ bt->vec[0][0] = values[0];
+ bt->vec[0][1] = values[1];
+ bt->vec[0][2] = values[2];
}
static void rna_BezTriple_handle2_get(PointerRNA *ptr, float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- values[0]= bt->vec[2][0];
- values[1]= bt->vec[2][1];
- values[2]= bt->vec[2][2];
+ values[0] = bt->vec[2][0];
+ values[1] = bt->vec[2][1];
+ values[2] = bt->vec[2][2];
}
static void rna_BezTriple_handle2_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- bt->vec[2][0]= values[0];
- bt->vec[2][1]= values[1];
- bt->vec[2][2]= values[2];
+ bt->vec[2][0] = values[0];
+ bt->vec[2][1] = values[1];
+ bt->vec[2][2] = values[2];
}
static void rna_BezTriple_ctrlpoint_get(PointerRNA *ptr, float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- values[0]= bt->vec[1][0];
- values[1]= bt->vec[1][1];
- values[2]= bt->vec[1][2];
+ values[0] = bt->vec[1][0];
+ values[1] = bt->vec[1][1];
+ values[2] = bt->vec[1][2];
}
static void rna_BezTriple_ctrlpoint_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- bt->vec[1][0]= values[0];
- bt->vec[1][1]= values[1];
- bt->vec[1][2]= values[2];
+ bt->vec[1][0] = values[0];
+ bt->vec[1][1] = values[1];
+ bt->vec[1][2] = values[2];
}
static void rna_Curve_texspace_set(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
+ Curve *cu = (Curve*)ptr->data;
if (cu->texflag & CU_AUTOSPACE)
tex_space_curve(cu);
@@ -210,13 +210,13 @@ static void rna_Curve_texspace_set(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
static int rna_Curve_texspace_editable(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
+ Curve *cu = (Curve*)ptr->data;
return (cu->texflag & CU_AUTOSPACE)? 0: PROP_EDITABLE;
}
static void rna_Curve_texspace_loc_get(PointerRNA *ptr, float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
tex_space_curve(cu);
@@ -226,14 +226,14 @@ static void rna_Curve_texspace_loc_get(PointerRNA *ptr, float *values)
static void rna_Curve_texspace_loc_set(PointerRNA *ptr, const float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
copy_v3_v3(cu->loc, values);
}
static void rna_Curve_texspace_size_get(PointerRNA *ptr, float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
tex_space_curve(cu);
@@ -243,32 +243,32 @@ static void rna_Curve_texspace_size_get(PointerRNA *ptr, float *values)
static void rna_Curve_texspace_size_set(PointerRNA *ptr, const float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
copy_v3_v3(cu->size, values);
}
static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max)
{
- Curve *cu= (Curve*)ptr->id.data;
- *min= 0;
- *max= cu->totcol-1;
- *max= MAX2(0, *max);
+ Curve *cu = (Curve*)ptr->id.data;
+ *min = 0;
+ *max = cu->totcol-1;
+ *max = MAX2(0, *max);
}
static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max)
{
- Curve *cu= (Curve*)ptr->id.data;
- *min= 0;
- *max= cu->totbox-1;
- *max= MAX2(0, *max);
+ Curve *cu = (Curve*)ptr->id.data;
+ *min = 0;
+ *max = cu->totbox-1;
+ *max = MAX2(0, *max);
}
static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
{
- Curve *cu= (Curve*)ptr->id.data;
- if(value==CU_3D) cu->flag |= CU_3D;
+ Curve *cu = (Curve*)ptr->id.data;
+ if (value == CU_3D) cu->flag |= CU_3D;
else cu->flag &= ~CU_3D;
update_curve_dimension(cu);
@@ -276,7 +276,7 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
/* cast to quiet warning it IS a const still */
return (EnumPropertyItem *)((cu->flag & CU_3D) ? curve3d_fill_mode_items : curve2d_fill_mode_items);
@@ -284,20 +284,20 @@ static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerR
static int rna_Nurb_length(PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
- if(nu->type == CU_BEZIER) return 0;
+ Nurb *nu = (Nurb*)ptr->data;
+ if (nu->type == CU_BEZIER) return 0;
return nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu;
}
static void rna_Nurb_type_set(PointerRNA *ptr, int value)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
ED_nurb_set_spline_type(nu, value);
}
static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
rna_iterator_array_begin(iter, (void*)nu->bp, sizeof(BPoint), nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu, 0, NULL);
}
@@ -320,10 +320,10 @@ static void rna_Curve_update_deps(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Curve_update_points(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- Nurb *nu= curve_nurb_from_point(cu, ptr->data, NULL, NULL);
+ Curve *cu = (Curve*)ptr->id.data;
+ Nurb *nu = curve_nurb_from_point(cu, ptr->data, NULL, NULL);
- if(nu)
+ if (nu)
calchandlesNurb(nu);
rna_Curve_update_data(bmain, scene, ptr);
@@ -331,10 +331,10 @@ static void rna_Curve_update_points(Main *bmain, Scene *scene, PointerRNA *ptr)
static PointerRNA rna_Curve_bevelObject_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= cu->bevobj;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = cu->bevobj;
- if(ob)
+ if (ob)
return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
@@ -342,8 +342,8 @@ static PointerRNA rna_Curve_bevelObject_get(PointerRNA *ptr)
static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= (Object*)value.data;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = (Object*)value.data;
if (ob) {
/* if bevel object has got the save curve, as object, for which it's */
@@ -358,8 +358,8 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
static int rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= (Object*)value.data;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = (Object*)value.data;
if (ob) {
if (ob->type == OB_CURVE && ob->data != cu) {
@@ -372,10 +372,10 @@ static int rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value)
static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= cu->taperobj;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = cu->taperobj;
- if(ob)
+ if (ob)
return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
@@ -383,8 +383,8 @@ static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr)
static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= (Object*)value.data;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = (Object*)value.data;
if (ob) {
/* if taper object has got the save curve, as object, for which it's */
@@ -399,13 +399,13 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- ListBase *nurbs= BKE_curve_nurbs(cu);
- Nurb *nu= nurbs->first;
+ Curve *cu = (Curve*)ptr->id.data;
+ ListBase *nurbs = BKE_curve_nurbs(cu);
+ Nurb *nu = nurbs->first;
- while(nu) {
- nu->resolu= cu->resolu;
- nu= nu->next;
+ while (nu) {
+ nu->resolu = cu->resolu;
+ nu = nu->next;
}
rna_Curve_update_data(bmain, scene, ptr);
@@ -413,14 +413,14 @@ static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, Pointe
static void rna_Curve_resolution_v_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- ListBase *nurbs= BKE_curve_nurbs(cu);
- Nurb *nu=nurbs->first;
+ Curve *cu = (Curve*)ptr->id.data;
+ ListBase *nurbs = BKE_curve_nurbs(cu);
+ Nurb *nu = nurbs->first;
- while(nu) {
- nu->resolv= cu->resolv;
- nu= nu->next;
+ while (nu) {
+ nu->resolv = cu->resolv;
+ nu = nu->next;
}
rna_Curve_update_data(bmain, scene, ptr);
@@ -428,52 +428,52 @@ static void rna_Curve_resolution_v_update_data(Main *bmain, Scene *scene, Pointe
static float rna_Curve_offset_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
return cu->width - 1.0f;
}
static void rna_Curve_offset_set(PointerRNA *ptr, float value)
{
- Curve *cu= (Curve*)ptr->id.data;
- cu->width= 1.0f + value;
+ Curve *cu = (Curve*)ptr->id.data;
+ cu->width = 1.0f + value;
}
/* name functions that ignore the first two ID characters */
void rna_Curve_body_get(PointerRNA *ptr, char *value)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
BLI_strncpy(value, cu->str, cu->len+1);
}
int rna_Curve_body_length(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
return cu->len;
}
/* TODO - check UTF & python play nice */
void rna_Curve_body_set(PointerRNA *ptr, const char *value)
{
- int len= strlen(value);
- Curve *cu= (Curve*)ptr->id.data;
+ int len = strlen(value);
+ Curve *cu = (Curve*)ptr->id.data;
- cu->len= cu->pos = len;
+ cu->len = cu->pos = len;
- if(cu->str) MEM_freeN(cu->str);
- if(cu->strinfo) MEM_freeN(cu->strinfo);
+ if (cu->str) MEM_freeN(cu->str);
+ if (cu->strinfo) MEM_freeN(cu->strinfo);
cu->str = MEM_callocN(len + sizeof(wchar_t), "str");
cu->strinfo = MEM_callocN( (len+4) *sizeof(CharInfo), "strinfo"); /* don't know why this is +4, just duplicating load_editText() */
- //BLI_strncpy_wchar_as_utf8(cu->str, value, len+1); // value is not wchar_t
+ /*BLI_strncpy_wchar_as_utf8(cu->str, value, len+1); *//* value is not wchar_t */
BLI_strncpy(cu->str, value, len+1);
}
static void rna_Nurb_update_cyclic_u(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
calchandlesNurb(nu);
} else {
nurbs_knot_calc_u(nu);
@@ -484,7 +484,7 @@ static void rna_Nurb_update_cyclic_u(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Nurb_update_cyclic_v(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
nurbs_knot_calc_v(nu);
@@ -493,7 +493,7 @@ static void rna_Nurb_update_cyclic_v(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Nurb_update_knot_u(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
clamp_nurb_order_u(nu);
nurbs_knot_calc_u(nu);
@@ -503,7 +503,7 @@ static void rna_Nurb_update_knot_u(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Nurb_update_knot_v(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
clamp_nurb_order_v(nu);
nurbs_knot_calc_v(nu);
@@ -513,11 +513,11 @@ static void rna_Nurb_update_knot_v(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Curve_spline_points_add(ID *id, Nurb *nu, ReportList *reports, int number)
{
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
BKE_report(reports, RPT_ERROR, "Bezier spline can't have points added");
}
- else if(number==0) {
- // do nothing
+ else if (number == 0) {
+ /* do nothing */
} else {
addNurbPoints(nu, number);
@@ -531,11 +531,11 @@ static void rna_Curve_spline_points_add(ID *id, Nurb *nu, ReportList *reports, i
static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports, int number)
{
- if(nu->type != CU_BEZIER) {
+ if (nu->type != CU_BEZIER) {
BKE_report(reports, RPT_ERROR, "Only Bezier splines can be added");
}
- else if(number==0) {
- // do nothing
+ else if (number == 0) {
+ /* do nothing */
} else {
addNurbPointsBezier(nu, number);
@@ -548,26 +548,26 @@ static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports
static Nurb *rna_Curve_spline_new(Curve *cu, int type)
{
- Nurb *nu= ( Nurb * ) MEM_callocN( sizeof( Nurb ), "spline.new" );
+ Nurb *nu = ( Nurb * ) MEM_callocN( sizeof( Nurb ), "spline.new" );
- if(type==CU_BEZIER) {
- BezTriple *bezt= (BezTriple *)MEM_callocN(sizeof(BezTriple), "spline.new.bezt");
- bezt->radius= 1.0;
- nu->bezt= bezt;
+ if (type == CU_BEZIER) {
+ BezTriple *bezt = (BezTriple *)MEM_callocN(sizeof(BezTriple), "spline.new.bezt");
+ bezt->radius = 1.0;
+ nu->bezt = bezt;
}
else {
- BPoint *bp= (BPoint *)MEM_callocN(sizeof(BPoint), "spline.new.bp");
- bp->radius= 1.0f;
- nu->bp= bp;
+ BPoint *bp = (BPoint *)MEM_callocN(sizeof(BPoint), "spline.new.bp");
+ bp->radius = 1.0f;
+ nu->bp = bp;
}
- nu->type= type;
- nu->pntsu= 1;
- nu->pntsv= 1;
+ nu->type = type;
+ nu->pntsu = 1;
+ nu->pntsv = 1;
- nu->orderu= nu->orderv= 4;
- nu->resolu= nu->resolv= 12;
- nu->flag= CU_SMOOTH;
+ nu->orderu = nu->orderv = 4;
+ nu->resolu = nu->resolv = 12;
+ nu->flag = CU_SMOOTH;
BLI_addtail(BKE_curve_nurbs(cu), nu);
@@ -576,12 +576,12 @@ static Nurb *rna_Curve_spline_new(Curve *cu, int type)
static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, Nurb *nu)
{
- int found= 0;
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ int found = 0;
+ ListBase *nurbs = BKE_curve_nurbs(cu);
- found= BLI_remlink_safe(nurbs, nu);
+ found = BLI_remlink_safe(nurbs, nu);
- if(!found) {
+ if (!found) {
BKE_reportf(reports, RPT_ERROR, "Curve \"%s\" does not contain spline given", cu->id.name+2);
return;
}
@@ -595,7 +595,7 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, Nurb *nu)
static void rna_Curve_spline_clear(Curve *cu)
{
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs(cu);
freeNurblist(nurbs);
@@ -605,14 +605,14 @@ static void rna_Curve_spline_clear(Curve *cu)
static PointerRNA rna_Curve_active_spline_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
+ Curve *cu = (Curve*)ptr->data;
Nurb *nu;
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs(cu);
- // for curve outside editmode will set to -1, should be changed to be allowed outside of editmode.
- nu= BLI_findlink(nurbs, cu->actnu);
+ /* for curve outside editmode will set to -1, should be changed to be allowed outside of editmode. */
+ nu = BLI_findlink(nurbs, cu->actnu);
- if(nu)
+ if (nu)
return rna_pointer_inherit_refine(ptr, &RNA_Spline, nu);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
@@ -620,23 +620,23 @@ static PointerRNA rna_Curve_active_spline_get(PointerRNA *ptr)
static void rna_Curve_active_spline_set(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->data;
- Nurb *nu= value.data;
- ListBase *nubase= BKE_curve_nurbs(cu);
+ Curve *cu = (Curve*)ptr->data;
+ Nurb *nu = value.data;
+ ListBase *nubase = BKE_curve_nurbs(cu);
/* -1 is ok for an unset index */
- if(nu==NULL)
- cu->actnu= -1;
+ if (nu == NULL)
+ cu->actnu = -1;
else
- cu->actnu= BLI_findindex(nubase, nu);
+ cu->actnu = BLI_findindex(nubase, nu);
}
static char *rna_Curve_spline_path(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- ListBase *nubase= BKE_curve_nurbs(cu);
- Nurb *nu= ptr->data;
- int index= BLI_findindex(nubase, nu);
+ Curve *cu = (Curve*)ptr->id.data;
+ ListBase *nubase = BKE_curve_nurbs(cu);
+ Nurb *nu = ptr->data;
+ int index = BLI_findindex(nubase, nu);
if (index >= 0)
return BLI_sprintfN("splines[%d]", index);
@@ -647,20 +647,20 @@ static char *rna_Curve_spline_path(PointerRNA *ptr)
/* use for both bezier and nurbs */
static char *rna_Curve_spline_point_path(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
Nurb *nu;
- void *point= ptr->data;
+ void *point = ptr->data;
int nu_index, pt_index;
- nu= curve_nurb_from_point(cu, point, &nu_index, &pt_index);
+ nu = curve_nurb_from_point(cu, point, &nu_index, &pt_index);
if (nu) {
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
return BLI_sprintfN("splines[%d].bezier_points[%d]", nu_index, pt_index);
}
else {
return BLI_sprintfN("splines[%d].points[%d]", nu_index, pt_index);
- }
+ }
}
else {
return BLI_strdup("");
@@ -670,9 +670,9 @@ static char *rna_Curve_spline_point_path(PointerRNA *ptr)
static char *rna_TextBox_path(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- TextBox *tb= ptr->data;
- int index= (int)(tb - cu->tb);
+ Curve *cu = (Curve*)ptr->id.data;
+ TextBox *tb = ptr->data;
+ int index = (int)(tb - cu->tb);
if (index >= 0 && index < cu->totbox)
return BLI_sprintfN("text_boxes[%d]", index);
@@ -682,7 +682,7 @@ static char *rna_TextBox_path(PointerRNA *ptr)
static void rna_Curve_splines_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
rna_iterator_listbase_begin(iter, BKE_curve_nurbs(cu), NULL);
}
@@ -693,47 +693,47 @@ static void rna_def_bpoint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SplinePoint", NULL);
+ srna = RNA_def_struct(brna, "SplinePoint", NULL);
RNA_def_struct_sdna(srna, "BPoint");
RNA_def_struct_ui_text(srna, "SplinePoint", "Spline point without handles");
/* Boolean values */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Select", "Selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hide", "Visibility status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Vector value */
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_ui_text(prop, "Point", "Point coordinates");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vec[3]");
RNA_def_property_ui_text(prop, "Weight", "NURBS weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Number values */
- prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3D View");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "weight_softbody", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_softbody", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight");
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
@@ -747,76 +747,76 @@ static void rna_def_beztriple(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BezierSplinePoint", NULL);
+ srna = RNA_def_struct(brna, "BezierSplinePoint", NULL);
RNA_def_struct_sdna(srna, "BezTriple");
RNA_def_struct_ui_text(srna, "Bezier Curve Point", "Bezier curve point with two handles");
/* Boolean values */
- prop= RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f3", 0);
RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f2", 0);
RNA_def_property_ui_text(prop, "Control Point selected", "Control point selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hide", "Visibility status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Enums */
- prop= RNA_def_property(srna, "handle_left_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_left_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h1");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 1 Type", "Handle types");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
- prop= RNA_def_property(srna, "handle_right_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_right_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h2");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 2 Type", "Handle types");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
/* Vector values */
- prop= RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle1_get", "rna_BezTriple_handle1_set", NULL);
RNA_def_property_ui_text(prop, "Handle 1", "Coordinates of the first handle");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_ctrlpoint_get", "rna_BezTriple_ctrlpoint_set", NULL);
RNA_def_property_ui_text(prop, "Control Point", "Coordinates of the control point");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
- prop= RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle2_get", "rna_BezTriple_handle2_set", NULL);
RNA_def_property_ui_text(prop, "Handle 2", "Coordinates of the second handle");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
/* Number values */
- prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3D View");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
@@ -830,41 +830,41 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
/* number values */
- prop= RNA_def_property(srna, "path_duration", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "path_duration", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pathlen");
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "Path Length", "The number of frames that are needed to traverse the path, defining the maximum value for the 'Evaluation Time' setting");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
- prop= RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH);
RNA_def_property_ui_text(prop, "Path", "Enable the curve to become a translation path");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_path_follow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_path_follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FOLLOW);
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Option for curve-deform: "
"make deformed child to stretch along entire path");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_deform_bounds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_DEFORM_BOUNDS_OFF);
RNA_def_property_ui_text(prop, "Bounds Clamp", "Option for curve-deform: "
"Use the mesh bounds to clamp the deformation");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_time_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_time_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_OFFS_PATHDIST);
RNA_def_property_ui_text(prop, "Offset Path Distance", "Children will use TimeOffs value as path distance offset");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_radius", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH_RADIUS);
RNA_def_property_ui_text(prop, "Radius", "Option for paths and curve-deform: "
"apply the curve radius with path following it and deforming");
@@ -876,7 +876,7 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
/* flags */
- prop= RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
RNA_def_property_ui_text(prop, "Use UV for Mapping", "Uses the UV values as Generated textured coordinates");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -895,141 +895,141 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
{0, NULL, 0, NULL, NULL}};
/* Enums */
- prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spacemode");
RNA_def_property_enum_items(prop, prop_align_items);
RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* number values */
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
RNA_def_property_range(prop, 0.0001f, 10000.0f);
RNA_def_property_ui_range(prop, 0.01, 10, 1, 3);
RNA_def_property_ui_text(prop, "Font size", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "small_caps_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "small_caps_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "smallcaps_scale");
RNA_def_property_ui_range(prop, 0, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Small Caps", "Scale of small capitals");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "space_line", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "space_line", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "linedist");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Distance between lines of text", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "space_word", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "space_word", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "wordspace");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Spacing between words", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "space_character", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "space_character", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Global spacing between characters", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shear");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shear", "Italic angle of the characters");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "X Offset", "Horizontal offset from the object origin");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Y Offset", "Vertical offset from the object origin");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "underline_position", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "underline_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulpos");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline Position", "Vertical position of underline");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "underline_height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "underline_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulheight");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline Thickness", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "text_boxes", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "text_boxes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "tb", "totbox");
RNA_def_property_struct_type(prop, "TextBox");
RNA_def_property_ui_text(prop, "Textboxes", "");
- prop= RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actbox");
RNA_def_property_ui_text(prop, "The active text box", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_active_textbox_index_range");
/* strings */
- prop= RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
RNA_def_property_ui_text(prop, "Object Font", "Use Blender Objects as font characters (give font objects a common name followed by the character they represent, eg. familya, familyb, etc, and turn on Verts Duplication)");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "str");
RNA_def_property_ui_text(prop, "Body Text", "Content 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_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "body_format", PROP_COLLECTION, PROP_NONE);
+ 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, "follow_curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "follow_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "textoncurve");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_otherObject_poll");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object");
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
- prop= RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vfont");
RNA_def_property_ui_text(prop, "Font", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "font_bold", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "font_bold", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vfontb");
RNA_def_property_ui_text(prop, "Font Bold", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "font_italic", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "font_italic", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vfonti");
RNA_def_property_ui_text(prop, "Font Italic", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "font_bold_italic", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "font_bold_italic", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vfontbi");
RNA_def_property_ui_text(prop, "Font Bold Italic", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curinfo");
RNA_def_property_ui_text(prop, "Edit Format", "Editing settings character formatting");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
- prop= RNA_def_property(srna, "use_fast_edit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fast_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FAST);
RNA_def_property_ui_text(prop, "Fast Editing", "Don't fill polygons while editing");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -1040,29 +1040,29 @@ static void rna_def_textbox(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "TextBox", NULL);
+ srna = RNA_def_struct(brna, "TextBox", NULL);
RNA_def_struct_ui_text(srna, "Text Box", "Text bounding box for layout");
/* number values */
- prop= RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox X Offset", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "y");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Y Offset", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "w");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Width", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "h");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Height", "");
@@ -1076,22 +1076,22 @@ static void rna_def_charinfo(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "TextCharacterFormat", NULL);
+ srna = RNA_def_struct(brna, "TextCharacterFormat", NULL);
RNA_def_struct_sdna(srna, "CharInfo");
RNA_def_struct_ui_text(srna, "Text Character Format", "Text character formatting settings");
/* flags */
- prop= RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_BOLD);
RNA_def_property_ui_text(prop, "Bold", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_ITALIC);
RNA_def_property_ui_text(prop, "Italic", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_underline", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_underline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_UNDERLINE);
RNA_def_property_ui_text(prop, "Underline", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -1102,7 +1102,7 @@ static void rna_def_charinfo(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Wrap", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data"); */
- prop= RNA_def_property(srna, "use_small_caps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_small_caps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_SMALLCAPS);
RNA_def_property_ui_text(prop, "Small Caps", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -1112,7 +1112,7 @@ static void rna_def_surface(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "SurfaceCurve", "Curve");
+ srna = RNA_def_struct(brna, "SurfaceCurve", "Curve");
RNA_def_struct_sdna(srna, "Curve");
RNA_def_struct_ui_text(srna, "Surface Curve", "Curve datablock used for storing surfaces");
RNA_def_struct_ui_icon(srna, ICON_SURFACE_DATA);
@@ -1124,7 +1124,7 @@ static void rna_def_text(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "TextCurve", "Curve");
+ srna = RNA_def_struct(brna, "TextCurve", "Curve");
RNA_def_struct_sdna(srna, "Curve");
RNA_def_struct_ui_text(srna, "Text Curve", "Curve datablock used for storing text");
RNA_def_struct_ui_icon(srna, ICON_FONT_DATA);
@@ -1138,17 +1138,17 @@ static void rna_def_text(BlenderRNA *brna)
static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- //PropertyRNA *prop;
+ /*PropertyRNA *prop; */
FunctionRNA *func;
- //PropertyRNA *parm;
+ /*PropertyRNA *parm; */
RNA_def_property_srna(cprop, "SplinePoints");
- srna= RNA_def_struct(brna, "SplinePoints", NULL);
+ srna = RNA_def_struct(brna, "SplinePoints", NULL);
RNA_def_struct_sdna(srna, "Nurb");
RNA_def_struct_ui_text(srna, "Spline Points", "Collection of spline points");
- func= RNA_def_function(srna, "add", "rna_Curve_spline_points_add");
+ func = RNA_def_function(srna, "add", "rna_Curve_spline_points_add");
RNA_def_function_ui_description(func, "Add a number of points to this spline");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS);
RNA_def_int(func, "count", 1, 1, INT_MAX, "Number", "Number of points to add to the spline", 1, INT_MAX);
@@ -1165,17 +1165,17 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- //PropertyRNA *prop;
+ /*PropertyRNA *prop; */
FunctionRNA *func;
- //PropertyRNA *parm;
+ /*PropertyRNA *parm; */
RNA_def_property_srna(cprop, "SplineBezierPoints");
- srna= RNA_def_struct(brna, "SplineBezierPoints", NULL);
+ srna = RNA_def_struct(brna, "SplineBezierPoints", NULL);
RNA_def_struct_sdna(srna, "Nurb");
RNA_def_struct_ui_text(srna, "Spline Bezier Points", "Collection of spline bezirt points");
- func= RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add");
+ func = RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add");
RNA_def_function_ui_description(func, "Add a number of points to this spline");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS);
RNA_def_int(func, "count", 1, INT_MIN, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX);
@@ -1199,27 +1199,27 @@ static void rna_def_curve_splines(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "CurveSplines");
- srna= RNA_def_struct(brna, "CurveSplines", NULL);
+ srna = RNA_def_struct(brna, "CurveSplines", NULL);
RNA_def_struct_sdna(srna, "Curve");
RNA_def_struct_ui_text(srna, "Curve Splines", "Collection of curve splines");
- func= RNA_def_function(srna, "new", "rna_Curve_spline_new");
+ func = RNA_def_function(srna, "new", "rna_Curve_spline_new");
RNA_def_function_ui_description(func, "Add a new spline to the curve");
- parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
+ parm = RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
+ parm = RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
+ func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
+ parm = RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "clear", "rna_Curve_spline_clear");
+ func = RNA_def_function(srna, "clear", "rna_Curve_spline_clear");
RNA_def_function_ui_description(func, "Remove all spline from a curve");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, "rna_Curve_active_spline_get", "rna_Curve_active_spline_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1241,24 +1241,24 @@ static void rna_def_curve(BlenderRNA *brna)
{CU_TWIST_TANGENT, "TANGENT", 0, "Tangent", "Use the tangent to calculate twist"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem curve_axis_items[]= {
+ static const EnumPropertyItem curve_axis_items[] = {
{0, "2D", 0, "2D", "Clamp the Z axis of the curve"},
{CU_3D, "3D", 0, "3D", "Allow editing on the Z axis of this curve, also allows tilt and curve radius to be used"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Curve", "ID");
+ srna = RNA_def_struct(brna, "Curve", "ID");
RNA_def_struct_ui_text(srna, "Curve", "Curve datablock storing curves, splines and NURBS");
RNA_def_struct_ui_icon(srna, ICON_CURVE_DATA);
RNA_def_struct_refine_func(srna, "rna_Curve_refine");
rna_def_animdata_common(srna);
- prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
- prop= RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
#if 0
RNA_def_property_collection_sdna(prop, NULL, "nurb", NULL);
#else
@@ -1269,12 +1269,12 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Splines", "Collection of splines in this curve data object");
rna_def_curve_splines(brna, prop);
- prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_HANDLES);
RNA_def_property_ui_text(prop, "Draw Handles", "Display Bezier handles in editmode");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
- prop= RNA_def_property(srna, "show_normal_face", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_normal_face", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_NORMALS);
RNA_def_property_ui_text(prop, "Draw Normals", "Display 3D curve normals in editmode");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
@@ -1282,67 +1282,67 @@ static void rna_def_curve(BlenderRNA *brna)
rna_def_path(brna, srna);
/* Number values */
- prop= RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bevresol");
RNA_def_property_range(prop, 0, 32);
RNA_def_property_ui_range(prop, 0, 32, 1.0, 0);
RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "width");
RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3);
RNA_def_property_float_funcs(prop, "rna_Curve_offset_get", "rna_Curve_offset_set", NULL);
RNA_def_property_ui_text(prop, "Offset", "Offset the curve to adjust the width of a text");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "ext1");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 3);
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "ext2");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction");
RNA_def_property_update(prop, 0, "rna_Curve_resolution_u_update_data");
- prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction");
RNA_def_property_update(prop, 0, "rna_Curve_resolution_v_update_data");
- prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
RNA_def_property_range(prop, 0, SHRT_MAX);
RNA_def_property_ui_range(prop, 0, 64, 1, 0);
RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering (zero skips this property)");
- prop= RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv_ren");
RNA_def_property_ui_range(prop, 0, 64, 1, 0);
RNA_def_property_range(prop, 0, SHRT_MAX);
RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering (zero skips this property)");
- prop= RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ctime");
RNA_def_property_ui_text(prop, "Evaluation Time", "Parametric position along the length of the curve that Objects 'following' it should be at (position is evaluated by dividing by the 'Path Length' value)");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* pointers */
- prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1350,7 +1350,7 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
RNA_def_property_pointer_funcs(prop, "rna_Curve_bevelObject_get", "rna_Curve_bevelObject_set", NULL, "rna_Curve_otherObject_poll");
- prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1360,57 +1360,57 @@ static void rna_def_curve(BlenderRNA *brna)
/* Flags */
- prop= RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */
+ prop = RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, curve_axis_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Curve_dimension_set", NULL);
RNA_def_property_ui_text(prop, "Dimensions", "Select 2D or 3D curve type");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "fill_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "fill_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, curve3d_fill_mode_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Curve_fill_mode_itemf");
RNA_def_property_ui_text(prop, "Fill Mode", "Mode of filling curve");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "twist_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "twist_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twist_mode");
RNA_def_property_enum_items(prop, curve_twist_mode_items);
RNA_def_property_ui_text(prop, "Twist Method", "The type of tilt calculation for 3D Curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- // XXX - would be nice to have a better way to do this, only add for testing.
- prop= RNA_def_property(srna, "twist_smooth", PROP_FLOAT, PROP_NONE);
+ /* XXX - would be nice to have a better way to do this, only add for testing. */
+ prop = RNA_def_property(srna, "twist_smooth", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "twist_smooth");
RNA_def_property_ui_range(prop, 0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Twist Smooth", "Smoothing iteration for tangents");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_fill_deform", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fill_deform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_DEFORM_FILL);
RNA_def_property_ui_text(prop, "Fill Deformed", "Fill curve after applying shape keys and all modifiers");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_fill_caps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fill_caps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FILL_CAPS);
RNA_def_property_ui_text(prop, "Fill Caps", "Fill caps for bevelled curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* texture space */
- prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", CU_AUTOSPACE);
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Curve_texspace_set");
- prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Location", "Texture space location");
RNA_def_property_editable_func(prop, "rna_Curve_texspace_editable");
RNA_def_property_float_funcs(prop, "rna_Curve_texspace_loc_get", "rna_Curve_texspace_loc_set", NULL);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size");
RNA_def_property_editable_func(prop, "rna_Curve_texspace_editable");
@@ -1425,13 +1425,13 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
*/
- prop= RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
RNA_def_property_ui_text(prop, "Use UV for mapping", "Uses the UV values as Generated textured coordinates");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* materials */
- prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
@@ -1451,132 +1451,132 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Spline", NULL);
+ srna = RNA_def_struct(brna, "Spline", NULL);
RNA_def_struct_sdna(srna, "Nurb");
RNA_def_struct_ui_text(srna, "Spline", "Element of a curve, either NURBS, Bezier or Polyline or a character with text objects");
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bp", NULL);
RNA_def_property_struct_type(prop, "SplinePoint");
RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_Nurb_length", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Points", "Collection of points that make up this poly or nurbs spline");
rna_def_curve_spline_points(brna, prop);
- prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BezierSplinePoint");
RNA_def_property_collection_sdna(prop, NULL, "bezt", "pntsu");
RNA_def_property_ui_text(prop, "Bezier Points", "Collection of points for Bezier curves only");
rna_def_curve_spline_bezpoints(brna, prop);
- prop= RNA_def_property(srna, "tilt_interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "tilt_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tilt_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
RNA_def_property_ui_text(prop, "Tilt Interpolation", "The type of tilt interpolation for 3D, Bezier curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius_interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "radius_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "radius_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
RNA_def_property_ui_text(prop, "Radius Interpolation", "The type of radius interpolation for Bezier curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, curve_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Nurb_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "The interpolation type for this curve element");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "point_count_u", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "point_count_u", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_int_sdna(prop, NULL, "pntsu");
RNA_def_property_ui_text(prop, "Points U", "Total number points for the curve or surface in the U direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "point_count_v", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "point_count_v", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_int_sdna(prop, NULL, "pntsv");
RNA_def_property_ui_text(prop, "Points V", "Total number points for the surface on the V direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderu");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order U", "NURBS order in the U direction (for splines and surfaces, higher values let points influence a greater area)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
- prop= RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderv");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order V", "NURBS order in the V direction (for surfaces only, higher values let points influence a greater area)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
- prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Curve or Surface subdivisions per segment");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution V", "Surface subdivisions per segment");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_cyclic_u", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_NURB_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic U", "Make this curve or surface a closed loop in the U direction");
RNA_def_property_update(prop, 0, "rna_Nurb_update_cyclic_u");
- prop= RNA_def_property(srna, "use_cyclic_v", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_NURB_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic V", "Make this surface a closed loop in the V direction");
RNA_def_property_update(prop, 0, "rna_Nurb_update_cyclic_v");
/* Note, endpoint and bezier flags should never be on at the same time! */
- prop= RNA_def_property(srna, "use_endpoint_u", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_endpoint_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_NURB_ENDPOINT);
RNA_def_property_ui_text(prop, "Endpoint U", "Make this nurbs curve or surface meet the endpoints in the U direction (Cyclic U must be disabled)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
- prop= RNA_def_property(srna, "use_endpoint_v", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_endpoint_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_NURB_ENDPOINT);
RNA_def_property_ui_text(prop, "Endpoint V", "Make this nurbs surface meet the endpoints in the V direction (Cyclic V must be disabled)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
- prop= RNA_def_property(srna, "use_bezier_u", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bezier_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_NURB_BEZIER);
RNA_def_property_ui_text(prop, "Bezier U", "Make this nurbs curve or surface act like a Bezier spline in the U direction (Order U must be 3 or 4, Cyclic U must be disabled)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
- prop= RNA_def_property(srna, "use_bezier_v", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bezier_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_NURB_BEZIER);
RNA_def_property_ui_text(prop, "Bezier V", "Make this nurbs surface act like a Bezier spline in the V direction (Order V must be 3 or 4, Cyclic V must be disabled)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
- prop= RNA_def_property(srna, "use_smooth", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth", "Smooth the normals of the surface or beveled curve");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 1);
RNA_def_property_ui_text(prop, "Hide", "Hide this curve in editmode");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_material_index_range");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "charidx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_ui_text(prop, "Character Index", "Location of this character in the text data (only for text curves)");