Refactor frequently used functions into a utils folder
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
The following functions/files are in the materials folder, but are also used by geometry and user_defined properties:
-
material/property_classes/socket_properties.py -
TemplatePanelclass inmaterial/ui.py -
draw_sockets_listfunction inmaterial/ui.py
User defined properties panel i.e. define_prop folder has functions used in ui.py, operators.py and properties.py such as:
- in
operators.pyandcollection_UD_props.pyan import is neededfrom .ui import attr_get_type, get_attr_only_str, get_obj_str -
operators.pyhas aattr_set_valfunction which could be integrated intoattr_get_type - one prop needs to
Randomise all and save parameters panel i.e. random_all folder:
- Repeated codes from operators.py for each of the panels: camera transforms, materials, geometry and UD props
Renaming of UD props functions and variables and add note in docs:
- # should be renamed candidate UD props
list_sckt_names_in_graph in collection_UD_socket_properties.py - sockets naming in UD props, not actually sockets but socket-like
- empty UIlist causes issues for other functionality (see #90 )
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 tracing the listed functions in material/property_classes/socket_properties.py, material/ui.py, define_prop/operators.py, collection_UD_props.py, and collection_UD_socket_properties.py, then compare repeated code in random_all/operators.py. Done means shared functions are organized in a utils folder, callers are updated, UD-prop naming and documentation are clarified, and the empty UIList issue from #90 is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- blender, python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100