diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-12 15:01:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-12 15:01:29 +0400 |
commit | a9f6e5438443e6b35db1e22f6c595d31804af9b6 (patch) | |
tree | c196cb64ba0c687bf1ed9f568a710b7ee865b230 /source/blender/makesrna/intern/rna_animviz.c | |
parent | 68e27b749ec0ebcde549cf2bc442a17f829c87ee (diff) |
style cleanup: mostly whitespace in rna
Diffstat (limited to 'source/blender/makesrna/intern/rna_animviz.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_animviz.c | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c index 167eb23c023..990d7c43309 100644 --- a/source/blender/makesrna/intern/rna_animviz.c +++ b/source/blender/makesrna/intern/rna_animviz.c @@ -45,7 +45,8 @@ EnumPropertyItem motionpath_bake_location_items[] = { {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"}, {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"}, //{MOTIONPATH_BAKE_CENTERS, "CENTROID", 0, "Centers", "Calculate bone paths from center of mass"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; #ifdef RNA_RUNTIME @@ -61,7 +62,7 @@ static PointerRNA rna_AnimViz_motion_paths_get(PointerRNA *ptr) static void rna_AnimViz_ghost_start_frame_set(PointerRNA *ptr, int value) { - bAnimVizSettings *data = (bAnimVizSettings*)ptr->data; + bAnimVizSettings *data = (bAnimVizSettings *)ptr->data; CLAMP(value, 1, data->ghost_ef); data->ghost_sf = value; @@ -69,26 +70,26 @@ static void rna_AnimViz_ghost_start_frame_set(PointerRNA *ptr, int value) static void rna_AnimViz_ghost_end_frame_set(PointerRNA *ptr, int value) { - bAnimVizSettings *data = (bAnimVizSettings*)ptr->data; + bAnimVizSettings *data = (bAnimVizSettings *)ptr->data; - CLAMP(value, data->ghost_sf, (int)(MAXFRAMEF/2)); + CLAMP(value, data->ghost_sf, (int)(MAXFRAMEF / 2)); data->ghost_ef = value; } static void rna_AnimViz_path_start_frame_set(PointerRNA *ptr, int value) { - bAnimVizSettings *data = (bAnimVizSettings*)ptr->data; + bAnimVizSettings *data = (bAnimVizSettings *)ptr->data; - CLAMP(value, 1, data->path_ef-1); + CLAMP(value, 1, data->path_ef - 1); data->path_sf = value; } static void rna_AnimViz_path_end_frame_set(PointerRNA *ptr, int value) { - bAnimVizSettings *data = (bAnimVizSettings*)ptr->data; + bAnimVizSettings *data = (bAnimVizSettings *)ptr->data; /* XXX: watchit! Path Start > MAXFRAME/2 could be a problem... */ - CLAMP(value, data->path_sf+1, (int)(MAXFRAMEF/2)); + CLAMP(value, data->path_sf + 1, (int)(MAXFRAMEF / 2)); data->path_ef = value; } @@ -175,7 +176,8 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna) {GHOST_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Current Frame", "Show ghosts from around the current frame"}, {GHOST_TYPE_RANGE, "RANGE", 0, "In Range", "Show ghosts for the specified frame range"}, {GHOST_TYPE_KEYS, "KEYS", 0, "On Keyframes", "Show ghosts on keyframes"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; srna = RNA_def_struct(brna, "AnimVizOnionSkinning", NULL); @@ -188,21 +190,21 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "ghost_type"); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Type", "Method used for determining what ghosts get drawn"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ /* Settings */ prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ghost_flag", GHOST_FLAG_ONLYSEL); RNA_def_property_ui_text(prop, "On Selected Bones Only", "For Pose-Mode drawing, only draw ghosts for selected bones"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ghost_step"); RNA_def_property_range(prop, 1, 20); RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between ghosts shown (not for 'On Keyframes' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ /* Playback Ranges */ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME); @@ -211,7 +213,7 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of Ghosts to display " "(not for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "ghost_ef"); @@ -219,7 +221,7 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna) RNA_def_property_ui_text(prop, "End Frame", "End frame of range of Ghosts to display " "(not for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ /* Around Current Ranges */ prop = RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME); @@ -228,7 +230,7 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame " "(only for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "ghost_ac"); @@ -236,7 +238,7 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna) RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame " "(only for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ } static void rna_def_animviz_paths(BlenderRNA *brna) @@ -246,9 +248,10 @@ static void rna_def_animviz_paths(BlenderRNA *brna) static const EnumPropertyItem prop_type_items[] = { {MOTIONPATH_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Frame", - "Display Paths of poses within a fixed number of frames around the current frame"}, + "Display Paths of poses within a fixed number of frames around the current frame"}, {MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; srna = RNA_def_struct(brna, "AnimVizMotionPaths", NULL); RNA_def_struct_sdna(srna, "bAnimVizSettings"); @@ -260,43 +263,43 @@ static void rna_def_animviz_paths(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "path_type"); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Paths Type", "Type of range to show for Motion Paths"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "path_bakeflag"); RNA_def_property_enum_items(prop, motionpath_bake_location_items); RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ /* Settings */ prop = RNA_def_property(srna, "show_frame_numbers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_FNUMS); RNA_def_property_ui_text(prop, "Show Frame Numbers", "Show frame numbers on Motion Paths"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "show_keyframe_highlight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFRAS); RNA_def_property_ui_text(prop, "Highlight Keyframes", "Emphasize position of keyframes on Motion Paths"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "show_keyframe_numbers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFNOS); RNA_def_property_ui_text(prop, "Show Keyframe Numbers", "Show frame numbers of Keyframes on Motion Paths"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "show_keyframe_action_all", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFACT); RNA_def_property_ui_text(prop, "All Action Keyframes", "For bone motion paths, search whole Action for keyframes instead of in group" " with matching name only (is slower)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "path_step"); RNA_def_property_range(prop, 1, 100); RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between paths shown (not for 'On Keyframes' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ /* Playback Ranges */ @@ -306,7 +309,7 @@ static void rna_def_animviz_paths(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of paths to display/calculate " "(not for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "path_ef"); @@ -314,24 +317,24 @@ static void rna_def_animviz_paths(BlenderRNA *brna) RNA_def_property_ui_text(prop, "End Frame", "End frame of range of paths to display/calculate " "(not for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ /* Around Current Ranges */ prop = RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "path_bc"); - RNA_def_property_range(prop, 1, MAXFRAMEF/2); + RNA_def_property_range(prop, 1, MAXFRAMEF / 2); RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame " "(only for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ prop = RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "path_ac"); - RNA_def_property_range(prop, 1, MAXFRAMEF/2); + RNA_def_property_range(prop, 1, MAXFRAMEF / 2); RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame " "(only for 'Around Current Frame' Onion-skinning method)"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ } /* --- */ @@ -375,8 +378,8 @@ static void rna_def_animviz(BlenderRNA *brna) void RNA_def_animviz(BlenderRNA *brna) { rna_def_animviz(brna); - rna_def_animviz_ghosts(brna); - rna_def_animviz_paths(brna); + rna_def_animviz_ghosts(brna); + rna_def_animviz_paths(brna); rna_def_animviz_motion_path(brna); rna_def_animviz_motionpath_vert(brna); |