GSoC 2020: Multi-Properties editing

I am applying to Blender in GSoC for working on the multi-properties editing feature. To be in a better position to write my proposal, I am trying to write a patch for T73277: Alt-Drag fails for HSV Color Buttons. By examining the flow of control, I have found out that the but->func gets called when the sliders on the color picker is adjusted (in this case this eventually points to ui_color_picker_rna_cb in interface_region_color_picker.c). What I can’t figure out is the effect on holding Alt to this function call. As far as I can tell, the same functions are called in the same order and neither is this function called multiple times nor is some other function called.
Can someone help me out?

10 Likes

@julianeisel Can you help me out with this, since you are one of the possible mentors of the project I want to apply to?

Adding this everywhere would be so great. Many things like materials editing, modifier editing, display of multiselected objects and their values (if not same, show a “-” to show that you will edit all) etc. Even values in the NLA, multi-strip parameters, and more… there is so much of the general UI that requires either knowing how to use ALT or just doesn’t work at all… which exponentially adds time to the UX to do every day tasks, slowing production and creativity.

I think sticking to learning how one system already works with the ALT then just carrying it over to each editor tab by tab, mode by mode so everything is consistent and working as expected will be the way to do it… because it’s already halfbaked in the code, just not consistent and everywhere yet. So find one where it works (say the transform panel in the properties shelf) then dig from there.

EDIT: and welcome! <3

Sorry for not replying earlier. VR merge took all my brain power, I’m just now running through the backlog.

I don’t think but->func should be called for multiple items. These callbacks generally do rather specific things, that typically assumes it’s called for one button and item only. Changing that sounds troublesome.

Multi-editing (or whatever we call it now…) is entirely based on RNA. After applying changes to a button, it gets the RNA information (e.g. the new value and the RNA path from the item pointer to the property) from the button and based on that, tries to apply the same RNA change to all selected items. Check ui_selectcontext_begin()/ui_selectcontext_end().
Currently this doesn’t support color buttons. You’d have to extend these functions with logic to respect RNA color properties (PROP_COLOR). I think that should work fine for this specific case. The button already stores the needed RNA pointer and property.

If you’re unfamiliar with RNA this may sound a bit scary to you, but really you should be able to just follow existing code.

3 Likes