Skip to content

Pyo3/some sketch reloading#64

Merged
tychedelia merged 11 commits intoprocessing:mainfrom
catilac:pyo3/some_sketch_reloading
Feb 16, 2026
Merged

Pyo3/some sketch reloading#64
tychedelia merged 11 commits intoprocessing:mainfrom
catilac:pyo3/some_sketch_reloading

Conversation

@catilac
Copy link
Contributor

@catilac catilac commented Feb 2, 2026

Partially and poorly addresses #61

Current issues:

  • we are executing run() everytime we reload
  • we aren't bringing the global variables with us. but this will likely be solved by an alternative sketch structure (like a class, or something like quill where we are explicit)

@catilac catilac requested a review from tychedelia February 2, 2026 06:22
config.set(
// TODO: this needs to be handed to us by python
ConfigKey::SketchRootPath,
"/home/moon/Code/libprocessing/crates/processing_pyo3/examples".to_string(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

@catilac catilac removed the request for review from tychedelia February 2, 2026 06:24
@catilac catilac marked this pull request as draft February 2, 2026 06:24
@catilac catilac force-pushed the pyo3/some_sketch_reloading branch from 84c9975 to c93fd20 Compare February 11, 2026 01:37
@catilac catilac marked this pull request as ready for review February 11, 2026 01:38
@catilac catilac requested a review from tychedelia February 11, 2026 01:38
@catilac
Copy link
Contributor Author

catilac commented Feb 11, 2026

@tychedelia this is as far as i got with the sketch reloading stuff.
Until we know how to handle the global variables, i don't know if this is worth merging quite yet!

@catilac catilac force-pushed the pyo3/some_sketch_reloading branch from ff5e44b to 0883b57 Compare February 15, 2026 01:58
}

fn extensions(&self) -> &[&str] {
&["py"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be configurable.

let mut graphics = get_graphics_mut(module)?;

// TODO: this shouldn't be on the graphics object
let sketch = graphics.poll_for_sketch_update()?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we need some kind of top level Sketch entry point in python itself.

@tychedelia tychedelia merged commit 2098b83 into processing:main Feb 16, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants