~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to release/scripts/startup/bl_ui/properties_animviz.py

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-05-12 20:02:22 UTC
  • mfrom: (14.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20120512200222-lznjs2cxzaq96wua
Tags: 2.63a-1
* New upstream bugfix release
  + debian/patches/: re-worked since source code changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    bl_label = "Motion Paths"
32
32
    bl_options = {'DEFAULT_CLOSED'}
33
33
 
34
 
    def draw_settings(self, context, avs, bones=False):
 
34
    def draw_settings(self, context, avs, mpath, bones=False):
35
35
        layout = self.layout
36
36
 
37
37
        mps = avs.motion_path
38
 
 
 
38
        
 
39
        # Display Range
39
40
        layout.prop(mps, "type", expand=True)
40
41
 
41
42
        split = layout.split()
42
43
 
43
44
        col = split.column()
 
45
        col.label(text="Display Range:")
44
46
        sub = col.column(align=True)
45
47
        if (mps.type == 'CURRENT_FRAME'):
46
48
            sub.prop(mps, "frame_before", text="Before")
48
50
        elif (mps.type == 'RANGE'):
49
51
            sub.prop(mps, "frame_start", text="Start")
50
52
            sub.prop(mps, "frame_end", text="End")
51
 
 
 
53
            
52
54
        sub.prop(mps, "frame_step", text="Step")
 
55
        
 
56
        col = split.column()
53
57
        if bones:
54
 
            col.row().prop(mps, "bake_location", expand=True)
55
 
 
 
58
            col.label(text="Cache for Bone:")
 
59
        else:
 
60
            col.label(text="Cache:")
 
61
            
 
62
        if mpath:
 
63
            sub = col.column(align=True)
 
64
            sub.enabled = False
 
65
            sub.prop(mpath, "frame_start", text="From")
 
66
            sub.prop(mpath, "frame_end", text="To")
 
67
            
 
68
            sub = col.column() # align=True
 
69
            sub.operator_context = 'EXEC_DEFAULT'
 
70
            if bones:
 
71
                col.operator("pose.paths_calculate", text="Update", icon='BONE_DATA')
 
72
            else:
 
73
                col.operator("object.paths_calculate", text="Update", icon='OBJECT_DATA')
 
74
        else:
 
75
            col.label(text="Not available yet...", icon='ERROR')
 
76
            col.label(text="Calculate Paths first", icon='INFO')
 
77
        
 
78
        
 
79
        # Display Settings
 
80
        split = layout.split()
 
81
        
56
82
        col = split.column()
57
 
        col.label(text="Display:")
 
83
        col.label(text="Show:")
58
84
        col.prop(mps, "show_frame_numbers", text="Frame Numbers")
 
85
        
 
86
        col = split.column()
59
87
        col.prop(mps, "show_keyframe_highlight", text="Keyframes")
 
88
        sub = col.column()
 
89
        sub.enabled = mps.show_keyframe_highlight
60
90
        if bones:
61
 
            col.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
62
 
        col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
 
91
            sub.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
 
92
        sub.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
63
93
 
64
94
 
65
95
# FIXME: this panel still needs to be ported so that it will work correctly with animviz