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-04-19 16:43:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-19 16:52:59 +0300
commit8245805ce3dd23386d7a478ae2f4cfba3b503334 (patch)
tree1c6b69980d78fa5bfe12713bbee5e73ed697cf6f /source/blender/editors/mesh
parent33f218fa3f93a3d574d81d65628188921d6f100c (diff)
Fix creating operator properties without an owner_id
Any dynamic enum access would not use the callback. Always set the owner_id to avoid this causing problems. Oversight in 919558854d624f5db40acfa9f5674ac8c94873b6
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c3
-rw-r--r--source/blender/editors/mesh/editmesh_intersect.c10
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c8
3 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 340a7ae92ff..51190268c4c 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -911,10 +911,11 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void edbm_bevel_ui(bContext *C, wmOperator *op)
{
uiLayout *layout = op->layout;
+ wmWindowManager *wm = CTX_wm_manager(C);
uiLayout *col, *row;
PointerRNA ptr, toolsettings_ptr;
- RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
int profile_type = RNA_enum_get(&ptr, "profile_type");
int offset_type = RNA_enum_get(&ptr, "offset_type");
diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c
index 0e3cc22d358..141f120396a 100644
--- a/source/blender/editors/mesh/editmesh_intersect.c
+++ b/source/blender/editors/mesh/editmesh_intersect.c
@@ -251,13 +251,14 @@ static int edbm_intersect_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static void edbm_intersect_ui(bContext *UNUSED(C), wmOperator *op)
+static void edbm_intersect_ui(bContext *C, wmOperator *op)
{
uiLayout *layout = op->layout;
+ wmWindowManager *wm = CTX_wm_manager(C);
uiLayout *row;
PointerRNA ptr;
- RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
bool use_exact = RNA_enum_get(&ptr, "solver") == ISECT_SOLVER_EXACT;
@@ -417,13 +418,14 @@ static int edbm_intersect_boolean_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static void edbm_intersect_boolean_ui(bContext *UNUSED(C), wmOperator *op)
+static void edbm_intersect_boolean_ui(bContext *C, wmOperator *op)
{
uiLayout *layout = op->layout;
uiLayout *row;
+ wmWindowManager *wm = CTX_wm_manager(C);
PointerRNA ptr;
- RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
bool use_exact = RNA_enum_get(&ptr, "solver") == ISECT_SOLVER_EXACT;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 56d971ea59b..33e4691bfb5 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3694,12 +3694,13 @@ static const EnumPropertyItem *shape_itemf(bContext *C,
static void edbm_blend_from_shape_ui(bContext *C, wmOperator *op)
{
uiLayout *layout = op->layout;
+ wmWindowManager *wm = CTX_wm_manager(C);
PointerRNA ptr;
Object *obedit = CTX_data_edit_object(C);
Mesh *me = obedit->data;
PointerRNA ptr_key;
- RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
RNA_id_pointer_create((ID *)me->key, &ptr_key);
uiLayoutSetPropSep(layout, true);
@@ -5611,12 +5612,13 @@ static bool edbm_decimate_check(bContext *UNUSED(C), wmOperator *UNUSED(op))
return true;
}
-static void edbm_decimate_ui(bContext *UNUSED(C), wmOperator *op)
+static void edbm_decimate_ui(bContext *C, wmOperator *op)
{
uiLayout *layout = op->layout, *row, *col, *sub;
+ wmWindowManager *wm = CTX_wm_manager(C);
PointerRNA ptr;
- RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
uiLayoutSetPropSep(layout, true);