| 90 | |
| 91 | |
| 92 | class ST2InterpolationPanel(bpy.types.Panel): |
| 93 | bl_label = "Interpolation" |
| 94 | bl_idname = "ST2_PT_21_INTERPOLATIONPANEL" |
| 95 | bl_space_type = "VIEW_3D" |
| 96 | bl_region_type = "UI" |
| 97 | bl_category = "ST2" |
| 98 | |
| 99 | @classmethod |
| 100 | def poll(cls, context): |
| 101 | selection = search.find_st2_all_selected(context) |
| 102 | #editables = search.find_st2_editables(context) |
| 103 | if len(selection) == 2: |
| 104 | if selection[0].st2.text == selection[1].st2.text: |
| 105 | return True |
| 106 | |
| 107 | def draw(self, context): |
| 108 | selection = search.find_st2_all_selected(context) |
| 109 | #editables = search.find_st2_editables(context) |
| 110 | |
| 111 | if len(selection) == 2: |
| 112 | row = self.layout.row() |
| 113 | row.prop(context.scene.st2, "interpolator_count", text="") |
| 114 | row.prop(context.scene.st2, "interpolator_easing", text="") |
| 115 | row.prop(context.scene.st2, "interpolator_style", text=None, expand=True) |
| 116 | |
| 117 | row = self.layout.row() |
| 118 | row.operator("st2.interpolate_strings", text="Interpolate") |
| 119 | |
| 120 | row = self.layout.row() |
| 121 | row.label(text=f"Interpolating: {selection[0].name} & {selection[1].name}") |
| 122 | |
| 123 | |
| 124 | classes = [ |
nothing calls this directly
no outgoing calls
no test coverage detected