UCL / UCL/Blender_Randomiser

Refactor frequently used functions into a utils folder

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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
  • TemplatePanel class in material/ui.py
  • draw_sockets_list function in material/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.py and collection_UD_props.py an import is needed from .ui import attr_get_type, get_attr_only_str, get_obj_str
  • operators.py has a attr_set_val function which could be integrated into attr_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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.