mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 13:04:03 -06:00
Don't transfer ownership of Model to Print::Object
This commit is contained in:
parent
13af16ea24
commit
093d1cbe2f
6 changed files with 10 additions and 15 deletions
|
@ -10,8 +10,7 @@ use Slic3r::Print::State ':steps';
|
|||
use Slic3r::Surface ':types';
|
||||
|
||||
has 'print' => (is => 'ro', weak_ref => 1, required => 1);
|
||||
has 'model' => (is => 'ro', required => 1); # for strong ref so model subobjects are kept in memory
|
||||
has 'model_object' => (is => 'ro', required => 1);
|
||||
has 'model_object' => (is => 'ro', required => 1); # caller is responsible for holding the Model object
|
||||
has 'region_volumes' => (is => 'rw', default => sub { [] }); # by region_id
|
||||
has 'copies' => (is => 'ro'); # Slic3r::Point objects in scaled G-code coordinates
|
||||
has 'config' => (is => 'ro', default => sub { Slic3r::Config::PrintObject->new });
|
||||
|
|
|
@ -67,7 +67,7 @@ sub set_model {
|
|||
|
||||
foreach my $model_object (@{$model->objects}) {
|
||||
$self->_print->auto_assign_extruders($model_object);
|
||||
$self->_print->add_model_object($model, $model_object);
|
||||
$self->_print->add_model_object($model_object);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue