diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_animviz.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_animviz.py | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py index 93feb8adc7a..3f25006766e 100644 --- a/release/scripts/startup/bl_ui/properties_animviz.py +++ b/release/scripts/startup/bl_ui/properties_animviz.py @@ -31,16 +31,18 @@ class MotionPathButtonsPanel(): bl_label = "Motion Paths" bl_options = {'DEFAULT_CLOSED'} - def draw_settings(self, context, avs, bones=False): + def draw_settings(self, context, avs, mpath, bones=False): layout = self.layout mps = avs.motion_path - + + # Display Range layout.prop(mps, "type", expand=True) split = layout.split() col = split.column() + col.label(text="Display Range:") sub = col.column(align=True) if (mps.type == 'CURRENT_FRAME'): sub.prop(mps, "frame_before", text="Before") @@ -48,18 +50,46 @@ class MotionPathButtonsPanel(): elif (mps.type == 'RANGE'): sub.prop(mps, "frame_start", text="Start") sub.prop(mps, "frame_end", text="End") - + sub.prop(mps, "frame_step", text="Step") + + col = split.column() if bones: - col.row().prop(mps, "bake_location", expand=True) - + col.label(text="Cache for Bone:") + else: + col.label(text="Cache:") + + if mpath: + sub = col.column(align=True) + sub.enabled = False + sub.prop(mpath, "frame_start", text="From") + sub.prop(mpath, "frame_end", text="To") + + sub = col.column() # align=True + sub.operator_context = 'EXEC_DEFAULT' + if bones: + col.operator("pose.paths_calculate", text="Update", icon='BONE_DATA') + else: + col.operator("object.paths_calculate", text="Update", icon='OBJECT_DATA') + else: + col.label(text="Not available yet...", icon='ERROR') + col.label(text="Calculate Paths first", icon='INFO') + + + # Display Settings + split = layout.split() + col = split.column() - col.label(text="Display:") + col.label(text="Show:") col.prop(mps, "show_frame_numbers", text="Frame Numbers") + + col = split.column() col.prop(mps, "show_keyframe_highlight", text="Keyframes") + sub = col.column() + sub.enabled = mps.show_keyframe_highlight if bones: - col.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes") - col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers") + sub.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes") + sub.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers") # FIXME: this panel still needs to be ported so that it will work correctly with animviz |