LuxCoreRender / LuxCoreRender/BlendLuxCore
Move socket properties into nodes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 877
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
This is something I've seen in the sverchok code:
They do not put a default_value property into each socket type like we do (this property is used when the socket is not connected).
Instead they put the property into the node and only put a reference to it into the socket (using strings).
See this code: https://github.com/nortikin/sverchok/blob/master/nodes/number/random.py#L42
This has the following advantages:
- You can have a fine-grained, specific description. Currently we have some sockets that are used everywhere, e.g. the "FloatSocket0to1", which have super unhelpful descriptions because they can't be specific
- You can have equally fine-grained min/max values without having to create a new socket type for each possible one (currently we have sockets for floats 0..1, 0..2, -1..1, unbounded etc.).
Not sure about disadvantages yet.
One obvious one is the work required to do this substantial refactor.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by studying the referenced sverchok example at nodes/number/random.py, then locate the current socket definitions and their default_value, description, and range properties in BlendLuxCore. Map how those properties are used across nodes before deciding the refactor scope. Done means node-specific properties replace the shared socket properties without breaking existing socket behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100