diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-26 05:02:06 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-26 05:02:06 +0300 |
commit | 1d3670417b870f806466253ee2d3d0726052f2e2 (patch) | |
tree | d5416474939785e0ab6d77d01d7bc7f336126dc5 /source/blender/makesrna | |
parent | 2a2e720586c73555eb82dfc9cc3c4b5f86adb178 (diff) |
2.5 / RNA
* assorted fixes for resolving compile warnings
* in rna_armature setting for envelope weight was bug, since it was setting dist instead.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 36 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_image.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_lamp.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sensor.c | 12 |
8 files changed, 40 insertions, 40 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 835b6fc7f42..c367963b06d 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -814,7 +814,7 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f) rna_float_print(f, fprop->hardmin); fprintf(f, ", "); rna_float_print(f, fprop->hardmax); fprintf(f, ", "); rna_float_print(f, fprop->step); fprintf(f, ", "); - rna_float_print(f, fprop->precision); fprintf(f, ", "); + rna_int_print(f, (int)fprop->precision); fprintf(f, ", "); rna_float_print(f, fprop->defaultvalue); fprintf(f, ", "); if(prop->arraylength) fprintf(f, "rna_%s_%s_default\n", srna->identifier, prop->identifier); else fprintf(f, "NULL\n"); diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 3c9090fbcf3..4a1a7ea2551 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -70,7 +70,7 @@ static void rna_Armature_ghost_start_frame_set(PointerRNA *ptr, int value) static void rna_Armature_ghost_end_frame_set(PointerRNA *ptr, int value) { bArmature *data= (bArmature*)ptr->data; - CLAMP(value, data->ghostsf, MAXFRAMEF/2); + CLAMP(value, data->ghostsf, (int)(MAXFRAMEF/2)); data->ghostef= value; } @@ -84,7 +84,7 @@ static void rna_Armature_path_start_frame_set(PointerRNA *ptr, int value) static void rna_Armature_path_end_frame_set(PointerRNA *ptr, int value) { bArmature *data= (bArmature*)ptr->data; - CLAMP(value, data->pathsf, MAXFRAMEF/2); + CLAMP(value, data->pathsf, (int)(MAXFRAMEF/2)); data->pathef= value; } @@ -186,23 +186,23 @@ static void rna_def_bone(BlenderRNA *brna) /* Number values */ /* envelope deform settings */ - prop= RNA_def_property(srna, "envelope_distance", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "dist"); - RNA_def_property_range(prop, 0, 1000); + prop= RNA_def_property(srna, "envelope_distance", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "dist"); + RNA_def_property_range(prop, 0.0f, 1000.0f); RNA_def_property_ui_text(prop, "Envelope Deform Distance", "Bone deformation distance (for Envelope deform only)."); - prop= RNA_def_property(srna, "envelope_weight", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "dist"); - RNA_def_property_range(prop, 0, 1000); + prop= RNA_def_property(srna, "envelope_weight", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "weight"); + RNA_def_property_range(prop, 0.0f, 1000.0f); RNA_def_property_ui_text(prop, "Envelope Deform Weight", "Bone deformation weight (for Envelope deform only)."); - prop= RNA_def_property(srna, "radius_head", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "rad_head"); + prop= RNA_def_property(srna, "radius_head", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rad_head"); //RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid); RNA_def_property_ui_text(prop, "Envelope Radius Head", "Radius of head of bone (for Envelope deform only)."); - prop= RNA_def_property(srna, "radius_tail", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "rad_tail"); + prop= RNA_def_property(srna, "radius_tail", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rad_tail"); //RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid); RNA_def_property_ui_text(prop, "Envelope Radius Tail", "Radius of tail of bone (for Envelope deform only)."); @@ -212,13 +212,13 @@ static void rna_def_bone(BlenderRNA *brna) RNA_def_property_range(prop, 1, 32); RNA_def_property_ui_text(prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only)."); - prop= RNA_def_property(srna, "bbone_in", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "ease1"); + prop= RNA_def_property(srna, "bbone_in", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "ease1"); RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "B-Bone Ease In", "Length of first Bezier Handle (for B-Bones only)."); - prop= RNA_def_property(srna, "bbone_out", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "ease2"); + prop= RNA_def_property(srna, "bbone_out", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "ease2"); RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "B-Bone Ease Out", "Length of second Bezier Handle (for B-Bones only)."); @@ -230,8 +230,8 @@ static void rna_def_bone(BlenderRNA *brna) prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_VECTOR); RNA_def_property_ui_text(prop, "Bone Tail Location", "In Edit Mode, the location of the 'head' of the bone."); - prop= RNA_def_property(srna, "roll", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 0, 2); + prop= RNA_def_property(srna, "roll", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "Bone Roll", "In Edit Mode, the 'roll' (i.e. rotation around the bone vector, equivilant to local Y-axis rotation)."); } diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index d0f4aa5a747..53de254662a 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -81,7 +81,7 @@ void rna_def_brush(BlenderRNA *brna) prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "rgb"); RNA_def_property_ui_text(prop, "Color", ""); - RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3.0f); + RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3); prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "alpha"); @@ -143,7 +143,7 @@ void rna_def_brush(BlenderRNA *brna) prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "clone.offset"); RNA_def_property_ui_text(prop, "Clone Offset", ""); - RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3.0f); + RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3); } void RNA_def_brush(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 35d0d926b0f..53359a9c39d 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -194,9 +194,9 @@ static void rna_def_image(BlenderRNA *brna) RNA_def_property_range(prop, 0, 128); RNA_def_property_ui_text(prop, "Animation End", "End frame of an animated texture."); - prop= RNA_def_property(srna, "animation_speed", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "animspeed"); - RNA_def_property_range(prop, 1.0f, 100.0f); + prop= RNA_def_property(srna, "animation_speed", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "animspeed"); + RNA_def_property_range(prop, 1, 100); RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second."); prop= RNA_def_property(srna, "tiles", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 6e7def08a63..9dd7f079369 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -306,13 +306,13 @@ void RNA_def_lamp(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Color", ""); - RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10.0f, 3.0f); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10.0f, 3); prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "shdwr"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Shadow Color", ""); - RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10.0f, 3.0f); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10.0f, 3); /* Booleans */ prop= RNA_def_property(srna, "auto_clip_start", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 15f07c3610b..26245ef3125 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -159,9 +159,9 @@ static void rna_def_material_raymirror(StructRNA *srna, PropertyRNA *prop) RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Ray Mirror Gloss Aniso", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent."); - prop= RNA_def_property(srna, "ray_mirror_gloss_samples", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "samp_gloss_mir"); - RNA_def_property_range(prop, 0.0f, 1024.0f); + prop= RNA_def_property(srna, "ray_mirror_gloss_samples", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir"); + RNA_def_property_range(prop, 0, 1024); RNA_def_property_ui_text(prop, "Ray Mirror Gloss Samples", "Number of cone samples averaged for blurry reflections."); prop= RNA_def_property(srna, "ray_mirror_adapt_thresh", PROP_FLOAT, PROP_NONE); @@ -211,9 +211,9 @@ static void rna_def_material_raytra(StructRNA *srna, PropertyRNA *prop) RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Ray Transparency Gloss", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions."); - prop= RNA_def_property(srna, "ray_transparency_gloss_samples", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "samp_gloss_tra"); - RNA_def_property_range(prop, 0.0f, 1024.0f); + prop= RNA_def_property(srna, "ray_transparency_gloss_samples", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra"); + RNA_def_property_range(prop, 0, 1024); RNA_def_property_ui_text(prop, "Ray Transparency Gloss Samples", "Number of cone samples averaged for blurry refractions."); prop= RNA_def_property(srna, "ray_transparency_adapt_thresh", PROP_FLOAT, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index d5489cede98..053ff2a8a5b 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -954,8 +954,8 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_AUTOSMOOTH); RNA_def_property_ui_text(prop, "Auto Smooth", "Treats all set-smoothed faces with angles less than the specified angle as 'smooth' during render"); - prop= RNA_def_property(srna, "autosmooth_angle", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "smoothresh"); + prop= RNA_def_property(srna, "autosmooth_angle", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "smoothresh"); RNA_def_property_range(prop, 1, 80); RNA_def_property_ui_text(prop, "Auto Smooth Angle", "Defines maximum angle between face normals that 'Auto Smooth' will operate on"); diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index 5d5999dfc86..1896e1ece66 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -149,15 +149,15 @@ void rna_def_near_sensor(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property."); - prop= RNA_def_property(srna, "distance", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "dist"); + prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "dist"); RNA_def_property_ui_text(prop, "Distance", "Trigger distance."); - RNA_def_property_range(prop, 0, 10000); + RNA_def_property_range(prop, 0.0f, 10000.0f); - prop= RNA_def_property(srna, "reset_distance", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "resetdist"); + prop= RNA_def_property(srna, "reset_distance", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "resetdist"); RNA_def_property_ui_text(prop, "Reset Distance", ""); - RNA_def_property_range(prop, 0, 10000); + RNA_def_property_range(prop, 0.0f, 10000.0f); } void rna_def_mouse_sensor(BlenderRNA *brna) |