diff options
Diffstat (limited to 'resources/ui_layout/default/print.as')
-rw-r--r-- | resources/ui_layout/default/print.as | 81 |
1 files changed, 3 insertions, 78 deletions
diff --git a/resources/ui_layout/default/print.as b/resources/ui_layout/default/print.as index 3c830bfd1..18e255178 100644 --- a/resources/ui_layout/default/print.as +++ b/resources/ui_layout/default/print.as @@ -1,73 +1,3 @@ -////////////////////////////////////////// -// Api for SuperSlicer scripted widgets: -// -//// Functions callable //// -// -// -- to print on the console, for debugging -- -// void print(string &out) -// void print_float(float) -// -// -- to get the value of real settings -- -// bool get_bool(string &in key) -// int get_int(string &in key) -// can be used by type int and enum (return the index) -// float get_float(string &in key) -// can be used by type float, percent and flaot_or_percent -// float get_computed_float(string &in key) -// get the float computed value of the field. Useful if it's a floatOrPercent that is computable. -// bool is_percent(string &in key) -// void get_string(string &in key, string &out get_val) -// can be used by type string and enum (return the enum_value, not the label) -// -// -- to set the value of real settings -- -// void set_bool(string &in key, bool new_val) -// void set_int(string &in key, int new_val) -// if an enum, it's the index -// void set_float(string &in key, float new_val) -// if a float_or_percent, unset the percent flag at the same time -// void set_percent(string &in key, float new_val) -// if a float_or_percent, set the percent flag at the same time -// void set_string(string &in key, string &in new_val)) -// if an enum, it's one of the enum_value -// -// void back_initial_value(string &in key) -// revert the setting to the last saved value (same as a click on the reset arrow) -// -// ask_for_refresh() -// ask for a OPTNAME_set() if in a OPTNAME_get() -// -//// Functions to define for each script widget //// -// -// note that you can't call set_thing() in an OPTNAME_get(), you can only call these in an OPTNAME_set() -// -// type bool: -// int OPTNAME_get() -// will return 1 if checkd, 0 if unchecked and -1 if half-checked (not all os, will be uncehcked if not available) -// void OPTNAME_set(bool set) -// -// type int: -// int OPTNAME_get() -// void OPTNAME_set(int set) -// -// type float & percent: -// float OPTNAME_get() -// void OPTNAME_set(float set) -// -// type float_or_percent: -// float OPTNAME_get(bool &out is_percent) -// void OPTNAME_set(float set, bool is_percent) -// -// type string: -// void OPTNAME_get(string &out get) -// void OPTNAME_set(string &in set) -// -// type enum: -// int OPTNAME_get(string &out enum_value) -// Only the return value is used unless it's out of bounds, then it tries to use the enum_value -// void OPTNAME_set(string &in set_enum_value, int set_idx) -// -// - //overhangs : quick set/unset like the one in prusalicer int s_overhangs_get() @@ -92,12 +22,6 @@ void s_overhangs_set(bool set) } } -void s_overhangs_reset(bool set) -{ - back_initial_value("overhangs_width_speed"); - back_initial_value("overhangs_width"); -} - // "not thick bridge" like in prusaslicer float compute_overlap() @@ -125,11 +49,12 @@ int s_not_thick_bridge_get() return 0; } -void s_not_thick_bridge_reset(bool set) +void s_not_thick_bridge_reset() { - set_custom_bool(0,"not_thick_bridge", false); + set_custom_string(0,"not_thick_bridge", ""); back_initial_value("bridge_type"); back_initial_value("bridge_overlap"); + back_initial_value("bridge_overlap_min"); } void s_not_thick_bridge_set(bool set) |