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:
authorHans Goudey <h.goudey@me.com>2020-12-02 15:35:07 +0300
committerJacques Lucke <jacques@blender.org>2020-12-02 17:38:47 +0300
commit600fb28b629598af2537c542e7f3f76ba0e94389 (patch)
treedb944815f74d9c81b48095f4d30402080c9192d6 /source/blender/editors/object/object_intern.h
parentfc4a853846123ed320914df7f78340ec95efc97e (diff)
Geometry Nodes: active modifier + geometry nodes editor
This commit adds functions to set and get the object's active modifier, which is stored as a flag in the ModifierData struct, similar to constraints. This will be used to set the context in the node editor. There are no visible changes in this commit. Similar to how the node editor context works for materials, this commit makes the node group displayed in the node editor depend on the active object and its active modifier. To keep the node group from changing, just pin the node group in the header. * Shortcuts performed while there is an active modifier will affect only that modifier (the exception is the A to expand the modifiers). * Clicking anywhere on the empty space in a modifier's panel will make it active. These changes require some refactoring of object modifier code. First is splitting up the modifier property invoke callback, which now needs to be able to get the active modifier separately from the hovered modifier for the different operators. Second is a change to removing modifiers, where there is now a separate function to remove a modifier from an object's list, in order to handle changing the active. Finally, the panel handler needs a small tweak so that this "click in panel" event can be handled afterwards.
Diffstat (limited to 'source/blender/editors/object/object_intern.h')
-rw-r--r--source/blender/editors/object/object_intern.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index d0c6134bab5..e6ef53a3d65 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -156,10 +156,12 @@ bool edit_modifier_poll_generic(struct bContext *C,
const bool is_editmode_allowed,
const bool is_liboverride_allowed);
void edit_modifier_properties(struct wmOperatorType *ot);
-bool edit_modifier_invoke_properties(struct bContext *C,
- struct wmOperator *op,
- const struct wmEvent *event,
- int *r_retval);
+bool edit_modifier_invoke_properties(struct bContext *C, struct wmOperator *op);
+bool edit_modifier_invoke_properties_with_hover_no_active(struct bContext *C,
+ struct wmOperator *op,
+ const struct wmEvent *event,
+ int *r_retval);
+
struct ModifierData *edit_modifier_property_get(struct wmOperator *op,
struct Object *ob,
int type);
@@ -173,6 +175,7 @@ void OBJECT_OT_modifier_apply(struct wmOperatorType *ot);
void OBJECT_OT_modifier_apply_as_shapekey(wmOperatorType *ot);
void OBJECT_OT_modifier_convert(struct wmOperatorType *ot);
void OBJECT_OT_modifier_copy(struct wmOperatorType *ot);
+void OBJECT_OT_modifier_set_active(struct wmOperatorType *ot);
void OBJECT_OT_multires_subdivide(struct wmOperatorType *ot);
void OBJECT_OT_multires_reshape(struct wmOperatorType *ot);
void OBJECT_OT_multires_higher_levels_delete(struct wmOperatorType *ot);