Trying to fix perl bindings

This commit is contained in:
Vojtech Bubnik 2020-09-24 16:18:56 +02:00
parent 94aac4cf97
commit aa0335a750

View File

@ -118,7 +118,7 @@ load_stl(CLASS, path, object_name)
%code%{ RETVAL = THIS->get_model(); %}; %code%{ RETVAL = THIS->get_model(); %};
Ref<DynamicPrintConfig> config() Ref<DynamicPrintConfig> config()
%code%{ RETVAL = &THIS->config; %}; %code%{ RETVAL = &const_cast<DynamicPrintConfig&>(THIS->config.get()); %};
std::string get_attribute(std::string name) std::string get_attribute(std::string name)
%code%{ if (THIS->attributes.find(name) != THIS->attributes.end()) RETVAL = THIS->attributes[name]; %}; %code%{ if (THIS->attributes.find(name) != THIS->attributes.end()) RETVAL = THIS->attributes[name]; %};
@ -202,7 +202,7 @@ ModelMaterial::attributes()
void set_input_file(std::string value) void set_input_file(std::string value)
%code%{ THIS->input_file = value; %}; %code%{ THIS->input_file = value; %};
Ref<DynamicPrintConfig> config() Ref<DynamicPrintConfig> config()
%code%{ RETVAL = &THIS->config; %}; %code%{ RETVAL = &const_cast<DynamicPrintConfig&>(THIS->config.get()); %};
Ref<Model> model() Ref<Model> model()
%code%{ RETVAL = THIS->get_model(); %}; %code%{ RETVAL = THIS->get_model(); %};
@ -248,7 +248,7 @@ ModelMaterial::attributes()
Ref<ModelMaterial> material(); Ref<ModelMaterial> material();
Ref<DynamicPrintConfig> config() Ref<DynamicPrintConfig> config()
%code%{ RETVAL = &THIS->config; %}; %code%{ RETVAL = &const_cast<DynamicPrintConfig&>(THIS->config.get()); %};
Ref<TriangleMesh> mesh() Ref<TriangleMesh> mesh()
%code%{ RETVAL = &THIS->mesh(); %}; %code%{ RETVAL = &THIS->mesh(); %};