Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
markusmoenig committed Aug 3, 2024
1 parent 450391f commit bbec9a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 0 additions & 7 deletions creator/src/tools/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,6 @@ impl Tool for PickerTool {
}
}
}
// MODELFXEDITOR
// .lock()
// .unwrap()
// .set_geo_node_ui(server_ctx, project, ui, ctx);
// if clicked_tile {
// self.set_editor_group_index(EditorMode::Draw, ui, ctx);
// }
false
}
}
10 changes: 9 additions & 1 deletion creator/src/tools/tiledrawer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Tool for TileDrawerTool {
fn tool_event(
&mut self,
tool_event: ToolEvent,
_tool_context: ToolContext,
tool_context: ToolContext,
ui: &mut TheUI,
ctx: &mut TheContext,
project: &mut Project,
Expand Down Expand Up @@ -65,6 +65,14 @@ impl Tool for TileDrawerTool {
}
};

// When we draw in 2D, move the 3D view to the pen position
if tool_context == ToolContext::TwoD && server_ctx.curr_character_instance.is_none() {
if let Some(region) = project.get_region_mut(&server_ctx.curr_region) {
region.editing_position_3d = Vec3f::new(coord.x as f32, 0.0, coord.y as f32);
server.set_editing_position_3d(region.editing_position_3d);
}
}

if let Some(curr_tile_id) = server_ctx.curr_tile_id {
if TILEDRAWER.lock().unwrap().tiles.contains_key(&curr_tile_id) {
if server_ctx.curr_layer_role == Layer2DRole::FX {
Expand Down

0 comments on commit bbec9a5

Please sign in to comment.