[Bf-blender-cvs] [b076b3853c9] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Mon Jul 2 12:04:04 CEST 2018
Commit: b076b3853c99d947806e05fe2dec29ca5fa944fa
Author: Campbell Barton
Date: Mon Jul 2 12:03:56 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBb076b3853c99d947806e05fe2dec29ca5fa944fa
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_screen.h
index d2c2f9a254f,b33b9e455f1..b6ddb8f57be
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@@ -210,11 -185,9 +210,11 @@@ typedef struct PanelType
int flag;
/* verify if the panel should draw or not */
- int (*poll)(const struct bContext *C, struct PanelType *pt);
+ bool (*poll)(const struct bContext *C, struct PanelType *pt);
/* draw header (optional) */
void (*draw_header)(const struct bContext *C, struct Panel *pa);
+ /* draw header preset (optional) */
+ void (*draw_header_preset)(const struct bContext *C, struct Panel *pa);
/* draw entirely, view changes should be handled here */
void (*draw)(const struct bContext *C, struct Panel *pa);
diff --cc source/blender/editors/animation/anim_ops.c
index 4402ca78976,8612f5944bb..5f6b299c617
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@@ -276,116 -276,6 +276,116 @@@ static void ANIM_OT_change_frame(wmOper
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
+
+/* ****************** Start/End Frame Operators *******************************/
+
- static int anim_set_end_frames_poll(bContext *C)
++static bool anim_set_end_frames_poll(bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+
+ /* XXX temp? prevent changes during render */
+ if (G.is_rendering) return false;
+
+ /* although it's only included in keymaps for regions using ED_KEYMAP_ANIMATION,
+ * this shouldn't show up in 3D editor (or others without 2D timeline view) via search
+ */
+ if (sa) {
+ if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
+ return true;
+ }
+ }
+
+ CTX_wm_operator_poll_msg_set(C, "Expected an animation area to be active");
+ return false;
+}
+
+static int anim_set_sfra_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Scene *scene = CTX_data_scene(C);
+ int frame;
+
+ if (scene == NULL)
+ return OPERATOR_CANCELLED;
+
+ frame = CFRA;
+
+ /* if Preview Range is defined, set the 'start' frame for that */
+ if (PRVRANGEON)
+ scene->r.psfra = frame;
+ else
+ scene->r.sfra = frame;
+
+ if (PEFRA < frame) {
+ if (PRVRANGEON)
+ scene->r.pefra = frame;
+ else
+ scene->r.efra = frame;
+ }
+
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+static void ANIM_OT_start_frame_set(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Set Start Frame";
+ ot->idname = "ANIM_OT_start_frame_set";
+ ot->description = "Set the current frame as the preview or scene start frame";
+
+ /* api callbacks */
+ ot->exec = anim_set_sfra_exec;
+ ot->poll = anim_set_end_frames_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
+
+
+static int anim_set_efra_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Scene *scene = CTX_data_scene(C);
+ int frame;
+
+ if (scene == NULL)
+ return OPERATOR_CANCELLED;
+
+ frame = CFRA;
+
+ /* if Preview Range is defined, set the 'end' frame for that */
+ if (PRVRANGEON)
+ scene->r.pefra = frame;
+ else
+ scene->r.efra = frame;
+
+ if (PSFRA > frame) {
+ if (PRVRANGEON)
+ scene->r.psfra = frame;
+ else
+ scene->r.sfra = frame;
+ }
+
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+static void ANIM_OT_end_frame_set(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Set End Frame";
+ ot->idname = "ANIM_OT_end_frame_set";
+ ot->description = "Set the current frame as the preview or scene end frame";
+
+ /* api callbacks */
+ ot->exec = anim_set_efra_exec;
+ ot->poll = anim_set_end_frames_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
+
/* ****************** set preview range operator ****************************/
static int previewrange_define_exec(bContext *C, wmOperator *op)
diff --cc source/blender/editors/animation/drivers.c
index f303be0dd76,3e4e3a551fe..99725c7da99
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@@ -817,9 -804,9 +817,9 @@@ static const EnumPropertyItem *driver_m
}
-/* Add Driver Button Operator ------------------------ */
+/* Add Driver (With Menu) Button Operator ------------------------ */
- static int add_driver_button_poll(bContext *C)
+ static bool add_driver_button_poll(bContext *C)
{
PointerRNA ptr = {{NULL}};
PropertyRNA *prop = NULL;
diff --cc source/blender/editors/armature/pose_edit.c
index b3775402a4b,389a8423f23..661492ba056
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@@ -1248,35 -1215,3 +1248,35 @@@ void POSE_OT_quaternions_flip(wmOperato
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
+
+/* -------------------------------------------------------------------- */
+/** \name Toggle Bone selection Overlay Operator
+ * \{ */
+
+static int toggle_bone_selection_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ v3d->overlay.flag ^= V3D_OVERLAY_BONE_SELECTION;
+ ED_view3d_shade_update(CTX_data_main(C), v3d, CTX_wm_area(C));
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
+ return OPERATOR_FINISHED;
+}
+
- static int pose_select_linked_poll(bContext *C)
++static bool pose_select_linked_poll(bContext *C)
+{
+ return (ED_operator_view3d_active(C) && ED_operator_posemode(C));
+}
+
+void POSE_OT_toggle_bone_selection_overlay(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Toggle Bone Selection Overlay";
+ ot->description = "Toggle bone selection overlay of the viewport";
+ ot->idname = "POSE_OT_toggle_bone_selection_overlay";
+
+ /* api callbacks */
+ ot->exec = toggle_bone_selection_exec;
+ ot->poll = pose_select_linked_poll;
+}
+
+/** \} */
diff --cc source/blender/editors/include/ED_image.h
index ed9102a2d8b,e5631c4e191..f8af67b55ff
--- a/source/blender/editors/include/ED_image.h
+++ b/source/blender/editors/include/ED_image.h
@@@ -75,9 -75,9 +75,9 @@@ bool ED_space_image_show_uvedit(struct
bool ED_space_image_paint_curve(const struct bContext *C);
-bool ED_space_image_check_show_maskedit(struct Scene *scene, struct SpaceImage *sima);
+bool ED_space_image_check_show_maskedit(struct SpaceImage *sima, struct ViewLayer *view_layer);
- int ED_space_image_maskedit_poll(struct bContext *C);
- int ED_space_image_maskedit_mask_poll(struct bContext *C);
+ bool ED_space_image_maskedit_poll(struct bContext *C);
+ bool ED_space_image_maskedit_mask_poll(struct bContext *C);
void ED_image_draw_info(struct Scene *scene, struct ARegion *ar, bool color_manage, bool use_default_view, int channels, int x, int y,
const unsigned char cp[4], const float fp[4], const float linearcol[4], int *zp, float *zpf);
diff --cc source/blender/editors/include/ED_outliner.h
index c1b3c3e9e1c,73ee2542247..52fdeb2045c
--- a/source/blender/editors/include/ED_outliner.h
+++ b/source/blender/editors/include/ED_outliner.h
@@@ -27,11 -27,4 +27,11 @@@
#ifndef __ED_OUTLINER_H__
#define __ED_OUTLINER_H__
+struct bContext;
+struct ListBase;
+
- int ED_outliner_collections_editor_poll(struct bContext *C);
++bool ED_outliner_collections_editor_poll(struct bContext *C);
+
+void ED_outliner_selected_objects_get(const struct bContext *C, struct ListBase *objects);
+
#endif /* __ED_OUTLINER_H__ */
diff --cc source/blender/editors/include/ED_screen.h
index 5ff58da735f,b4d9a2629cf..0e335f89fb4
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@@ -261,94 -133,64 +261,94 @@@ bScreen *ED_screen_animation_no_scrub(c
/* screen keymaps */
void ED_operatortypes_screen(void);
void ED_keymap_screen(struct wmKeyConfig *keyconf);
+/* workspace keymaps */
+void ED_operatortypes_workspace(void);
/* operators; context poll callbacks */
- int ED_operator_screenactive(struct bContext *C);
- int ED_operator_screen_mainwinactive(struct bContext *C);
- int ED_operator_areaactive(struct bContext *C);
- int ED_operator_regionactive(struct bContext *C);
+ bool ED_operator_screenactive(struct bContext *C);
+ bool ED_operator_screen_mainwinactive(struct bContext *C);
+ bool ED_operator_areaactive(struct bContext *C);
+ bool ED_operator_regionactive(struct bContext *C);
- int ED_operator_scene(struct bContext *C);
- int ED_operator_scene_editable(struct bContext *C);
- int ED_operator_objectmode(struct bContext *C);
+ bool ED_operator_scene(struct bContext *C);
+ bool ED_operator_scene_editable(struct bContext *C);
+ bool ED_operator_objectmode(struct bContext *C);
- int ED_operator_view3d_active(struct bContext *C);
- int ED_operator_region_view3d_active(struct bContext *C);
- int ED_operator_animview_active(struct bContext *C);
- int ED_operator_outliner_active(struct bContext *C);
- int ED_operator_outliner_active_no_editobject(struct bContext *C);
- int ED_operator_file_active(struct bContext *C);
- int ED_operator_action_active(struct bContext *C);
- int ED_operator_buttons_active(struct bContext *C);
- int ED_operator_node_active(struct bContext *C);
- int ED_operator_node_editable(struct bContext *C);
- int ED_operator_graphedit_active(struct bContext *C);
- int ED_operator_sequencer_active(struct bContext *C);
- int ED_operator_sequencer_active_editable(struct bContext *C);
- int ED_operator_image_active(struct bContext *C);
- int ED_operator_nla_active(struct bContext *C);
- int ED_operator_info_active(struct bContext *C);
- int ED_operator_console_active(struct bContext *C);
+ bool ED_operator_view3d_active(struct bContext *C);
+ bool ED_operator_region_view3d_active(struct bContext *C);
+ bool ED_operator_animview_active(struct bContext *C);
-bool ED_operator_timeline_active(struct bContext *C);
+ bool ED_operator_outliner_active(struct bContext *C);
+ bool ED_operator_outliner_active_no_editobject(struct bContext *C);
+ bool ED_operator_file_active(struct bContext *C);
+ bool ED_operator_action_active(struct bContext *C);
+ bool ED_opera
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list