migrate all legacy sketch mode endpoint calls
This commit is contained in:
@ -873,7 +873,7 @@ export const modelingMachine = createMachine(
|
||||
type: 'modeling_cmd_req',
|
||||
cmd_id: uuidv4(),
|
||||
cmd: {
|
||||
type: 'default_camera_disable_sketch_mode',
|
||||
type: 'sketch_mode_disable',
|
||||
},
|
||||
})
|
||||
.then(async () => {
|
||||
|
||||
@ -642,14 +642,15 @@ impl Callable for StartSketchAt {
|
||||
// Next, enter sketch mode.
|
||||
stack_api_call(
|
||||
&mut instructions,
|
||||
ModelingCmdEndpoint::SketchModeEnable,
|
||||
ModelingCmdEndpoint::EnableSketchMode,
|
||||
None,
|
||||
Uuid::new_v4().into(),
|
||||
[
|
||||
Some(axes.z).into_parts(),
|
||||
vec![false.into()], // adjust camera
|
||||
vec![false.into()], // animated
|
||||
vec![false.into()], // ortho mode
|
||||
vec![plane_id.into()],
|
||||
vec![plane_id.into()], // entity id (plane in this case)
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
@ -1005,12 +1005,12 @@ async fn start_sketch_on_plane(data: PlaneData, args: Args) -> Result<Box<Plane>
|
||||
// Enter sketch mode on the plane.
|
||||
args.send_modeling_cmd(
|
||||
uuid::Uuid::new_v4(),
|
||||
ModelingCmd::SketchModeEnable {
|
||||
ModelingCmd::EnableSketchMode {
|
||||
animated: false,
|
||||
ortho: false,
|
||||
plane_id: plane.id,
|
||||
entity_id: plane.id,
|
||||
// We pass in the normal for the plane here.
|
||||
disable_camera_with_plane: Some(plane.z_axis.clone().into()),
|
||||
planar_normal: Some(plane.z_axis.clone().into()),
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
|
||||
@ -67,11 +67,12 @@ async fn setup(code: &str, name: &str) -> Result<(ExecutorContext, Program, uuid
|
||||
.send_modeling_cmd(
|
||||
uuid::Uuid::new_v4(),
|
||||
SourceRange::default(),
|
||||
ModelingCmd::SketchModeEnable {
|
||||
ModelingCmd::EnableSketchMode {
|
||||
adjust_camera: false,
|
||||
animated: false,
|
||||
ortho: true,
|
||||
plane_id,
|
||||
disable_camera_with_plane: Some(Point3D { x: 0.0, y: 0.0, z: 1.0 }),
|
||||
entity_id: plane_id,
|
||||
planar_normal: Some(Point3D { x: 0.0, y: 0.0, z: 1.0 }),
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user