Commit: 348cf17448624c66711465d373fc0c46fa000863
Author: Campbell Barton
Date:   Thu Jan 16 21:43:22 2014 +1100
https://developer.blender.org/rB348cf17448624c66711465d373fc0c46fa000863

Code Cleanup: no need to pass empty strings as default values

===================================================================

M       source/blender/editors/curve/editfont.c
M       source/blender/editors/mask/mask_ops.c
M       source/blender/editors/object/object_add.c
M       source/blender/editors/object/object_constraint.c
M       source/blender/editors/object/object_edit.c
M       source/blender/editors/object/object_modifier.c
M       source/blender/editors/object/object_select.c
M       source/blender/editors/render/render_internal.c
M       source/blender/editors/sculpt_paint/paint_image_proj.c
M       source/blender/editors/sound/sound_ops.c
M       source/blender/editors/space_clip/tracking_ops.c
M       source/blender/editors/space_console/console_ops.c
M       source/blender/editors/space_file/file_ops.c
M       source/blender/editors/space_image/image_ops.c
M       source/blender/editors/space_info/info_ops.c
M       source/blender/editors/space_logic/logic_ops.c
M       source/blender/editors/space_node/node_edit.c
M       source/blender/editors/space_script/script_edit.c
M       source/blender/editors/space_text/text_ops.c
M       source/blender/editors/transform/transform_ops.c
M       source/blender/makesrna/intern/rna_action.c
M       source/blender/makesrna/intern/rna_animation.c
M       source/blender/makesrna/intern/rna_define.c
M       source/blender/makesrna/intern/rna_image_api.c
M       source/blender/makesrna/intern/rna_main_api.c
M       source/blender/makesrna/intern/rna_mask.c
M       source/blender/makesrna/intern/rna_mesh_api.c
M       source/blender/makesrna/intern/rna_nodetree.c
M       source/blender/makesrna/intern/rna_object_api.c
M       source/blender/makesrna/intern/rna_render.c
M       source/blender/makesrna/intern/rna_scene.c
M       source/blender/makesrna/intern/rna_scene_api.c
M       source/blender/makesrna/intern/rna_texture_api.c
M       source/blender/makesrna/intern/rna_tracking.c
M       source/blender/makesrna/intern/rna_ui.c
M       source/blender/makesrna/intern/rna_ui_api.c
M       source/blender/makesrna/intern/rna_wm_api.c
M       source/blender/python/intern/bpy_props.c
M       source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/editors/curve/editfont.c 
b/source/blender/editors/curve/editfont.c
index 4b5dbc2..9f97a0a 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1469,7 +1469,7 @@ void FONT_OT_text_insert(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the 
cursor position");
+       RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at 
the cursor position");
        RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed 
character will strike through previous, for special character input");
 }
 
diff --git a/source/blender/editors/mask/mask_ops.c 
b/source/blender/editors/mask/mask_ops.c
index 5bc3928..f6ba406 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -338,7 +338,7 @@ void MASK_OT_new(wmOperatorType *ot)
        ot->poll = ED_operator_mask;
 
        /* properties */
-       RNA_def_string(ot->srna, "name", "", MAX_ID_NAME - 2, "Name", "Name of 
new mask");
+       RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Name 
of new mask");
 }
 
 /******************** create new masklay *********************/
@@ -373,7 +373,7 @@ void MASK_OT_layer_new(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_string(ot->srna, "name", "", MAX_ID_NAME - 2, "Name", "Name of 
new mask layer");
+       RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Name 
of new mask layer");
 }
 
 /******************** remove mask layer *********************/
diff --git a/source/blender/editors/object/object_add.c 
b/source/blender/editors/object/object_add.c
index c6dcc0b..b2977bb 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -831,9 +831,9 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       prop = RNA_def_string(ot->srna, "filepath", "", FILE_MAX, "Filepath", 
"Path to image file");
+       prop = RNA_def_string(ot->srna, "filepath", NULL, FILE_MAX, "Filepath", 
"Path to image file");
        RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
-       prop = RNA_def_string(ot->srna, "name", "", MAX_ID_NAME - 2, "Name", 
"Image name to assign");
+       prop = RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", 
"Image name to assign");
        RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
        ED_object_add_generic_props(ot, FALSE);
 }
@@ -2191,7 +2191,7 @@ void OBJECT_OT_add_named(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but 
not object data, linking to the original data");
-       RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME - 2, "Name", 
"Object name to add");
+       RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Object 
name to add");
 }
 
 /**************************** Join *************************/
diff --git a/source/blender/editors/object/object_constraint.c 
b/source/blender/editors/object/object_constraint.c
index e9e7dd2..f816d5a 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -555,7 +555,7 @@ static int edit_constraint_poll(bContext *C)
 
 static void edit_constraint_properties(wmOperatorType *ot)
 {
-       RNA_def_string(ot->srna, "constraint", "", MAX_NAME, "Constraint", 
"Name of the constraint to edit");
+       RNA_def_string(ot->srna, "constraint", NULL, MAX_NAME, "Constraint", 
"Name of the constraint to edit");
        RNA_def_enum(ot->srna, "owner", constraint_owner_items, 0, "Owner", 
"The owner of this constraint");
 }
 
diff --git a/source/blender/editors/object/object_edit.c 
b/source/blender/editors/object/object_edit.c
index 5488545..3e3aedd 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1731,7 +1731,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        RNA_def_enum(ot->srna, "type", gameproperty_type_items, GPROP_FLOAT, 
"Type", "Type of game property to add");
-       RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the 
game property to add");
+       RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the 
game property to add");
 }
 
 static int game_property_remove_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/object/object_modifier.c 
b/source/blender/editors/object/object_modifier.c
index b3e6772..92775b2 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -826,7 +826,7 @@ static int edit_modifier_poll(bContext *C)
 
 static void edit_modifier_properties(wmOperatorType *ot)
 {
-       RNA_def_string(ot->srna, "modifier", "", MAX_NAME, "Modifier", "Name of 
the modifier to edit");
+       RNA_def_string(ot->srna, "modifier", NULL, MAX_NAME, "Modifier", "Name 
of the modifier to edit");
 }
 
 static int edit_modifier_invoke_properties(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/object/object_select.c 
b/source/blender/editors/object/object_select.c
index 8e7e97a..1fce321 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -1065,7 +1065,7 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
-       RNA_def_string(ot->srna, "group", "", MAX_ID_NAME, "Group", "Name of 
the group to select");
+       RNA_def_string(ot->srna, "group", NULL, MAX_ID_NAME, "Group", "Name of 
the group to select");
 }
 
 /**************************** Select Mirror ****************************/
diff --git a/source/blender/editors/render/render_internal.c 
b/source/blender/editors/render/render_internal.c
index deec422..ae3ccf6 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -907,9 +907,9 @@ void RENDER_OT_render(wmOperatorType *ot)
        RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files 
from the animation range of this scene");
        RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save 
rendered the image to the output path (used only when animation is disabled)");
        RNA_def_boolean(ot->srna, "use_viewport", 0, "Use 3D Viewport", "When 
inside a 3D viewport, use layers and camera of the viewport");
-       prop = RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render 
Layer", "Single render layer to re-render (used only when animation is 
disabled)");
+       prop = RNA_def_string(ot->srna, "layer", NULL, RE_MAXNAME, "Render 
Layer", "Single render layer to re-render (used only when animation is 
disabled)");
        RNA_def_property_flag(prop, PROP_SKIP_SAVE);
-       prop = RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME - 2, "Scene", 
"Scene to render, current scene if not specified");
+       prop = RNA_def_string(ot->srna, "scene", NULL, MAX_ID_NAME - 2, 
"Scene", "Scene to render, current scene if not specified");
        RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c 
b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 385d1aa..9f3743c 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4544,5 +4544,5 @@ void PAINT_OT_image_from_view(wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER;
 
-       RNA_def_string_file_name(ot->srna, "filepath", "", FILE_MAX, "File 
Path", "Name of the file");
+       RNA_def_string_file_name(ot->srna, "filepath", NULL, FILE_MAX, "File 
Path", "Name of the file");
 }
diff --git a/source/blender/editors/sound/sound_ops.c 
b/source/blender/editors/sound/sound_ops.c
index 50a90d4..168693d 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -787,7 +787,7 @@ static void SOUND_OT_unpack(wmOperatorType *ot)
 
        /* properties */
        RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, 
"Method", "How to unpack");
-       RNA_def_string(ot->srna, "id", "", MAX_ID_NAME - 2, "Sound Name", 
"Sound datablock name to unpack"); /* XXX, weark!, will fail with library, name 
collisions */
+       RNA_def_string(ot->srna, "id", NULL, MAX_ID_NAME - 2, "Sound Name", 
"Sound datablock name to unpack"); /* XXX, weark!, will fail with library, name 
collisions */
 }
 
 /* ******************************************************* */
diff --git a/source/blender/editors/space_clip/tracking_ops.c 
b/source/blender/editors/space_clip/tracking_ops.c
index 00e470f..1269f95 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1522,7 +1522,7 @@ void CLIP_OT_track_markers(wmOperatorType *ot)
        /* properties */
        RNA_def_boolean(ot->srna, "backwards", 0, "Backwards", "Do backwards 
tracking");
        RNA_def_boolean(ot->srna, "sequence", 0, "Track Sequence", "Track 
marker during image sequence rather than single image");
-       prop = RNA_def_string(ot->srna, "clip", "", MAX_NAME, "Movie Clip", 
"Movie Clip to be tracked");
+       prop = RNA_def_string(ot->srna, "clip", NULL, MAX_NAME, "Movie Clip", 
"Movie Clip to be tracked");
        RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
diff --git a/source/blender/editors/space_console/console_ops.c 
b/source/blender/editors/space_console/console_ops.c
index 0ddaa34..3b1af1a 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -440,7 +440,7 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
        ot->poll = ED_operator_console_active;
 
        /* properties */
-       prop = RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert 
at the cursor position");
+       prop = RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to 
insert at the cursor position");
        RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
@@ -825,7 +825,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
        ot->poll = ED_operator_console_active;
        
        /* properties */
-       RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the 
cursor position");
+       RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to i

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to