mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-31 00:52:51 +00:00
1st installment of ModelInstance 3D rotation components
This commit is contained in:
@@ -364,8 +364,13 @@ ModelMaterial::attributes()
|
||||
Ref<ModelObject> object()
|
||||
%code%{ RETVAL = THIS->get_object(); %};
|
||||
|
||||
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
double rotation()
|
||||
%code%{ RETVAL = THIS->get_rotation(Z); %};
|
||||
#else
|
||||
double rotation()
|
||||
%code%{ RETVAL = THIS->rotation; %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
double scaling_factor()
|
||||
%code%{ RETVAL = THIS->scaling_factor; %};
|
||||
#if ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
@@ -376,8 +381,17 @@ ModelMaterial::attributes()
|
||||
%code%{ RETVAL = &THIS->offset; %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
|
||||
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
void set_rotation(double val)
|
||||
%code%{ THIS->set_rotation(Z, val); THIS->get_object()->invalidate_bounding_box(); %};
|
||||
|
||||
void set_rotations(Vec3d *rotation)
|
||||
%code%{ THIS->set_rotation(*rotation); THIS->get_object()->invalidate_bounding_box(); %};
|
||||
|
||||
#else
|
||||
void set_rotation(double val)
|
||||
%code%{ THIS->rotation = val; THIS->get_object()->invalidate_bounding_box(); %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
void set_scaling_factor(double val)
|
||||
%code%{ THIS->scaling_factor = val; THIS->get_object()->invalidate_bounding_box(); %};
|
||||
#if ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
|
||||
Reference in New Issue
Block a user