Changeset View
Standalone View
source/blender/editors/space_view3d/view3d_edit.c
| Show First 20 Lines • Show All 2,943 Lines • ▼ Show 20 Lines | static int viewselected_exec(bContext *C, wmOperator *op) | ||||
| } | } | ||||
| if (ob_eval && (ob_eval->mode & OB_MODE_WEIGHT_PAINT)) { | if (ob_eval && (ob_eval->mode & OB_MODE_WEIGHT_PAINT)) { | ||||
| /* hard-coded exception, we look for the one selected armature */ | /* hard-coded exception, we look for the one selected armature */ | ||||
| /* this is weak code this way, we should make a generic | /* this is weak code this way, we should make a generic | ||||
| * active/selection callback interface once... */ | * active/selection callback interface once... */ | ||||
| Base *base_eval; | Base *base_eval; | ||||
| for (base_eval = view_layer_eval->object_bases.first; base_eval; base_eval = base_eval->next) { | for (base_eval = view_layer_eval->object_bases.first; base_eval; base_eval = base_eval->next) { | ||||
| if (BASE_SELECTED_EDITABLE(v3d, base_eval)) { | if (BASE_EDITABLE(v3d, base_eval)) { | ||||
| /* BASE_SELECTED flag is not set on base_eval, but on its base_orig */ | |||||
lichtwerk: why is this so?
... still figuring this out actually...
note there is also T66742 which I am… | |||||
sergeyUnsubmitted Not Done Inline ActionsThis sounds like someone who modified base flags did not tag DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS); sergey: This sounds like someone who modified base flags did not tag `DEG_id_tag_update(&scene->id… | |||||
lichtwerkAuthorUnsubmitted Not Done Inline ActionsYep, can confirm that ed_object_select_pick does a whole lot of ED_object_base_select etc. without tagging scene ID_RECALC_BASE_FLAGS, can also confirm that tagging scene there fixes the issue. Will update Diff accordingly (just figuring out the best place for the tag...might actually do this in view3d_select_exec...) Sidequestion: going over code there it seems often times DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); is called numerous times (if you include some "sub-functions" that are called and also tag....). Might be possible to remove some redundancy, but... this doesnt really do harm, right? lichtwerk: Yep, can confirm that `ed_object_select_pick` does a whole lot of `ED_object_base_select` etc. | |||||
sergeyUnsubmitted Not Done Inline ActionsTagging is supposed to be cheap, so multiple calls to DEG_id_tag_update() should not be a problem. If it ever pops up in a profiles we should solve this from DEG_id_tag_update() side. sergey: Tagging is supposed to be cheap, so multiple calls to `DEG_id_tag_update()` should not be a… | |||||
| if (((base_eval)->base_orig->flag & BASE_SELECTED) != 0) { | |||||
| if (base_eval->object->type == OB_ARMATURE) { | if (base_eval->object->type == OB_ARMATURE) { | ||||
| if (base_eval->object->mode & OB_MODE_POSE) { | if (base_eval->object->mode & OB_MODE_POSE) { | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| if (base_eval) { | if (base_eval) { | ||||
| ob_eval = base_eval->object; | ob_eval = base_eval->object; | ||||
| } | } | ||||
| } | } | ||||
| if (is_gp_edit) { | if (is_gp_edit) { | ||||
| CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) { | CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) { | ||||
| /* we're only interested in selected points here... */ | /* we're only interested in selected points here... */ | ||||
| ▲ Show 20 Lines • Show All 2,266 Lines • Show Last 20 Lines | |||||
why is this so?
... still figuring this out actually...
note there is also T66742 which I am looking into, so issue might actually be deeper than this...