Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-02-11 04:34:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-11 04:34:41 +0300
commit52cfc620c8cc3125282d8dd66df312ffb576569c (patch)
tree2a8a44c61a76de8289dfbe603127b00576ad0407 /source/blender/editors/sculpt_paint/sculpt_transform.c
parent2d252b6d26f90f81f2a2dc7a3031c407dc8a643c (diff)
Fix T83013: Annotation with hidden object in sculpt mode crashes
This just avoids the crash, the annotation tool still doesn't work. Larger changes will be needed to resolve this, see T85532.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_transform.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_transform.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_transform.c b/source/blender/editors/sculpt_paint/sculpt_transform.c
index da8204fd57c..4554ea178ab 100644
--- a/source/blender/editors/sculpt_paint/sculpt_transform.c
+++ b/source/blender/editors/sculpt_paint/sculpt_transform.c
@@ -60,10 +60,9 @@
#include <math.h>
#include <stdlib.h>
-void ED_sculpt_init_transform(struct bContext *C)
+void ED_sculpt_init_transform(struct bContext *C, Object *ob)
{
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
@@ -220,10 +219,9 @@ static void sculpt_transform_all_vertices(Sculpt *sd, Object *ob)
0, ss->filter_cache->totnode, &data, sculpt_transform_task_cb, &settings);
}
-void ED_sculpt_update_modal_transform(struct bContext *C)
+void ED_sculpt_update_modal_transform(struct bContext *C, Object *ob)
{
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
@@ -243,9 +241,8 @@ void ED_sculpt_update_modal_transform(struct bContext *C)
SCULPT_flush_update_step(C, SCULPT_UPDATE_COORDS);
}
-void ED_sculpt_end_transform(struct bContext *C)
+void ED_sculpt_end_transform(struct bContext *C, Object *ob)
{
- Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
if (ss->filter_cache) {
SCULPT_filter_cache_free(ss);