revert removal of ternary operators from r54414
This commit is contained in:
@@ -313,11 +313,9 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
|
|||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
|
|
||||||
# Note: avoid complex code in "text" values, they can't be handled right by i18n messages extractor script!
|
col.operator("clip.solve_camera",
|
||||||
if tracking_object.is_camera:
|
text="Camera Motion" if tracking_object.is_camera
|
||||||
col.operator("clip.solve_camera", text="Camera Motion")
|
else "Object Motion")
|
||||||
else:
|
|
||||||
col.operator("clip.solve_camera", text="Object Motion")
|
|
||||||
col.operator("clip.clear_solution")
|
col.operator("clip.clear_solution")
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
@@ -911,7 +909,9 @@ class CLIP_MT_view(Menu):
|
|||||||
|
|
||||||
text = bpy.app.translations.pgettext("Zoom %d:%d")
|
text = bpy.app.translations.pgettext("Zoom %d:%d")
|
||||||
for a, b in ratios:
|
for a, b in ratios:
|
||||||
layout.operator("clip.view_zoom_ratio", text=text % (a, b), translate=False).ratio = a / b
|
layout.operator("clip.view_zoom_ratio",
|
||||||
|
text=text % (a, b),
|
||||||
|
translate=False).ratio = a / b
|
||||||
else:
|
else:
|
||||||
if sc.view == 'GRAPH':
|
if sc.view == 'GRAPH':
|
||||||
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
||||||
|
@@ -73,13 +73,15 @@ class TEXT_HT_header(Header):
|
|||||||
if text.filepath:
|
if text.filepath:
|
||||||
pgettext = bpy.app.translations.pgettext
|
pgettext = bpy.app.translations.pgettext
|
||||||
if text.is_dirty:
|
if text.is_dirty:
|
||||||
row.label(text=pgettext("File: *%r (unsaved)") % text.filepath, translate=False)
|
row.label(text=pgettext("File: *%r (unsaved)") %
|
||||||
|
text.filepath, translate=False)
|
||||||
else:
|
else:
|
||||||
row.label(text=pgettext("File: %r") % text.filepath, translate=False)
|
row.label(text=pgettext("File: %r") %
|
||||||
elif text.library:
|
text.filepath, translate=False)
|
||||||
row.label(text="Text: External")
|
|
||||||
else:
|
else:
|
||||||
row.label(text="Text: Internal")
|
row.label(text="Text: External"
|
||||||
|
if text.library
|
||||||
|
else "Text: Internal")
|
||||||
|
|
||||||
|
|
||||||
class TEXT_PT_properties(Panel):
|
class TEXT_PT_properties(Panel):
|
||||||
|
Reference in New Issue
Block a user