Updated Controller after the presets C++ port.
This commit is contained in:
parent
dd9e1aff70
commit
b11d9708ed
5 changed files with 26 additions and 48 deletions
|
@ -11,6 +11,8 @@
|
|||
static DynamicPrintConfig* new_from_defaults();
|
||||
static DynamicPrintConfig* new_from_defaults_keys(std::vector<std::string> keys);
|
||||
DynamicPrintConfig* clone() %code{% RETVAL = new DynamicPrintConfig(*THIS); %};
|
||||
DynamicPrintConfig* clone_only(std::vector<std::string> keys)
|
||||
%code{% RETVAL = new DynamicPrintConfig(); RETVAL->apply_only(*THIS, keys, true); %};
|
||||
bool has(t_config_option_key opt_key);
|
||||
SV* as_hash()
|
||||
%code{% RETVAL = ConfigBase__as_hash(THIS); %};
|
||||
|
|
|
@ -87,19 +87,6 @@ PresetCollection::arrayref()
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
SV*
|
||||
PresetCollection::presets_hash()
|
||||
CODE:
|
||||
HV* hv = newHV();
|
||||
for (size_t i = 1; i < THIS->size(); ++ i) {
|
||||
const Slic3r::Preset &preset = THIS->preset(i);
|
||||
if (! preset.is_default && ! preset.is_external)
|
||||
(void)hv_store(hv, preset.name.c_str(), - int(preset.name.size()), newSVpvn_utf8(preset.file.c_str(), preset.file.size(), true), 0);
|
||||
}
|
||||
RETVAL = (SV*)newRV_noinc((SV*)hv);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
%}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue