~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                    row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN',
95
95
                             text="Filters")
96
96
 
97
 
                    sub = row.column()
 
97
                    sub = row.row(align=True)
98
98
                    sub.active = clip.tracking.reconstruction.is_valid
99
99
                    sub.prop(sc, "show_graph_frames", icon='SEQUENCE', text="")
100
100
 
211
211
        settings = clip.tracking.settings
212
212
 
213
213
        col = layout.column(align=True)
214
 
        props = col.operator("clip.add_marker_at_click", text="Add Marker")
 
214
        col.operator("clip.add_marker_at_click", text="Add Marker")
215
215
        col.operator("clip.detect_features")
216
216
        col.operator("clip.delete_track")
217
217
 
227
227
            row.menu('CLIP_MT_tracking_settings_presets', text=label)
228
228
            row.operator("clip.tracking_settings_preset_add",
229
229
                         text="", icon='ZOOMIN')
230
 
            props = row.operator("clip.tracking_settings_preset_add",
231
 
                                 text="", icon='ZOOMOUT')
232
 
            props.remove_active = True
 
230
            row.operator("clip.tracking_settings_preset_add",
 
231
                         text="", icon='ZOOMOUT').remove_active = True
233
232
 
234
233
            col.separator()
235
234
 
295
294
        col = layout.column()
296
295
        col.label(text="Refine:")
297
296
        row = col.row(align=True)
298
 
        props = row.operator("clip.refine_markers", text="Backwards")
299
 
        props.backwards = True
300
 
        props = row.operator("clip.refine_markers", text="Forwards")
301
 
        props.backwards = False
302
 
 
303
 
        col = layout.column(align=True)
304
 
        props = col.operator("clip.clear_track_path", text="Clear After")
305
 
        props.action = 'REMAINED'
306
 
 
307
 
        props = col.operator("clip.clear_track_path", text="Clear Before")
308
 
        props.action = 'UPTO'
309
 
        col.operator("clip.clear_track_path", text="Clear").action = 'ALL'
 
297
        row.operator("clip.refine_markers", text="Backwards").backwards = True
 
298
        row.operator("clip.refine_markers", text="Forwards").backwards = False
 
299
 
 
300
        col = layout.column()
 
301
        col.label(text="Clear:")
 
302
        row = col.row(align=True)
 
303
        row.operator("clip.clear_track_path", text="Before").action = 'UPTO'
 
304
        row.operator("clip.clear_track_path", text="After").action = 'REMAINED'
310
305
 
311
306
        layout.operator("clip.join_tracks", text="Join")
312
307
 
313
308
 
 
309
class CLIP_PT_tools_plane_tracking(CLIP_PT_tracking_panel, Panel):
 
310
    bl_space_type = 'CLIP_EDITOR'
 
311
    bl_region_type = 'TOOLS'
 
312
    bl_label = "Plane Track"
 
313
    bl_options = {'DEFAULT_CLOSED'}
 
314
 
 
315
    def draw(self, context):
 
316
        layout = self.layout
 
317
        layout.operator("clip.create_plane_track")
 
318
 
 
319
 
314
320
class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
315
321
    bl_space_type = 'CLIP_EDITOR'
316
322
    bl_region_type = 'TOOLS'
350
356
        col.active = not settings.use_tripod_solver
351
357
        col.prop(settings, "use_fallback_reconstruction",
352
358
                 text="Allow Fallback")
353
 
        sub = col.column()
 
359
        sub = col.column(align=True)
354
360
        sub.active = settings.use_fallback_reconstruction
355
361
        sub.prop(settings, "reconstruction_success_threshold")
356
362
 
395
401
        settings = sc.clip.tracking.settings
396
402
 
397
403
        col = layout.column(align=True)
398
 
        row = col.row()
399
 
        props = row.operator("clip.set_plane", text="Floor")
400
 
        props.plane = 'FLOOR'
401
 
        props = row.operator("clip.set_plane", text="Wall")
402
 
        props.plane = 'WALL'
 
404
        row = col.row(align=True)
 
405
        row.operator("clip.set_plane", text="Floor").plane = 'FLOOR'
 
406
        row.operator("clip.set_plane", text="Wall").plane = 'WALL'
 
407
 
403
408
        col.operator("clip.set_origin")
404
409
 
405
 
        row = col.row()
 
410
        row = col.row(align=True)
406
411
        row.operator("clip.set_axis", text="Set X Axis").axis = 'X'
407
412
        row.operator("clip.set_axis", text="Set Y Axis").axis = 'Y'
408
413
 
412
417
        row = col.row(align=True)
413
418
        row.operator("clip.set_scale")
414
419
        row.operator("clip.apply_solution_scale", text="Apply Scale")
 
420
 
415
421
        col.prop(settings, "distance")
416
422
 
417
423
 
483
489
        row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
484
490
        row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
485
491
 
486
 
        row = col.row()
 
492
        row = col.row(align=True)
487
493
        row.prop(context.tool_settings, "use_grease_pencil_sessions")
488
494
 
489
495
 
543
549
        layout.template_track(sc, "scopes")
544
550
 
545
551
        row = layout.row(align=True)
546
 
        sub = row.row()
 
552
        sub = row.row(align=True)
547
553
        sub.prop(act_track, "use_red_channel", text="R", toggle=True)
548
554
        sub.prop(act_track, "use_green_channel", text="G", toggle=True)
549
555
        sub.prop(act_track, "use_blue_channel", text="B", toggle=True)
550
556
 
551
557
        row.separator()
552
558
 
553
 
        sub = row.row()
554
 
        sub.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
 
559
        row.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
555
560
 
556
561
        row.separator()
557
 
        sub = row.row()
558
 
        sub.prop(act_track, "use_alpha_preview",
 
562
        row.prop(act_track, "use_alpha_preview",
559
563
                 text="", toggle=True, icon='IMAGE_ALPHA')
560
564
 
561
565
        layout.separator()
565
569
        row.menu('CLIP_MT_track_color_presets', text=label)
566
570
        row.menu('CLIP_MT_track_color_specials', text="", icon='DOWNARROW_HLT')
567
571
        row.operator("clip.track_color_preset_add", text="", icon='ZOOMIN')
568
 
        props = row.operator("clip.track_color_preset_add",
569
 
                             text="", icon='ZOOMOUT')
570
 
        props.remove_active = True
 
572
        row.operator("clip.track_color_preset_add",
 
573
                     text="", icon='ZOOMOUT').remove_active = True
571
574
 
572
575
        row = layout.row()
573
576
        row.prop(act_track, "use_custom_color")
579
582
            layout.label(text=label_text)
580
583
 
581
584
 
 
585
class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel):
 
586
    bl_space_type = 'CLIP_EDITOR'
 
587
    bl_region_type = 'UI'
 
588
    bl_label = "Plane Track"
 
589
    bl_options = {'DEFAULT_CLOSED'}
 
590
 
 
591
    def draw(self, context):
 
592
        layout = self.layout
 
593
 
 
594
        sc = context.space_data
 
595
        clip = context.space_data.clip
 
596
        active_track = clip.tracking.plane_tracks.active
 
597
 
 
598
        if not active_track:
 
599
            layout.active = False
 
600
            layout.label(text="No active plane track")
 
601
            return
 
602
 
 
603
        layout.prop(active_track, "name")
 
604
        layout.prop(active_track, "use_auto_keying")
 
605
 
 
606
 
582
607
class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
583
608
    bl_space_type = 'CLIP_EDITOR'
584
609
    bl_region_type = 'UI'
634
659
        label = bpy.types.CLIP_MT_camera_presets.bl_label
635
660
        row.menu('CLIP_MT_camera_presets', text=label)
636
661
        row.operator("clip.camera_preset_add", text="", icon='ZOOMIN')
637
 
        props = row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT')
638
 
        props.remove_active = True
 
662
        row.operator("clip.camera_preset_add", text="",
 
663
                     icon='ZOOMOUT').remove_active = True
639
664
 
640
665
        row = layout.row(align=True)
641
 
        sub = row.split(percentage=0.65)
 
666
        sub = row.split(percentage=0.65, align=True)
642
667
        if clip.tracking.camera.units == 'MILLIMETERS':
643
668
            sub.prop(clip.tracking.camera, "focal_length")
644
669
        else:
673
698
        sc = context.space_data
674
699
 
675
700
        row = layout.row(align=True)
676
 
        sub = row.row()
 
701
        sub = row.row(align=True)
677
702
        sub.prop(sc, "show_red_channel", text="R", toggle=True)
678
703
        sub.prop(sc, "show_green_channel", text="G", toggle=True)
679
704
        sub.prop(sc, "show_blue_channel", text="B", toggle=True)
680
705
 
681
706
        row.separator()
682
707
 
683
 
        sub = row.row()
684
 
        sub.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
 
708
        row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
685
709
 
686
710
        col = layout.column(align=True)
687
711
 
688
712
        col.prop(sc, "show_disabled", "Disabled Tracks")
689
713
        col.prop(sc, "show_names", text="Names and Status")
690
 
        col.prop(sc, "show_bundles", text="3D Markers")
 
714
        if sc.mode != 'MASK':
 
715
            col.prop(sc, "show_bundles", text="3D Markers")
691
716
 
692
717
        col.prop(sc, "use_mute_footage", text="Mute Footage")
693
718
        col.prop(sc, "lock_selection")
725
750
 
726
751
        col = layout.column(align=True)
727
752
 
728
 
        row = col.row()
 
753
        row = col.row(align=True)
729
754
        row.prop(sc, "show_marker_pattern", text="Pattern")
730
755
        row.prop(sc, "show_marker_search", text="Search")
731
756
 
732
757
        col.prop(sc, "show_tiny_markers", text="Thin Markers")
733
758
        col.prop(sc, "show_track_path", text="Path")
734
759
 
735
 
        row = col.row()
 
760
        row = col.row(align=True)
736
761
        row.active = sc.show_track_path
737
762
        row.prop(sc, "path_length", text="Length")
738
763
 
1000
1025
        layout.operator("clip.solve_camera")
1001
1026
 
1002
1027
        layout.separator()
1003
 
        props = layout.operator("clip.clear_track_path", text="Clear After")
1004
 
        props.action = 'REMAINED'
1005
 
 
1006
 
        props = layout.operator("clip.clear_track_path", text="Clear Before")
1007
 
        props.action = 'UPTO'
1008
 
 
1009
 
        props = layout.operator("clip.clear_track_path",
1010
 
                                text="Clear Track Path")
1011
 
        props.action = 'ALL'
 
1028
        layout.operator("clip.clear_track_path",
 
1029
                        text="Clear After").action = 'REMAINED'
 
1030
 
 
1031
        layout.operator("clip.clear_track_path",
 
1032
                        text="Clear Before").action = 'UPTO'
 
1033
 
 
1034
        layout.operator("clip.clear_track_path",
 
1035
                        text="Clear Track Path").action = 'ALL'
1012
1036
 
1013
1037
        layout.separator()
1014
1038
        layout.operator("clip.join_tracks")
1021
1045
        layout.operator("clip.paste_tracks")
1022
1046
 
1023
1047
        layout.separator()
1024
 
        props = layout.operator("clip.track_markers",
1025
 
                                text="Track Frame Backwards")
1026
 
        props.backwards = True
 
1048
        layout.operator("clip.track_markers",
 
1049
                        text="Track Frame Backwards").backwards = True
1027
1050
 
1028
1051
        props = layout.operator("clip.track_markers", text="Track Backwards")
1029
1052
        props.backwards = True
1030
1053
        props.sequence = True
1031
1054
 
1032
 
        props = layout.operator("clip.track_markers", text="Track Forwards")
1033
 
        props.sequence = True
 
1055
        layout.operator("clip.track_markers",
 
1056
                        text="Track Forwards").sequence = True
1034
1057
        layout.operator("clip.track_markers", text="Track Frame Forwards")
1035
1058
 
1036
1059
        layout.separator()
1052
1075
        layout = self.layout
1053
1076
 
1054
1077
        layout.operator("clip.set_origin")
1055
 
        props = layout.operator("clip.set_plane", text="Set Floor")
1056
 
        props.plane = 'FLOOR'
1057
 
        props = layout.operator("clip.set_plane", text="Set Wall")
1058
 
        props.plane = 'WALL'
 
1078
        layout.operator("clip.set_plane", text="Set Floor").plane = 'FLOOR'
 
1079
        layout.operator("clip.set_plane", text="Set Wall").plane = 'WALL'
1059
1080
 
1060
1081
        layout.operator("clip.set_axis", text="Set X Axis").axis = "X"
1061
1082
        layout.operator("clip.set_axis", text="Set Y Axis").axis = "Y"
1077
1098
        layout.operator("clip.hide_tracks_clear", text="Show Hidden")
1078
1099
        layout.operator("clip.hide_tracks", text="Hide Selected")
1079
1100
 
1080
 
        props = layout.operator("clip.hide_tracks", text="Hide Unselected")
1081
 
        props.unselected = True
 
1101
        layout.operator("clip.hide_tracks",
 
1102
                        text="Hide Unselected").unselected = True
1082
1103
 
1083
1104
 
1084
1105
class CLIP_MT_track_transform(Menu):
1129
1150
    def draw(self, context):
1130
1151
        layout = self.layout
1131
1152
 
1132
 
        props = layout.operator("clip.disable_markers",
1133
 
                                text="Enable Markers")
1134
 
        props.action = 'ENABLE'
 
1153
        layout.operator("clip.disable_markers",
 
1154
                        text="Enable Markers").action = 'ENABLE'
1135
1155
 
1136
 
        props = layout.operator("clip.disable_markers", text="Disable markers")
1137
 
        props.action = 'DISABLE'
 
1156
        layout.operator("clip.disable_markers",
 
1157
                        text="Disable markers").action = 'DISABLE'
1138
1158
 
1139
1159
        layout.separator()
1140
1160
        layout.operator("clip.set_origin")
1144
1164
        layout.operator("clip.hide_tracks_clear", text="Show Tracks")
1145
1165
 
1146
1166
        layout.separator()
1147
 
        props = layout.operator("clip.lock_tracks", text="Lock Tracks")
1148
 
        props.action = 'LOCK'
 
1167
        layout.operator("clip.lock_tracks", text="Lock Tracks").action = 'LOCK'
1149
1168
 
1150
 
        props = layout.operator("clip.lock_tracks", text="Unlock Tracks")
1151
 
        props.action = 'UNLOCK'
 
1169
        layout.operator("clip.lock_tracks",
 
1170
                        text="Unlock Tracks").action = 'UNLOCK'
1152
1171
 
1153
1172
 
1154
1173
class CLIP_MT_select_mode(Menu):