diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 35 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 1 |
4 files changed, 4 insertions, 47 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 978ca0ba188..41be686048d 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -99,8 +99,10 @@ static int replace_if_different(char *tmpfile) arr_new= MEM_mallocN(sizeof(char)*len_new, "rna_cmp_file_new"); arr_org= MEM_mallocN(sizeof(char)*len_org, "rna_cmp_file_org"); - fread(arr_new, sizeof(char), len_new, fp_new); - fread(arr_org, sizeof(char), len_org, fp_org); + if(fread(arr_new, sizeof(char), len_new, fp_new) != len_new) + fprintf(stderr, "%s:%d, error reading file %s for comparison.\n", __FILE__, __LINE__, tmpfile); + if(fread(arr_org, sizeof(char), len_org, fp_org) != len_org) + fprintf(stderr, "%s:%d, error reading file %s for comparison.\n", __FILE__, __LINE__, orgfile); fclose(fp_new); fclose(fp_org); diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index ac354366c25..a32e12da2f6 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -246,40 +246,6 @@ ID *rna_ID_copy(ID *id) return NULL; } -static int rna_IDPropertyGroup_name_length(PointerRNA *ptr) -{ - IDProperty *group=(IDProperty*)ptr->id.data; - IDProperty *idprop; - idprop= IDP_GetPropertyFromGroup(group, "name"); - - if(idprop && idprop->type == IDP_STRING) - return strlen(idprop->data.pointer); - else - return 0; -} - -static void rna_IDPropertyGroup_name_get(PointerRNA *ptr, char *str) -{ - IDProperty *group=(IDProperty*)ptr->id.data; - IDProperty *idprop; - idprop= IDP_GetPropertyFromGroup(group, "name"); - - if(idprop && idprop->type == IDP_STRING) - strcpy(str, idprop->data.pointer); - else - str[0]= '\0'; -} - -void rna_IDPropertyGroup_name_set(PointerRNA *ptr, const char *value) -{ - IDProperty *group=(IDProperty*)ptr->id.data; - IDProperty *idprop; - IDPropertyTemplate val = {0}; - val.str= (char *)value; - idprop = IDP_New(IDP_STRING, val, "name"); - IDP_ReplaceInGroup(group, idprop); -} - #else static void rna_def_ID_properties(BlenderRNA *brna) @@ -357,7 +323,6 @@ static void rna_def_ID_properties(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY); //RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting."); - RNA_def_property_string_funcs(prop, "rna_IDPropertyGroup_name_get", "rna_IDPropertyGroup_name_length", "rna_IDPropertyGroup_name_set"); RNA_def_struct_name_property(srna, prop); } diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index dd67f5604c0..346ecb1efa9 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -129,7 +129,6 @@ void rna_def_actuator(BlenderRNA *brna) static void rna_def_object_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "ObjectActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Object Actuator", "Actuator to control the object movement."); @@ -259,7 +258,6 @@ static void rna_def_camera_actuator(BlenderRNA *brna) static void rna_def_sound_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "SoundActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Sound Actuator", "Actuator to ..."); @@ -271,7 +269,6 @@ static void rna_def_sound_actuator(BlenderRNA *brna) static void rna_def_property_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "PropertyActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Property Actuator", "Actuator to ..."); @@ -283,7 +280,6 @@ static void rna_def_property_actuator(BlenderRNA *brna) static void rna_def_constraint_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "ConstraintActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Constraint Actuator", "Actuator to ..."); @@ -295,7 +291,6 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) static void rna_def_edit_object_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "EditObjectActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Edit Object Actuator", "Actuator to ..."); @@ -527,7 +522,6 @@ static void rna_def_message_actuator(BlenderRNA *brna) static void rna_def_action_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "ActionActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Action Actuator", "Actuator to ..."); @@ -696,7 +690,6 @@ static void rna_def_parent_actuator(BlenderRNA *brna) static void rna_def_shape_action_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "ShapeActionActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Shape Action Actuator", "Actuator to ..."); @@ -708,7 +701,6 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) static void rna_def_state_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "StateActuator", "Actuator"); RNA_def_struct_ui_text(srna, "State Actuator", "Actuator to ..."); @@ -720,7 +712,6 @@ static void rna_def_state_actuator(BlenderRNA *brna) static void rna_def_armature_actuator(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "ArmatureActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Armature Actuator", "Actuator to ..."); diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index a9ef608cd6c..3ada3689d6c 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -232,7 +232,6 @@ static void rna_def_curvemapping(BlenderRNA *brna) static void rna_def_histogram(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna= RNA_def_struct(brna, "Histogram", NULL); RNA_def_struct_ui_text(srna, "Histogram", "Statistical view of the levels of color in an image"); |