diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-06 03:30:41 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-06 03:30:41 +0400 |
commit | 0114d78c33edfaef5bc412eefcb5d52a0a6823b0 (patch) | |
tree | 2deb1401eb9152ccf44855b8674ee75560b1ad9f /source/blender/makesrna/intern/rna_scene_api.c | |
parent | 1eb893a11410955a9cf3ceb41ab50d515f5393b1 (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_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 6d588632c95..11659df3586 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -52,8 +52,8 @@ static void rna_Scene_frame_set(Scene *scene, int frame, float subframe) { - scene->r.cfra= frame; - scene->r.subframe= subframe; + scene->r.cfra = frame; + scene->r.subframe = subframe; CLAMP(scene->r.cfra, MINAFRAME, MAXFRAME); scene_update_for_newframe(G.main, scene, (1<<20) - 1); @@ -74,10 +74,10 @@ static void rna_Scene_update_tagged(Scene *scene) static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name) { - if(BKE_imtype_is_movie(rd->im_format.imtype)) + if (BKE_imtype_is_movie(rd->im_format.imtype)) BKE_makeanimstring(name, rd); else - BKE_makepicstring(name, rd->pic, G.main->name, (frame==INT_MIN) ? rd->cfra : frame, rd->im_format.imtype, rd->scemode & R_EXTENSION, TRUE); + BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, rd->im_format.imtype, rd->scemode & R_EXTENSION, TRUE); } #ifdef WITH_COLLADA @@ -98,23 +98,23 @@ void RNA_api_scene(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - func= RNA_def_function(srna, "frame_set", "rna_Scene_frame_set"); + func = RNA_def_function(srna, "frame_set", "rna_Scene_frame_set"); RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately"); - parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set", MINAFRAME, MAXFRAME); + parm = RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set", MINAFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_float(func, "subframe", 0.0, 0.0, 1.0, "", "Sub-frame time, between 0.0 and 1.0", 0.0, 1.0); - func= RNA_def_function(srna, "update", "rna_Scene_update_tagged"); + func = RNA_def_function(srna, "update", "rna_Scene_update_tagged"); RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators"); #ifdef WITH_COLLADA /* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */ - func= RNA_def_function(srna, "collada_export", "rna_Scene_collada_export"); - parm= RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file"); + func = RNA_def_function(srna, "collada_export", "rna_Scene_collada_export"); + parm = RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */ - parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements"); - parm= RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life"); + parm = RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements"); + parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life"); RNA_def_function_ui_description(func, "Export to collada file"); #endif } @@ -125,11 +125,11 @@ void RNA_api_scene_render(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - func= RNA_def_function(srna, "frame_path", "rna_SceneRender_get_frame_path"); + func = RNA_def_function(srna, "frame_path", "rna_SceneRender_get_frame_path"); RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame"); RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "", "Frame number to use, if unset the current frame will be used", MINAFRAME, MAXFRAME); - parm= RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path", + parm = RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path", "The resulting filepath from the scenes render settings"); RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ RNA_def_function_output(func, parm); |