Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_animviz.c
| Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | static void rna_def_animviz_motion_path(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "length", PROP_INT, PROP_TIME); | prop = RNA_def_property(srna, "length", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Length", "Number of frames cached"); | RNA_def_property_ui_text(prop, "Length", "Number of frames cached"); | ||||
| /* Custom Color */ | /* Custom Color */ | ||||
| prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA); | prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA); | ||||
| RNA_def_property_array(prop, 3); | RNA_def_property_array(prop, 3); | ||||
| RNA_def_property_ui_text(prop, "Color", "Custom color for motion path"); | RNA_def_property_ui_text(prop, "Color", "Custom color for motion path"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| /* Line width */ | /* Line width */ | ||||
| prop = RNA_def_property(srna, "line_thickness", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "line_thickness", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "line_thickness"); | RNA_def_property_int_sdna(prop, NULL, "line_thickness"); | ||||
| RNA_def_property_range(prop, 1, 6); | RNA_def_property_range(prop, 1, 6); | ||||
| RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness for motion path"); | RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness for motion path"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| /* Settings */ | /* Settings */ | ||||
| prop = RNA_def_property(srna, "use_bone_head", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_bone_head", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_BHEAD); | RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_BHEAD); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* xxx */ | RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* xxx */ | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Use Bone Heads", | "Use Bone Heads", | ||||
| "For PoseBone paths, use the bone head location when calculating this path"); | "For PoseBone paths, use the bone head location when calculating this path"); | ||||
| /* FIXME: Motion Paths are not currently editable... */ | /* FIXME: Motion Paths are not currently editable... */ | ||||
| prop = RNA_def_property(srna, "is_modified", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_modified", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_EDIT); | RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_EDIT); | ||||
| RNA_def_property_ui_text(prop, "Edit Path", "Path is being edited"); | RNA_def_property_ui_text(prop, "Edit Path", "Path is being edited"); | ||||
| /* Use custom color */ | /* Use custom color */ | ||||
| prop = RNA_def_property(srna, "use_custom_color", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_custom_color", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_CUSTOM); | RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_CUSTOM); | ||||
| RNA_def_property_ui_text(prop, "Custom Colors", "Use custom color for this motion path"); | RNA_def_property_ui_text(prop, "Custom Colors", "Use custom color for this motion path"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| /* Draw lines between keyframes */ | /* Draw lines between keyframes */ | ||||
| prop = RNA_def_property(srna, "lines", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "lines", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_LINES); | RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_LINES); | ||||
| RNA_def_property_ui_text(prop, "Lines", "Use straight lines between keyframe points"); | RNA_def_property_ui_text(prop, "Lines", "Use straight lines between keyframe points"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| } | } | ||||
| /* --- */ | /* --- */ | ||||
| static void rna_def_animviz_paths(BlenderRNA *brna) | static void rna_def_animviz_paths(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| Show All 18 Lines | static void rna_def_animviz_paths(BlenderRNA *brna) | ||||
| RNA_def_struct_ui_text( | RNA_def_struct_ui_text( | ||||
| srna, "Motion Path Settings", "Motion Path settings for animation visualization"); | srna, "Motion Path Settings", "Motion Path settings for animation visualization"); | ||||
| /* Enums */ | /* Enums */ | ||||
| prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "path_type"); | RNA_def_property_enum_sdna(prop, NULL, "path_type"); | ||||
| RNA_def_property_enum_items(prop, prop_type_items); | 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_ui_text(prop, "Paths Type", "Type of range to show for Motion Paths"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| 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); | 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_bitflag_sdna(prop, NULL, "path_bakeflag"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_motionpath_bake_location_items); | RNA_def_property_enum_items(prop, rna_enum_motionpath_bake_location_items); | ||||
| RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips"); | RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ | |||||
| /* Settings */ | /* Settings */ | ||||
| prop = RNA_def_property(srna, "show_frame_numbers", PROP_BOOLEAN, PROP_NONE); | 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_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_ui_text(prop, "Show Frame Numbers", "Show frame numbers on Motion Paths"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| 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); | 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_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFRAS); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Highlight Keyframes", "Emphasize position of keyframes on Motion Paths"); | prop, "Highlight Keyframes", "Emphasize position of keyframes on Motion Paths"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| 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); | 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_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFNOS); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Show Keyframe Numbers", "Show frame numbers of Keyframes on Motion Paths"); | prop, "Show Keyframe Numbers", "Show frame numbers of Keyframes on Motion Paths"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| 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); | 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_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFACT); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "All Action Keyframes", | "All Action Keyframes", | ||||
| "For bone motion paths, search whole Action for keyframes instead of in group" | "For bone motion paths, search whole Action for keyframes instead of in group" | ||||
| " with matching name only (is slower)"); | " with matching name only (is slower)"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| 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); | prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "path_step"); | RNA_def_property_int_sdna(prop, NULL, "path_step"); | ||||
| RNA_def_property_range(prop, 1, 100); | RNA_def_property_range(prop, 1, 100); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Frame Step", | "Frame Step", | ||||
| "Number of frames between paths shown (not for 'On Keyframes' Onion-skinning method)"); | "Number of frames between paths shown (not for 'On Keyframes' Onion-skinning method)"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ | |||||
| /* Playback Ranges */ | /* Playback Ranges */ | ||||
| prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME); | prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_int_sdna(prop, NULL, "path_sf"); | RNA_def_property_int_sdna(prop, NULL, "path_sf"); | ||||
| RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_start_frame_set", NULL); | RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_start_frame_set", NULL); | ||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Start Frame", | "Start Frame", | ||||
| "Starting frame of range of paths to display/calculate " | "Starting frame of range of paths to display/calculate " | ||||
| "(not for 'Around Current Frame' Onion-skinning method)"); | "(not for 'Around Current Frame' Onion-skinning method)"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| 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); | prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_int_sdna(prop, NULL, "path_ef"); | RNA_def_property_int_sdna(prop, NULL, "path_ef"); | ||||
| RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_end_frame_set", NULL); | RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_end_frame_set", NULL); | ||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "End Frame", | "End Frame", | ||||
| "End frame of range of paths to display/calculate " | "End frame of range of paths to display/calculate " | ||||
| "(not for 'Around Current Frame' Onion-skinning method)"); | "(not for 'Around Current Frame' Onion-skinning method)"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ | |||||
| /* Around Current Ranges */ | /* Around Current Ranges */ | ||||
| prop = RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME); | prop = RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_int_sdna(prop, NULL, "path_bc"); | 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, | RNA_def_property_ui_text(prop, | ||||
| "Before Current", | "Before Current", | ||||
| "Number of frames to show before the current frame " | "Number of frames to show before the current frame " | ||||
| "(only for 'Around Current Frame' Onion-skinning method)"); | "(only for 'Around Current Frame' Onion-skinning method)"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| 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); | prop = RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_int_sdna(prop, NULL, "path_ac"); | 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, | RNA_def_property_ui_text(prop, | ||||
| "After Current", | "After Current", | ||||
| "Number of frames to show after the current frame " | "Number of frames to show after the current frame " | ||||
| "(only for 'Around Current Frame' Onion-skinning method)"); | "(only for 'Around Current Frame' Onion-skinning method)"); | ||||
| RNA_def_property_update( | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL); | ||||
| prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ | |||||
| /* Readonly Property - Do any motion paths exist/need updating? (Mainly for bone paths) */ | /* Readonly Property - Do any motion paths exist/need updating? (Mainly for bone paths) */ | ||||
| prop = RNA_def_property(srna, "has_motion_paths", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "has_motion_paths", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "path_bakeflag", MOTIONPATH_BAKE_HAS_PATHS); | RNA_def_property_boolean_sdna(prop, NULL, "path_bakeflag", MOTIONPATH_BAKE_HAS_PATHS); | ||||
| /* NOTE: This is really an internal state var for convenience, so don't allow edits! */ | /* NOTE: This is really an internal state var for convenience, so don't allow edits! */ | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Has Motion Paths", "Are there any bone paths that will need updating (read-only)"); | prop, "Has Motion Paths", "Are there any bone paths that will need updating (read-only)"); | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||