2D stabilization: change presentation of target_scale in UI
Alongside with this change, we fix disabling of Autoscale, because this feature works even when rotation/scale is disabled.
This commit is contained in:

committed by
Sergey Sharybin

parent
3dbe174440
commit
fd65a64930
@@ -960,7 +960,6 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
|
|||||||
icon='DOWNARROW_HLT')
|
icon='DOWNARROW_HLT')
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.active = stab.use_stabilize_rotation
|
|
||||||
row.prop(stab, "use_autoscale")
|
row.prop(stab, "use_autoscale")
|
||||||
sub = row.row()
|
sub = row.row()
|
||||||
sub.active = stab.use_autoscale
|
sub.active = stab.use_autoscale
|
||||||
@@ -971,10 +970,9 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
|
|||||||
# Hrm, how to make it more obvious label?
|
# Hrm, how to make it more obvious label?
|
||||||
row.prop(stab, "target_position", text="")
|
row.prop(stab, "target_position", text="")
|
||||||
col.prop(stab, "target_rotation")
|
col.prop(stab, "target_rotation")
|
||||||
if stab.use_autoscale:
|
row = col.row(align=True)
|
||||||
col.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom))
|
row.prop(stab, "target_scale")
|
||||||
else:
|
row.active = not stab.use_autoscale
|
||||||
col.prop(stab, "target_zoom")
|
|
||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
col.prop(stab, "influence_location")
|
col.prop(stab, "influence_location")
|
||||||
|
@@ -1774,7 +1774,7 @@ static void rna_def_trackingStabilization(BlenderRNA *brna)
|
|||||||
RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
|
RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
|
||||||
|
|
||||||
/* target scale */
|
/* target scale */
|
||||||
prop = RNA_def_property(srna, "target_zoom", PROP_FLOAT, PROP_FACTOR);
|
prop = RNA_def_property(srna, "target_scale", PROP_FLOAT, PROP_FACTOR);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "scale");
|
RNA_def_property_float_sdna(prop, NULL, "scale");
|
||||||
RNA_def_property_range(prop, FLT_EPSILON, FLT_MAX);
|
RNA_def_property_range(prop, FLT_EPSILON, FLT_MAX);
|
||||||
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.001f, 3); /* increment in steps of 0.001. Show 3 digit after point */
|
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.001f, 3); /* increment in steps of 0.001. Show 3 digit after point */
|
||||||
|
Reference in New Issue
Block a user