Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/processing_pyo3/src/gltf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ impl Gltf {
Ok(Light { entity })
}
}

18 changes: 9 additions & 9 deletions crates/processing_pyo3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(crate) mod shader;
#[cfg(feature = "webcam")]
mod webcam;

use graphics::{get_graphics, get_graphics_mut, Geometry, Graphics, Image, Light, Topology};
use graphics::{Geometry, Graphics, Image, Light, Topology, get_graphics, get_graphics_mut};
use material::Material;

use pyo3::{
Expand Down Expand Up @@ -111,22 +111,22 @@ fn detect_environment(py: Python<'_>) -> PyResult<String> {
mod mewnala {
use super::*;

#[pymodule_export]
use super::Geometry;
#[pymodule_export]
use super::Gltf;
#[pymodule_export]
use super::Graphics;
#[pymodule_export]
use super::Image;
#[pymodule_export]
use super::Light;
#[pymodule_export]
use super::Topology;
#[pymodule_export]
use super::Material;
#[pymodule_export]
use super::Gltf;
#[pymodule_export]
use super::Geometry;
#[pymodule_export]
use super::Shader;
#[pymodule_export]
use super::Topology;

#[pymodule_export]
const ROUND: u8 = 0;
Expand All @@ -146,8 +146,8 @@ mod mewnala {
#[pyfunction]
#[pyo3(pass_module)]
fn load_gltf(module: &Bound<'_, PyModule>, path: &str) -> PyResult<Gltf> {
let graphics = get_graphics(module)?
.ok_or_else(|| PyRuntimeError::new_err("call size() first"))?;
let graphics =
get_graphics(module)?.ok_or_else(|| PyRuntimeError::new_err("call size() first"))?;
let entity = ::processing::prelude::gltf_load(graphics.entity, path)
.map_err(|e| PyRuntimeError::new_err(format!("{e}")))?;
Ok(Gltf::from_entity(entity))
Expand Down
2 changes: 2 additions & 0 deletions crates/processing_render/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::module_inception)]

pub mod geometry;
pub mod gltf;
mod graphics;
Expand Down
2 changes: 1 addition & 1 deletion examples/animated_mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn sketch() -> error::Result<()> {
while glfw_ctx.poll_events() {
for z in 0..grid_size {
for x in 0..grid_size {
let idx = (z * grid_size + x) as u32;
let idx = z * grid_size + x;
let px = x as f32 * spacing - offset;
let pz = z as f32 * spacing - offset;
let wave = (px * 0.1 + time).sin() * (pz * 0.1 + time).cos() * 20.0;
Expand Down
5 changes: 2 additions & 3 deletions examples/glfw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ impl GlfwContext {
self.glfw.poll_events();

for (_, event) in glfw::flush_messages(&self.events) {
match event {
WindowEvent::Close => return false,
_ => {}
if event == WindowEvent::Close {
return false;
}
}

Expand Down
3 changes: 1 addition & 2 deletions tools/generate_stubs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ fn main() {

eprintln!("Introspecting: {}", cdylib_path.display());

let module =
introspect_cdylib(&cdylib_path, "mewnala").expect("Failed to introspect cdylib");
let module = introspect_cdylib(&cdylib_path, "mewnala").expect("Failed to introspect cdylib");

let stubs = module_stub_files(&module);

Expand Down
Loading