Fix: Text Location lost X/Y text

Use PROP_XYZ instead, and user Slider=True to make them display as sliders in the UI
This commit is contained in:
William Reynish
2019-06-27 11:15:56 +02:00
parent c93af8529d
commit 1c60f30d04
2 changed files with 2 additions and 2 deletions

View File

@@ -1054,7 +1054,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col.prop(strip, "align_x", text="Horizontal") col.prop(strip, "align_x", text="Horizontal")
col.prop(strip, "align_y", text="Vertical") col.prop(strip, "align_y", text="Vertical")
row = col.row(align=True) row = col.row(align=True)
row.prop(strip, "location", text="Location") row.prop(strip, "location", text="Location", slider=True)
col.prop(strip, "wrap_width") col.prop(strip, "wrap_width")
layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon='EXPORT') layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon='EXPORT')

View File

@@ -2738,7 +2738,7 @@ static void rna_def_text(StructRNA *srna)
RNA_def_property_update( RNA_def_property_update(
prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update"); prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_FACTOR); prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "loc"); RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "Location of the text"); RNA_def_property_ui_text(prop, "Location", "Location of the text");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);