From d28bfb5022b56a82424c6242e77a7658803ed7ca Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 21 Mar 2015 22:34:20 +1100 Subject: Cleanup: constify view3d/camera --- source/blender/editors/include/ED_view3d.h | 45 +++++++++++++++++------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index ec53bce2eb7..84ac3a7c938 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -104,7 +104,7 @@ void ED_view3d_lastview_store(struct RegionView3D *rv3d); /* Depth buffer */ void ED_view3d_depth_update(struct ARegion *ar); -float ED_view3d_depth_read_cached(struct ViewContext *vc, int x, int y); +float ED_view3d_depth_read_cached(const struct ViewContext *vc, int x, int y); void ED_view3d_depth_tag_update(struct RegionView3D *rv3d); /* Projection */ @@ -224,33 +224,38 @@ void ED_view3d_unproject(struct bglMats *mats, float out[3], const float x, cons /* end */ -void ED_view3d_dist_range_get(struct View3D *v3d, - float r_dist_range[2]); -bool ED_view3d_clip_range_get(struct View3D *v3d, struct RegionView3D *rv3d, - float *r_clipsta, float *r_clipend, const bool use_ortho_factor); -bool ED_view3d_viewplane_get(struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, - struct rctf *r_viewplane, float *r_clipsta, float *r_clipend, float *r_pixsize); +void ED_view3d_dist_range_get( + const struct View3D *v3d, + float r_dist_range[2]); +bool ED_view3d_clip_range_get( + const struct View3D *v3d, const struct RegionView3D *rv3d, + float *r_clipsta, float *r_clipend, const bool use_ortho_factor); +bool ED_view3d_viewplane_get( + const struct View3D *v3d, const struct RegionView3D *rv3d, int winxi, int winyi, + struct rctf *r_viewplane, float *r_clipsta, float *r_clipend, float *r_pixsize); void ED_view3d_polygon_offset(const struct RegionView3D *rv3d, const float dist); -void ED_view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar, - struct View3D *v3d, struct RegionView3D *rv3d, - struct rctf *r_viewborder, const bool no_shift); -void ED_view3d_calc_camera_border_size(struct Scene *scene, struct ARegion *ar, - struct View3D *v3d, struct RegionView3D *rv3d, - float r_size[2]); +void ED_view3d_calc_camera_border( + const struct Scene *scene, const struct ARegion *ar, + const struct View3D *v3d, const struct RegionView3D *rv3d, + struct rctf *r_viewborder, const bool no_shift); +void ED_view3d_calc_camera_border_size( + const struct Scene *scene, const struct ARegion *ar, + const struct View3D *v3d, const struct RegionView3D *rv3d, + float r_size[2]); bool ED_view3d_calc_render_border(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, struct rcti *rect); void ED_view3d_clipping_calc_from_boundbox(float clip[6][4], const struct BoundBox *clipbb, const bool is_flip); void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], struct bglMats *mats, const struct rcti *rect); void ED_view3d_clipping_local(struct RegionView3D *rv3d, float mat[4][4]); -bool ED_view3d_clipping_test(struct RegionView3D *rv3d, const float co[3], const bool is_local); +bool ED_view3d_clipping_test(const struct RegionView3D *rv3d, const float co[3], const bool is_local); void ED_view3d_clipping_set(struct RegionView3D *rv3d); void ED_view3d_clipping_enable(void); void ED_view3d_clipping_disable(void); -float ED_view3d_pixel_size(struct RegionView3D *rv3d, const float co[3]); +float ED_view3d_pixel_size(const struct RegionView3D *rv3d, const float co[3]); float ED_view3d_radius_to_dist_persp(const float angle, const float radius); float ED_view3d_radius_to_dist_ortho(const float lens, const float radius); @@ -334,15 +339,15 @@ char ED_view3d_lock_view_from_index(int index); char ED_view3d_axis_view_opposite(char view); bool ED_view3d_lock(struct RegionView3D *rv3d); -uint64_t ED_view3d_datamask(struct Scene *scene, struct View3D *v3d); -uint64_t ED_view3d_screen_datamask(struct bScreen *screen); +uint64_t ED_view3d_datamask(const struct Scene *scene, const struct View3D *v3d); +uint64_t ED_view3d_screen_datamask(const struct bScreen *screen); -bool ED_view3d_view_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); +bool ED_view3d_view_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d); -bool ED_view3d_offset_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); +bool ED_view3d_offset_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d); /* camera lock functions */ -bool ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); +bool ED_view3d_camera_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d); /* copy the camera to the view before starting a view transformation */ void ED_view3d_camera_lock_init_ex(struct View3D *v3d, struct RegionView3D *rv3d, const bool calc_dist); void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d); -- cgit v1.2.3 From 3bb7e14618cb928d43fecf0a8930a1edd85dde3e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Mar 2015 15:05:27 +1100 Subject: UI: remove UI_BTYPE_SEARCH_MENU_UNLINK Internal change only, use UI_BTYPE_SEARCH_MENU with an unlink flag instead. They are really the same button type, one just happens to have the option to unlink. --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 4542627277a..02ae098dc2e 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -185,6 +185,7 @@ enum { UI_BUT_HAS_SEP_CHAR = (1 << 27), /* but->str contains UI_SEP_CHAR, used for key shortcuts */ UI_BUT_TIP_FORCE = (1 << 28), /* force show tooltips when holding option/alt if U's USER_TOOLTIPS is off */ UI_BUT_TEXTEDIT_UPDATE = (1 << 29), /* when widget is in textedit mode, update value on each char stroke */ + UI_BUT_SEARCH_UNLINK = (1 << 30), /* show unlink for search button */ }; #define UI_PANEL_WIDTH 340 @@ -279,7 +280,6 @@ typedef enum { UI_BTYPE_WAVEFORM = (49 << 9), UI_BTYPE_VECTORSCOPE = (50 << 9), UI_BTYPE_PROGRESS_BAR = (51 << 9), - UI_BTYPE_SEARCH_MENU_UNLINK = (52 << 9), UI_BTYPE_NODE_SOCKET = (53 << 9), UI_BTYPE_SEPR = (54 << 9), UI_BTYPE_SEPR_LINE = (55 << 9), -- cgit v1.2.3 From 8f4c5ff0ecd81a95885939e2fa553f50f1f405fc Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 22 Mar 2015 02:46:51 +1300 Subject: Nla Strip Controls: Added dedicated "Expander" channel to Action/Graph Editors The "Nla Strip Controls" channel is used to house the per-strip FCurves for controlling the strip_time and influence properties. It sits above the active action's first group, at the same level in the hierarchy as other groups. TODO: It looks like a dedicated FCurve channel is needed for these control FCurves, so that we won't accidentally apply NLA mapping or have these FCurves disabled by the path lookups failing. --- source/blender/editors/include/ED_anim_api.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 50581429700..829ea74f00f 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -141,6 +141,8 @@ typedef enum eAnim_ChannelType { ANIMTYPE_GROUP, ANIMTYPE_FCURVE, + ANIMTYPE_NLACONTROLS, + ANIMTYPE_FILLACTD, ANIMTYPE_FILLDRIVERS, -- cgit v1.2.3 From 67f983ac53e97f154b6710fea8f400a608e27550 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 22 Mar 2015 21:41:45 +1300 Subject: Nla Strip Controls: Added special FCurve type (in the animfiltering code) Using the standard "FCurve" animchannel type didn't work that well for the control FCurves on NLA Strips, as the paths would not resolve correctly, and the indentation was wrong. Also, there would likely be issues down the track with applying NLA mapping. Hence, it's easier to just create a separate type for this case, and adapt the rest of the code to also consider these (todo). --- source/blender/editors/include/ED_anim_api.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 829ea74f00f..9b4037ff455 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -116,12 +116,15 @@ typedef struct bAnimListElem { int index; /* for un-named data, the index of the data in its collection */ short update; /* (eAnim_Update_Flags) tag the element for updating */ + short datatype; /* (eAnim_KeyType) type of motion data to expect */ void *key_data; /* motion data - mostly F-Curves, but can be other types too */ struct ID *id; /* ID block that channel is attached to */ struct AnimData *adt; /* source of the animation data attached to ID block (for convenience) */ + + void *owner; /* for per-element F-Curves (e.g. NLA Control Curves), the element that this represents (e.g. NlaStrip) */ } bAnimListElem; @@ -142,6 +145,7 @@ typedef enum eAnim_ChannelType { ANIMTYPE_FCURVE, ANIMTYPE_NLACONTROLS, + ANIMTYPE_NLACURVE, ANIMTYPE_FILLACTD, ANIMTYPE_FILLDRIVERS, -- cgit v1.2.3 From 8c1c2b40a2131dc89e57ece3bc3b06c5a46f91d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 28 Mar 2015 04:34:28 +1100 Subject: Use union for EditBone's Avoids complicated casts accessing as int --- source/blender/editors/include/ED_armature.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index da756422bdb..9345cd83b49 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -59,8 +59,6 @@ typedef struct EditBone { struct EditBone *parent; /* Editbones have a one-way link (i.e. children refer * to parents. This is converted to a two-way link for * normal bones when leaving editmode. */ - void *temp; /* Used to store temporary data */ - char name[64]; /* MAXBONENAME */ float roll; /* Roll along axis. We'll ultimately use the axis/angle method * for determining the transformation matrix of the bone. The axis @@ -83,6 +81,14 @@ typedef struct EditBone { float oldlength; /* for envelope scaling */ short segments; + + /* Used to store temporary data */ + union { + struct EditBone *ebone; + struct Bone *bone; + void *p; + int i; + } temp; } EditBone; #define BONESEL_ROOT (1 << 28) @@ -119,10 +125,12 @@ void ED_keymap_armature(struct wmKeyConfig *keyconf); void ED_armature_from_edit(struct bArmature *arm); void ED_armature_to_edit(struct bArmature *arm); void ED_armature_edit_free(struct bArmature *arm); +void ED_armature_ebone_listbase_temp_clear(struct ListBase *lb); + void ED_armature_deselect_all(struct Object *obedit); void ED_armature_deselect_all_visible(struct Object *obedit); -int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, +int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, short hits, bool extend, bool deselect, bool toggle, bool do_nearest); bool mouse_armature(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); int join_armature_exec(struct bContext *C, struct wmOperator *op); -- cgit v1.2.3 From b1d758ae6b63f1b644c5cb721f131ad1795c2b49 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Mar 2015 03:56:39 +1100 Subject: Cleanup: redundant struct declarations --- source/blender/editors/include/ED_anim_api.h | 1 - source/blender/editors/include/ED_armature.h | 4 ---- source/blender/editors/include/ED_curve.h | 3 --- source/blender/editors/include/ED_gpencil.h | 4 ---- source/blender/editors/include/ED_image.h | 2 -- source/blender/editors/include/ED_keyframes_draw.h | 1 - source/blender/editors/include/ED_keyframing.h | 2 -- source/blender/editors/include/ED_lattice.h | 1 - source/blender/editors/include/ED_mask.h | 1 - source/blender/editors/include/ED_mball.h | 1 - source/blender/editors/include/ED_mesh.h | 12 ------------ source/blender/editors/include/ED_node.h | 1 - source/blender/editors/include/ED_object.h | 16 ---------------- source/blender/editors/include/ED_paint.h | 1 - source/blender/editors/include/ED_particle.h | 3 --- source/blender/editors/include/ED_render.h | 3 --- source/blender/editors/include/ED_screen.h | 1 - source/blender/editors/include/ED_sculpt.h | 1 - source/blender/editors/include/ED_transform.h | 4 ---- source/blender/editors/include/ED_util.h | 6 ------ source/blender/editors/include/ED_uvedit.h | 2 -- source/blender/editors/include/UI_interface.h | 7 ------- source/blender/editors/include/UI_interface_icons.h | 6 ------ source/blender/editors/include/UI_resources.h | 1 - 24 files changed, 84 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 9b4037ff455..1ce285f8190 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -49,7 +49,6 @@ struct Object; struct bDopeSheet; struct bAction; -struct bActionGroup; struct FCurve; struct FModifier; diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 9345cd83b49..35bb12ddaad 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -39,16 +39,12 @@ struct Base; struct bContext; struct Bone; struct bPoseChannel; -struct DerivedMesh; struct IDProperty; struct ListBase; struct MeshDeformModifierData; struct Object; -struct RegionView3D; struct ReportList; struct Scene; -struct SK_Sketch; -struct View3D; struct ViewContext; struct wmKeyConfig; struct wmOperator; diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 982e17cfce4..fee3d44b8eb 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -31,13 +31,10 @@ #ifndef __ED_CURVE_H__ #define __ED_CURVE_H__ -struct Base; struct bContext; struct Nurb; struct Object; -struct Scene; struct Text; -struct View3D; struct wmOperator; struct wmKeyConfig; struct Curve; diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index c4f08ca4775..448f2c83aad 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -33,19 +33,15 @@ struct ID; struct ListBase; struct bContext; -struct bScreen; struct ScrArea; struct ARegion; struct View3D; -struct SpaceNode; -struct SpaceSeq; struct Object; struct bGPdata; struct bGPDlayer; struct bGPDframe; struct bGPDstroke; struct PointerRNA; -struct ImBuf; struct wmKeyConfig; diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 704876e1261..fc42d2b5495 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -31,13 +31,11 @@ #define __ED_IMAGE_H__ struct SpaceImage; -struct Main; struct bContext; struct Image; struct ImageUser; struct ImBuf; struct ToolSettings; -struct uiBlock; struct wmWindowManager; struct ARegion; struct Scene; diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 0359153317b..7d163da0db0 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -34,7 +34,6 @@ struct bAnimContext; struct AnimData; -struct BezTriple; struct FCurve; struct bDopeSheet; struct bAction; diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index e5b5e79875d..5d76c9e0f6f 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -46,10 +46,8 @@ struct FCurve; struct BezTriple; struct bPoseChannel; -struct bConstraint; struct bContext; -struct wmOperatorType; struct ReportList; struct PointerRNA; diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h index 6636319dc9b..6fe1524cb6d 100644 --- a/source/blender/editors/include/ED_lattice.h +++ b/source/blender/editors/include/ED_lattice.h @@ -32,7 +32,6 @@ #define __ED_LATTICE_H__ struct Object; -struct Lattice; void free_editLatt(struct Object *ob); void make_editLatt(struct Object *obedit); diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h index 97fd553ea19..1611276ca70 100644 --- a/source/blender/editors/include/ED_mask.h +++ b/source/blender/editors/include/ED_mask.h @@ -34,7 +34,6 @@ struct wmKeyConfig; struct MaskLayer; struct MaskLayerShape; -struct wmEvent; /* mask_edit.c */ void ED_mask_get_size(struct ScrArea *sa, int *width, int *height); diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h index 5e774c63841..05a4ccabd1b 100644 --- a/source/blender/editors/include/ED_mball.h +++ b/source/blender/editors/include/ED_mball.h @@ -32,7 +32,6 @@ #define __ED_MBALL_H__ struct bContext; -struct MetaBall; struct Object; struct wmKeyConfig; diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index ccf97221112..8fb6fcbd0d7 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -40,39 +40,27 @@ struct View3D; struct ARegion; struct bContext; struct wmOperator; -struct wmWindowManager; struct wmKeyConfig; struct ReportList; -struct EditSelection; struct ViewContext; struct bDeformGroup; -struct MDeformWeight; struct MDeformVert; struct Scene; struct Mesh; -struct MFace; -struct MEdge; -struct MVert; -struct MCol; struct UvVertMap; struct UvMapVert; -struct CustomData; struct BMEditMesh; -struct BMEditSelection; struct BMesh; struct BMVert; struct BMLoop; struct BMBVHTree; -struct MLoopCol; struct BMEdge; struct BMFace; struct UvVertMap; struct UvMapVert; struct ToolSettings; -struct Material; struct Object; struct rcti; -struct MeshStatVis; /* editmesh_utils.c */ void EDBM_verts_mirror_cache_begin_ex(struct BMEditMesh *em, const int axis, diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 824c82a0069..b02ebeb650b 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -33,7 +33,6 @@ struct ID; struct Main; -struct Material; struct Scene; struct Tex; struct bContext; diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 3d791839a3c..3b7157bd465 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -35,33 +35,17 @@ extern "C" { #endif -struct BMEdge; -struct BMFace; -struct BMVert; -struct BPoint; struct Base; -struct BezTriple; -struct Curve; -struct EditBone; struct EnumPropertyItem; struct ID; -struct KeyBlock; -struct Lattice; struct Main; -struct Mesh; -struct MetaElem; struct ModifierData; -struct HookModifierData; -struct Nurb; struct Object; struct ReportList; struct Scene; -struct View3D; -struct ViewContext; struct bConstraint; struct bContext; struct bPoseChannel; -struct wmEvent; struct wmKeyConfig; struct wmKeyMap; struct wmOperator; diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h index decd79fcc7b..c3a411a2b97 100644 --- a/source/blender/editors/include/ED_paint.h +++ b/source/blender/editors/include/ED_paint.h @@ -26,7 +26,6 @@ #define __ED_PAINT_H__ struct bContext; -struct RegionView3D; struct wmKeyConfig; struct wmOperator; diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index f9516f255cf..56a4bfa7e21 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -35,10 +35,7 @@ struct bContext; struct Object; struct ParticleEditSettings; -struct ParticleSystem; -struct RadialControl; struct rcti; -struct wmKeyConfig; struct PTCacheEdit; struct Scene; diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 1b1d8d723ee..2bc0566f4a6 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -37,9 +37,6 @@ struct MTex; struct Render; struct Scene; struct ScrArea; -struct RegionView3D; -struct RenderEngine; -struct View3D; struct wmWindowManager; /* render_ops.c */ diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 8c33395cc49..b4f7d806079 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -42,7 +42,6 @@ struct wmNotifier; struct wmEvent; struct wmKeyConfig; struct bContext; -struct SpaceType; struct Scene; struct bScreen; struct ARegion; diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index d3b1a824104..6daaac5bb42 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -34,7 +34,6 @@ struct ARegion; struct bContext; struct Object; struct RegionView3D; -struct Scene; struct ViewContext; struct rcti; diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index a3b4981dad8..478cb927011 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -35,17 +35,14 @@ /* ******************* Registration Function ********************** */ struct ARegion; -struct EnumPropertyItem; struct ListBase; struct Object; struct View3D; struct bContext; -struct uiLayout; struct wmEvent; struct wmKeyConfig; struct wmKeyMap; struct wmOperatorType; -struct wmWindowManager; void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid); void transform_operatortypes(void); @@ -109,7 +106,6 @@ enum TfmMode { bool calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3], float cent2d[2]); struct TransInfo; -struct ScrArea; struct Base; struct Scene; struct Object; diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index e26e03473e0..6fa92e1953d 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -31,15 +31,9 @@ #ifndef __ED_UTIL_H__ #define __ED_UTIL_H__ -struct Scene; -struct Object; struct bContext; -struct ARegion; -struct uiBlock; struct wmOperator; struct wmOperatorType; -struct BMEditMesh; -struct Mesh; /* ed_util.c */ diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 3e8f234e979..535683823bf 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -37,13 +37,11 @@ struct BMFace; struct BMLoop; struct Image; struct ImageUser; -struct MTFace; struct MTexPoly; struct Main; struct Object; struct Scene; struct SpaceImage; -struct bContext; struct bNode; struct wmKeyConfig; diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 02ae098dc2e..814bbf94c79 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -40,14 +40,11 @@ /* Struct Declarations */ struct ID; -struct Main; struct ListBase; struct ARegion; -struct ARegionType; struct ScrArea; struct wmEvent; struct wmWindow; -struct wmWindowManager; struct wmOperator; struct AutoComplete; struct bContext; @@ -58,18 +55,14 @@ struct PointerRNA; struct PropertyRNA; struct ReportList; struct rcti; -struct rctf; struct uiList; struct uiStyle; struct uiFontStyle; struct uiWidgetColors; -struct ColorBand; -struct CurveMapping; struct Image; struct ImageUser; struct wmOperatorType; struct uiWidgetColors; -struct Tex; struct MTex; struct ImBuf; struct bNodeTree; diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index 74927428363..9d190fa81c7 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -34,12 +34,6 @@ struct bContext; struct ID; -struct Image; -struct ImBuf; -struct World; -struct Tex; -struct Lamp; -struct Material; struct PreviewImage; struct PointerRNA; diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 4a484212a63..3923c5c4432 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -301,7 +301,6 @@ enum { /* specific defines per space should have higher define values */ struct bTheme; -struct PointerRNA; struct bThemeState { struct bTheme *theme; -- cgit v1.2.3 From 4aeb34dc82e904660a1df06617406028b5331ff1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 30 Mar 2015 21:29:20 +1100 Subject: Cleanup: use const for typeinfo --- source/blender/editors/include/ED_anim_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 1ce285f8190..8cf42dfce6c 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -455,7 +455,7 @@ typedef struct bAnimChannelType { /* ------------------------ Drawing API -------------------------- */ /* Get typeinfo for the given channel */ -bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale); +const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale); /* Print debugging info about a given channel */ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level); -- cgit v1.2.3 From 66a028a5761c44fa37963443c78bd7baf04ff551 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Fri, 27 Mar 2015 15:23:39 +0100 Subject: Proportional editing for IPO editor - version ready for feedback by artists. This works by using the distance in the x axis only (usually artists want to influence nearby keyframes based on timing, not value). Tweaking handles is the same as tweaking the central handle. It's a bit ambiguous if proportional editing is really meaningful for handles but will leave that for artists to decide. --- source/blender/editors/include/ED_anim_api.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 8cf42dfce6c..7fd0d35d514 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -114,8 +114,9 @@ typedef struct bAnimListElem { int flag; /* copy of elem's flags for quick access */ int index; /* for un-named data, the index of the data in its collection */ - short update; /* (eAnim_Update_Flags) tag the element for updating */ - + char update; /* (eAnim_Update_Flags) tag the element for updating */ + char tag; /* tag the included data. Temporary always */ + short datatype; /* (eAnim_KeyType) type of motion data to expect */ void *key_data; /* motion data - mostly F-Curves, but can be other types too */ -- cgit v1.2.3 From 03f2e5d4a6fce84e81b52b1d46ab1d5e305057d0 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 4 Apr 2015 01:38:56 +1300 Subject: Fix: Drawing glitch when renaming animation channels When renaming animation channels, the old names are no longer drawn behind the text boxes anymore. This used to cause problems if the names were long, or if text boxes were set to have transparent backgrounds. Thanks to kopias for reporting on IRC. --- source/blender/editors/include/ED_anim_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 7fd0d35d514..4c7c78df349 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -462,7 +462,7 @@ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale); void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level); /* Draw the given channel */ -void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc); +void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index); /* Draw the widgets for the given channel */ void ANIM_channel_draw_widgets(const struct bContext *C, bAnimContext *ac, bAnimListElem *ale, struct uiBlock *block, float yminc, float ymaxc, size_t channel_index); -- cgit v1.2.3 From 53f4aa78175307e75e6a9c6deb6fb7f1caf766f9 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 4 Apr 2015 11:36:46 +1300 Subject: WIP: Added dedicated operator for unlinking actions from the Action Editor (NLA buttons support to come) After looking into this more carefully, I've found that we do in fact need a dedicate operator to add some custom logic when trying to unlink an action from the editor/datablocks. Specifically, this new operator does the following: 1) When in Tweak Mode, it shouldn't be possible to unlink the active action, or else, everything turns to custard. 2) If the Action doesn't have any other users, the user should at least get a warning that it is going to get lost. 3) We need a convenient way to exit Tweak Mode from the Action Editor 4) If none of the above apply, we can just unlink normally This commit implements this for the Action Editor, with stubs for the NLA Editor too. Those will be fixed next. --- source/blender/editors/include/ED_anim_api.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 4c7c78df349..9dea66adc7c 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -675,6 +675,14 @@ void ED_operatormacros_graph(void); /* space_action */ void ED_operatormacros_action(void); +/* ************************************************ */ +/* Animation Editor Exports */ +/* XXX: Should we be doing these here, or at all? */ + +/* Action Editor - Action Management */ +struct AnimData *ED_actedit_animdata_from_context(struct bContext *C); +void ED_animedit_unlink_action(struct bContext *C, struct ID *id, struct AnimData *adt, struct bAction *act, struct ReportList *reports); + /* ************************************************ */ #endif /* __ED_ANIM_API_H__ */ -- cgit v1.2.3 From d5f1b9c2223333e03f2e4994171ad9df8c1c4f21 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 6 Apr 2015 10:40:12 -0300 Subject: Multi-View and Stereo 3D Official Documentation: http://www.blender.org/manual/render/workflows/multiview.html Implemented Features ==================== Builtin Stereo Camera * Convergence Mode * Interocular Distance * Convergence Distance * Pivot Mode Viewport * Cameras * Plane * Volume Compositor * View Switch Node * Image Node Multi-View OpenEXR support Sequencer * Image/Movie Strips 'Use Multiview' UV/Image Editor * Option to see Multi-View images in Stereo-3D or its individual images * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images I/O * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images Scene Render Views * Ability to have an arbitrary number of views in the scene Missing Bits ============ First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report. Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report. Everything else is likely small todos, and may wait until we are sure none of the above is happening. Apart from that there are those known issues: * Compositor Image Node poorly working for Multi-View OpenEXR (this was working prefectly before the 'Use Multi-View' functionality) * Selecting camera from Multi-View when looking from camera is problematic * Animation Playback (ctrl+F11) doesn't support stereo formats * Wrong filepath when trying to play back animated scene * Viewport Rendering doesn't support Multi-View * Overscan Rendering * Fullscreen display modes need to warn the user * Object copy should be aware of views suffix Acknowledgments =============== * Francesco Siddi for the help with the original feature specs and design * Brecht Van Lommel for the original review of the code and design early on * Blender Foundation for the Development Fund to support the project wrap up Final patch reviewers: * Antony Riakiotakis (psy-fi) * Campbell Barton (ideasman42) * Julian Eisel (Severin) * Sergey Sharybin (nazgul) * Thomas Dinged (dingto) Code contributors of the original branch in github: * Alexey Akishin * Gabriel Caraballo --- source/blender/editors/include/ED_screen.h | 1 + source/blender/editors/include/ED_view3d.h | 7 ++++--- source/blender/editors/include/UI_interface.h | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index b4f7d806079..90b0b3510bc 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -112,6 +112,7 @@ void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa); void ED_screen_full_restore(struct bContext *C, ScrArea *sa); struct ScrArea *ED_screen_state_toggle(struct bContext *C, struct wmWindow *win, struct ScrArea *sa, const short state); void ED_screens_header_tools_menu_create(struct bContext *C, struct uiLayout *layout, void *arg); +bool ED_screen_stereo3d_required(struct bScreen *screen); /* anim */ void ED_update_for_newframe(struct Main *bmain, struct Scene *scene, int mute); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 84ac3a7c938..ff4b8a5b631 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -323,12 +323,13 @@ void ED_view3d_draw_offscreen( struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int winx, int winy, float viewmat[4][4], float winmat[4][4], bool do_bgpic, bool do_sky, bool is_persp, struct GPUOffScreen *ofs, - struct GPUFX *fx, struct GPUFXSettings *fx_settings); + struct GPUFX *fx, struct GPUFXSettings *fx_settings, + const char *viewname); struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag, - bool draw_background, int alpha_mode, char err_out[256]); + bool draw_background, int alpha_mode, const char *viewname, char err_out[256]); struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(struct Scene *scene, struct Object *camera, int width, int height, unsigned int flag, int drawtype, - bool use_solid_tex, bool use_gpencil, bool draw_background, int alpha_mode, char err_out[256]); + bool use_solid_tex, bool use_gpencil, bool draw_background, int alpha_mode, const char *viewname, char err_out[256]); struct Base *ED_view3d_give_base_under_cursor(struct bContext *C, const int mval[2]); void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, bool do_clip); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 814bbf94c79..4ca0be7c80d 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -889,6 +889,9 @@ void uiTemplateGameStates(uiLayout *layout, struct PointerRNA *ptr, const char * PointerRNA *used_ptr, const char *used_propname, int active_state); void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, int compact); void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, int color_management); +void uiTemplateImageStereo3d(uiLayout *layout, struct PointerRNA *stereo3d_format_ptr); +void uiTemplateImageViews(uiLayout *layout, struct PointerRNA *imaptr); +void uiTemplateImageFormatViews(uiLayout *layout, PointerRNA *imfptr, PointerRNA *ptr); void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser); void uiTemplateImageInfo(uiLayout *layout, struct bContext *C, Image *ima, ImageUser *iuser); void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C); -- cgit v1.2.3 From 364b6b29ff2ea19a31fdfc8e08b75ce0d46df40b Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 13 Apr 2015 14:30:17 +0200 Subject: New operator for action and graph editor that centers around current scene frame, bound to numberpad zero. --- source/blender/editors/include/UI_view2d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 4d7446a7a81..430093b641b 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -233,7 +233,7 @@ void ED_keymap_view2d(struct wmKeyConfig *keyconf); void UI_view2d_smooth_view(struct bContext *C, struct ARegion *ar, const struct rctf *cur, const int smooth_viewtx); - +void UI_view2d_center_frame(struct bContext *C, int smooth_viewtx); #define UI_MARKER_MARGIN_Y (42 * UI_DPI_FAC) #endif /* __UI_VIEW2D_H__ */ -- cgit v1.2.3 From 198ca57ae48fb6860fd82c04e5f1f0a41a5612da Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 13 Apr 2015 15:57:46 +0200 Subject: Graph editor: Normalization feature now uses the full range of the data instead of just one semiaxis for the maximum size. --- source/blender/editors/include/ED_anim_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 9dea66adc7c..73f28986375 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -617,7 +617,7 @@ typedef enum eAnimUnitConv_Flags { short ANIM_get_normalization_flags(bAnimContext *ac); /* Get unit conversion factor for given ID + F-Curve */ -float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag); +float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag, float *r_offset); /* ------------- Utility macros ----------------------- */ -- cgit v1.2.3 From 252b0cf5d28c5ce6397a64cb4bb399a6c5a438fa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 18 Apr 2015 15:41:12 +0200 Subject: Cleanup: API naming use BKE_undo_ prefix --- source/blender/editors/include/ED_paint.h | 4 ++-- source/blender/editors/include/ED_particle.h | 4 ++-- source/blender/editors/include/ED_util.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h index c3a411a2b97..822dab61a06 100644 --- a/source/blender/editors/include/ED_paint.h +++ b/source/blender/editors/include/ED_paint.h @@ -46,9 +46,9 @@ typedef bool (*UndoCleanupCb)(struct bContext *C, struct ListBase *lb); int ED_undo_paint_step(struct bContext *C, int type, int step, const char *name); void ED_undo_paint_step_num(struct bContext *C, int type, int num); -const char *ED_undo_paint_get_name(struct bContext *C, int type, int nr, int *active); +const char *ED_undo_paint_get_name(struct bContext *C, int type, int nr, bool *r_active); void ED_undo_paint_free(void); -int ED_undo_paint_valid(int type, const char *name); +bool ED_undo_paint_is_valid(int type, const char *name); bool ED_undo_paint_empty(int type); void ED_undo_paint_push_begin(int type, const char *name, UndoRestoreCb restore, UndoFreeCb free, UndoCleanupCb cleanup); void ED_undo_paint_push_end(int type); diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index 56a4bfa7e21..6cb8c0cfb19 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -66,9 +66,9 @@ void PE_undo_push(struct Scene *scene, const char *str); void PE_undo_step(struct Scene *scene, int step); void PE_undo(struct Scene *scene); void PE_redo(struct Scene *scene); -int PE_undo_valid(struct Scene *scene); +bool PE_undo_is_valid(struct Scene *scene); void PE_undo_number(struct Scene *scene, int nr); -const char *PE_undo_get_name(struct Scene *scene, int nr, int *active); +const char *PE_undo_get_name(struct Scene *scene, int nr, bool *r_active); #endif /* __ED_PARTICLE_H__ */ diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 6fa92e1953d..9556c601d1f 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -60,7 +60,7 @@ int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused); void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused); -int ED_undo_valid(const struct bContext *C, const char *undoname); +bool ED_undo_is_valid(const struct bContext *C, const char *undoname); /* undo_editmode.c */ void undo_editmode_push(struct bContext *C, const char *name, -- cgit v1.2.3 From 57d9badc2100001df3bb60c44f9da68595bac0f5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 20 Apr 2015 23:37:04 +1000 Subject: Cleanup: use bool /w flag checks --- source/blender/editors/include/ED_mesh.h | 4 +++- source/blender/editors/include/ED_view3d.h | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 8fb6fcbd0d7..f8be5251b53 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -137,7 +137,9 @@ bool EDBM_backbuf_border_mask_init(struct ViewContext *vc, const int mcords[][2] short xmin, short ymin, short xmax, short ymax); bool EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads); -struct BMVert *EDBM_vert_find_nearest(struct ViewContext *vc, float *r_dist, const bool sel, const bool strict); +struct BMVert *EDBM_vert_find_nearest( + struct ViewContext *vc, float *r_dist, + const bool use_select_bias, const bool is_strict); struct BMEdge *EDBM_edge_find_nearest(struct ViewContext *vc, float *r_dist); struct BMFace *EDBM_face_find_nearest(struct ViewContext *vc, float *r_dist); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index ff4b8a5b631..50199ade929 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -269,9 +269,10 @@ void drawcircball(int mode, const float cent[3], float rad, float tmat[4][4]); /* backbuffer select and draw support */ void view3d_validate_backbuf(struct ViewContext *vc); struct ImBuf *view3d_read_backbuf(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); -unsigned int view3d_sample_backbuf_rect(struct ViewContext *vc, const int mval[2], int size, - unsigned int min, unsigned int max, float *dist, short strict, - void *handle, bool (*indextest)(void *handle, unsigned int index)); +unsigned int view3d_sample_backbuf_rect( + struct ViewContext *vc, const int mval[2], int size, + unsigned int min, unsigned int max, float *dist, const bool is_strict, + void *handle, bool (*indextest)(void *handle, unsigned int index)); unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y); /* draws and does a 4x4 sample */ -- cgit v1.2.3 From 60e8e2013246e2c6b9675a9d7e634fe1c1ba9e75 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 20 Apr 2015 23:39:54 +1000 Subject: Cleanup: use macro for common view3d zbuf check --- source/blender/editors/include/ED_view3d.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 50199ade929..94399c24a15 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -344,8 +344,6 @@ bool ED_view3d_lock(struct RegionView3D *rv3d); uint64_t ED_view3d_datamask(const struct Scene *scene, const struct View3D *v3d); uint64_t ED_view3d_screen_datamask(const struct bScreen *screen); -bool ED_view3d_view_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d); - bool ED_view3d_offset_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d); /* camera lock functions */ @@ -392,4 +390,7 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *ar); void ED_view3d_shade_update(struct Main *bmain, struct Scene *scene, struct View3D *v3d, struct ScrArea *sa); +#define V3D_IS_ZBUF(v3d) \ + (((v3d)->flag & V3D_ZBUF_SELECT) && ((v3d)->drawtype > OB_WIRE)) + #endif /* __ED_VIEW3D_H__ */ -- cgit v1.2.3 From d57a93a7cb4d54e1ce0d890540926ef6ab88270a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Apr 2015 02:06:20 +1000 Subject: Fix T44383: Select face fails in some positions When mixing vert/edge/face with select-visible, face selection could fail when not close enough to the center. This also fixes a bug where the bias for verts over edges would prefer faces over edges too, making edges harder to pick. Mixing edge with other selection modes works more predictably now. --- source/blender/editors/include/ED_mesh.h | 15 ++++++++++++--- source/blender/editors/include/ED_view3d.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index f8be5251b53..91b05cdc1ba 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -137,11 +137,20 @@ bool EDBM_backbuf_border_mask_init(struct ViewContext *vc, const int mcords[][2] short xmin, short ymin, short xmax, short ymax); bool EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads); -struct BMVert *EDBM_vert_find_nearest( +struct BMVert *EDBM_vert_find_nearest_ex( struct ViewContext *vc, float *r_dist, const bool use_select_bias, const bool is_strict); -struct BMEdge *EDBM_edge_find_nearest(struct ViewContext *vc, float *r_dist); -struct BMFace *EDBM_face_find_nearest(struct ViewContext *vc, float *r_dist); +struct BMVert *EDBM_vert_find_nearest( + struct ViewContext *vc, float *r_dist); + +struct BMEdge *EDBM_edge_find_nearest( + struct ViewContext *vc, float *r_dist); + +struct BMFace *EDBM_face_find_nearest_ex( + struct ViewContext *vc, float *r_dist, + struct BMFace **r_efa_zbuf); +struct BMFace *EDBM_face_find_nearest( + struct ViewContext *vc, float *r_dist); bool EDBM_select_pick(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 94399c24a15..e5ac8c2f46a 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -273,6 +273,7 @@ unsigned int view3d_sample_backbuf_rect( struct ViewContext *vc, const int mval[2], int size, unsigned int min, unsigned int max, float *dist, const bool is_strict, void *handle, bool (*indextest)(void *handle, unsigned int index)); +int view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float dist); unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y); /* draws and does a 4x4 sample */ -- cgit v1.2.3 From aa880bb815e7707255f7d450f4add1b042f119fa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Apr 2015 03:19:27 +1000 Subject: Cleanup: use ED_view3d_backbuf_* prefix --- source/blender/editors/include/ED_view3d.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index e5ac8c2f46a..f68b52d9a6e 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -267,14 +267,14 @@ float ED_view3d_radius_to_dist( void drawcircball(int mode, const float cent[3], float rad, float tmat[4][4]); /* backbuffer select and draw support */ -void view3d_validate_backbuf(struct ViewContext *vc); -struct ImBuf *view3d_read_backbuf(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); -unsigned int view3d_sample_backbuf_rect( +void ED_view3d_backbuf_validate(struct ViewContext *vc); +struct ImBuf *ED_view3d_backbuf_read(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); +unsigned int ED_view3d_backbuf_sample_rect( struct ViewContext *vc, const int mval[2], int size, unsigned int min, unsigned int max, float *dist, const bool is_strict, void *handle, bool (*indextest)(void *handle, unsigned int index)); -int view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float dist); -unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y); +int ED_view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float dist); +unsigned int ED_view3d_backbuf_sample(struct ViewContext *vc, int x, int y); /* draws and does a 4x4 sample */ bool ED_view3d_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, -- cgit v1.2.3 From 62e149881a311e2f2b41131eb201d86a59031c77 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Apr 2015 04:45:26 +1000 Subject: Fixes for backbuf selection logic - Fix ED_view3d_backbuf_sample_rect, r_dist was set completely wrong. - Avoid duplicate calculations picking the nearest edge. - Bias against picking selected edges is now optional. - Remove unused callback reading the backbuf. - Remove unused strict option picking vertices. --- source/blender/editors/include/ED_mesh.h | 5 ++++- source/blender/editors/include/ED_view3d.h | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 91b05cdc1ba..3c672362a54 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -139,10 +139,13 @@ bool EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short struct BMVert *EDBM_vert_find_nearest_ex( struct ViewContext *vc, float *r_dist, - const bool use_select_bias, const bool is_strict); + const bool use_select_bias); struct BMVert *EDBM_vert_find_nearest( struct ViewContext *vc, float *r_dist); +struct BMEdge *EDBM_edge_find_nearest_ex( + struct ViewContext *vc, float *r_dist, + const bool use_select_bias); struct BMEdge *EDBM_edge_find_nearest( struct ViewContext *vc, float *r_dist); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index f68b52d9a6e..6be7f706f28 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -271,8 +271,7 @@ void ED_view3d_backbuf_validate(struct ViewContext *vc); struct ImBuf *ED_view3d_backbuf_read(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); unsigned int ED_view3d_backbuf_sample_rect( struct ViewContext *vc, const int mval[2], int size, - unsigned int min, unsigned int max, float *dist, const bool is_strict, - void *handle, bool (*indextest)(void *handle, unsigned int index)); + unsigned int min, unsigned int max, float *dist); int ED_view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float dist); unsigned int ED_view3d_backbuf_sample(struct ViewContext *vc, int x, int y); -- cgit v1.2.3 From e3a6440e7af7f90432319aec9f6ad43b557def31 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Apr 2015 21:16:19 +1000 Subject: BMesh: mesh-data picking, general improvements Generalize logic for vert/edge/face selection: - index cycling. - selection bias with mixed modes. Details: - Edges now support index cycling (as verts/faces did already) - Cycling over near elements is now only enabled when the mouse position remains the same. - No longer do 2 selection passes to perform index cycling. Fixes: - Edges behind the view could be selected (surprising nobody reported!) - Selection bias now only changes the element that gets picked without interning the return distance (was buggy with mixed modes). --- source/blender/editors/include/ED_mesh.h | 14 ++++++-------- source/blender/editors/include/ED_view3d.h | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 3c672362a54..b982ff2a83b 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -137,20 +137,18 @@ bool EDBM_backbuf_border_mask_init(struct ViewContext *vc, const int mcords[][2] short xmin, short ymin, short xmax, short ymax); bool EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads); -struct BMVert *EDBM_vert_find_nearest_ex( - struct ViewContext *vc, float *r_dist, - const bool use_select_bias); +struct BMVert *EDBM_vert_find_nearest_ex(struct ViewContext *vc, float *r_dist, + const bool use_select_bias, bool use_cycle); struct BMVert *EDBM_vert_find_nearest( struct ViewContext *vc, float *r_dist); -struct BMEdge *EDBM_edge_find_nearest_ex( - struct ViewContext *vc, float *r_dist, - const bool use_select_bias); +struct BMEdge *EDBM_edge_find_nearest_ex(struct ViewContext *vc, float *r_dist, + const bool use_select_bias, const bool use_cycle); struct BMEdge *EDBM_edge_find_nearest( struct ViewContext *vc, float *r_dist); -struct BMFace *EDBM_face_find_nearest_ex( - struct ViewContext *vc, float *r_dist, +struct BMFace *EDBM_face_find_nearest_ex(struct ViewContext *vc, float *r_dist, + const bool use_select_bias, const bool use_cycle, struct BMFace **r_efa_zbuf); struct BMFace *EDBM_face_find_nearest( struct ViewContext *vc, float *r_dist); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 6be7f706f28..ab270f657a4 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -271,7 +271,7 @@ void ED_view3d_backbuf_validate(struct ViewContext *vc); struct ImBuf *ED_view3d_backbuf_read(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); unsigned int ED_view3d_backbuf_sample_rect( struct ViewContext *vc, const int mval[2], int size, - unsigned int min, unsigned int max, float *dist); + unsigned int min, unsigned int max, float *r_dist); int ED_view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float dist); unsigned int ED_view3d_backbuf_sample(struct ViewContext *vc, int x, int y); -- cgit v1.2.3 From 50bfc4bfa0eabb68fcb5b5e82f80281fbaddcfeb Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 20 Apr 2015 19:57:57 +0200 Subject: Metadata display support - patch by Julian and me. Basically, blender adds a few metadata fields to images when we render an image. Those metadata can now be viewed in the image editor. Also, made sure metadata are available when we write imbufs to disc with "Save As". There may be more cases here that need fixing, but this means that loading an image with metadata will now properly preserve them in blender. --- source/blender/editors/include/ED_screen.h | 1 + source/blender/editors/include/ED_util.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 90b0b3510bc..b7c261cad6c 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -66,6 +66,7 @@ void ED_region_header_init(struct ARegion *ar); void ED_region_header(const struct bContext *C, struct ARegion *ar); void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar); void ED_region_info_draw(struct ARegion *ar, const char *text, int block, float fill_color[4]); +void ED_region_image_metadata_draw(struct ARegion *ar, struct ImBuf *ibuf, float zoomx, float zoomy); void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy); float ED_region_blend_factor(struct ARegion *ar); void ED_region_visible_rect(struct ARegion *ar, struct rcti *rect); diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 9556c601d1f..96d7828ffe9 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -42,6 +42,8 @@ void ED_editors_exit(struct bContext *C); bool ED_editors_flush_edits(const struct bContext *C, bool for_render); +void ED_draw_ibuf_meta_data(const bContext *C, struct ImBuf *ibuf); + /* ************** Undo ************************ */ /* undo.c */ -- cgit v1.2.3 From 3091ea49fec8b85b602aa94f229992f78c335b7a Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Tue, 21 Apr 2015 17:15:40 +0200 Subject: Metadata: * Theme support for metadata display * Increase text DPI with scaling. --- source/blender/editors/include/UI_resources.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 3923c5c4432..2b19b6180e5 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -294,7 +294,10 @@ enum { TH_INFO_DEBUG_TEXT, TH_VIEW_OVERLAY, - TH_V3D_CLIPPING_BORDER + TH_V3D_CLIPPING_BORDER, + + TH_METADATA_BG, + TH_METADATA_TEXT }; /* XXX WARNING: previous is saved in file, so do not change order! */ -- cgit v1.2.3 From 1044dfd965a8a0b85095ce51b34eb3876701d967 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Wed, 22 Apr 2015 13:19:58 +0200 Subject: Fix and simplify vertical positioning and calculation of metadata display more. --- source/blender/editors/include/ED_util.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 96d7828ffe9..9556c601d1f 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -42,8 +42,6 @@ void ED_editors_exit(struct bContext *C); bool ED_editors_flush_edits(const struct bContext *C, bool for_render); -void ED_draw_ibuf_meta_data(const bContext *C, struct ImBuf *ibuf); - /* ************** Undo ************************ */ /* undo.c */ -- cgit v1.2.3 From 18aaae101afe7ae4c120d656e85bd078d0995ea7 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 22 Apr 2015 13:41:26 +0200 Subject: Fix T44477: Overlapping tooltips in Outliner Tooltips for buttons in the Outliner could overlap the Outliner's RMB menu in some cases (and there's no way to get rid of the tooltip again). This disables the button's tooltip before creating the menu (as we do it for the normal RMB menu) --- source/blender/editors/include/UI_interface.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 4ca0be7c80d..66b946811ea 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -675,6 +675,7 @@ void UI_but_func_drawextra_set( void *arg1, void *arg2); void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *argN); +void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but); bool UI_textbutton_activate_rna(const struct bContext *C, struct ARegion *ar, const void *rna_poin_data, const char *rna_prop_id); -- cgit v1.2.3 From 8010672bbc1a89e2b7c30bc22e936052325e4b75 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 23 Apr 2015 16:11:54 +1000 Subject: BMesh: mesh-data picking, edge+vert improvement When zoomed out vert bias over edges meant it wasn't possible to select edges. Now pick the edge if the cursor is closer to its center. --- source/blender/editors/include/ED_mesh.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index b982ff2a83b..55a254c7941 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -137,17 +137,23 @@ bool EDBM_backbuf_border_mask_init(struct ViewContext *vc, const int mcords[][2] short xmin, short ymin, short xmax, short ymax); bool EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads); -struct BMVert *EDBM_vert_find_nearest_ex(struct ViewContext *vc, float *r_dist, +struct BMVert *EDBM_vert_find_nearest_ex( + struct ViewContext *vc, float *r_dist, const bool use_select_bias, bool use_cycle); struct BMVert *EDBM_vert_find_nearest( struct ViewContext *vc, float *r_dist); -struct BMEdge *EDBM_edge_find_nearest_ex(struct ViewContext *vc, float *r_dist, - const bool use_select_bias, const bool use_cycle); +struct BMEdge *EDBM_edge_find_nearest_ex( + struct ViewContext *vc,float *r_dist, + float *r_dist_center, + const bool use_select_bias, const bool use_cycle, + struct BMEdge **r_eed_zbuf); struct BMEdge *EDBM_edge_find_nearest( struct ViewContext *vc, float *r_dist); -struct BMFace *EDBM_face_find_nearest_ex(struct ViewContext *vc, float *r_dist, +struct BMFace *EDBM_face_find_nearest_ex( + struct ViewContext *vc, float *r_dist, + float *r_dist_center, const bool use_select_bias, const bool use_cycle, struct BMFace **r_efa_zbuf); struct BMFace *EDBM_face_find_nearest( -- cgit v1.2.3 From 3bffcc675b3fea221b0b93d1f2055173edd7f75b Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 25 Apr 2015 01:29:53 +0200 Subject: Fix T42495: Fullscreen area icon glitch Tried a couple of things to trigger an update/redraw for the exact right moment (sending azone update event, timer, delayed redraw, etc) but this seems to work rock solid without being *that* ugly. --- source/blender/editors/include/ED_screen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index b7c261cad6c..5b0b4642644 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -86,6 +86,7 @@ void ED_area_tag_redraw(ScrArea *sa); void ED_area_tag_redraw_regiontype(ScrArea *sa, int type); void ED_area_tag_refresh(ScrArea *sa); void ED_area_do_refresh(struct bContext *C, ScrArea *sa); +void ED_area_azones_update(ScrArea *sa, const int mouse_xy[]); void ED_area_headerprint(ScrArea *sa, const char *str); void ED_area_newspace(struct bContext *C, ScrArea *sa, int type); void ED_area_prevspace(struct bContext *C, ScrArea *sa); -- cgit v1.2.3 From 86d3a1f683ccc5905580e2a11222217d227db7de Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 Apr 2015 12:29:52 +1000 Subject: Cleanup --- source/blender/editors/include/ED_mesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 55a254c7941..ea544135d3b 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -144,7 +144,7 @@ struct BMVert *EDBM_vert_find_nearest( struct ViewContext *vc, float *r_dist); struct BMEdge *EDBM_edge_find_nearest_ex( - struct ViewContext *vc,float *r_dist, + struct ViewContext *vc, float *r_dist, float *r_dist_center, const bool use_select_bias, const bool use_cycle, struct BMEdge **r_eed_zbuf); -- cgit v1.2.3 From cf366c8b6686bae79aeccbdecdbef2472ff77923 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 27 Apr 2015 01:17:51 +1000 Subject: UI: 'View Online Manual' Shortcut D1031, implement proposal T37478 to give easy access to the online manual. Use Alt+F1 while hovering over a button/setting. --- source/blender/editors/include/UI_interface.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 66b946811ea..1e0cc972ef8 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -483,6 +483,14 @@ bool UI_but_active_only(const struct bContext *C, struct ARegion *ar, uiBlock void UI_but_execute(const struct bContext *C, uiBut *but); +bool UI_but_online_manual_id( + const uiBut *but, + char *r_str, size_t maxlength) + ATTR_WARN_UNUSED_RESULT; +bool UI_but_online_manual_id_from_active( + const struct bContext *C, + char *r_str, size_t maxlength) + ATTR_WARN_UNUSED_RESULT; /* Buttons * -- cgit v1.2.3 From e2d60d180ed8a318b48833a07e1d17a788fa9a38 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 28 Apr 2015 23:34:40 +1000 Subject: Project Paint: Add symmetry support - Access from symmetry panel (as with sculpt) - Supports multiple axis at once. - Supports all brush types including clone. --- source/blender/editors/include/ED_view3d.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index ab270f657a4..be4204e7cb7 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -219,6 +219,7 @@ void ED_view3d_win_to_vector(const struct ARegion *ar, const float mval[2], floa bool ED_view3d_win_to_segment(const struct ARegion *ar, struct View3D *v3d, const float mval[2], float r_ray_start[3], float r_ray_end[3], const bool do_clip); void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]); +void ED_view3d_ob_project_mat_get_from_obmat(const struct RegionView3D *rv3d, float obmat[4][4], float pmat[4][4]); void ED_view3d_unproject(struct bglMats *mats, float out[3], const float x, const float y, const float z); /* end */ -- cgit v1.2.3 From 2d491b84151ad3cf3050f0526d187aa664873c8f Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 30 Apr 2015 13:52:25 +0200 Subject: Minor tweaks to make fill and invert support gpixel operations --- source/blender/editors/include/ED_paint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h index 822dab61a06..e46f4b966c0 100644 --- a/source/blender/editors/include/ED_paint.h +++ b/source/blender/editors/include/ED_paint.h @@ -58,7 +58,7 @@ void ED_undo_paint_push_end(int type); void ED_image_undo_restore(struct bContext *C, struct ListBase *lb); void ED_image_undo_free(struct ListBase *lb); void ED_imapaint_clear_partial_redraw(void); -void ED_imapaint_dirty_region(struct Image *ima, struct ImBuf *ibuf, int x, int y, int w, int h); +void ED_imapaint_dirty_region(struct Image *ima, struct ImBuf *ibuf, int x, int y, int w, int h, bool find_old); void ED_imapaint_bucket_fill(struct bContext *C, float color[3], struct wmOperator *op); #endif /* __ED_PAINT_H__ */ -- cgit v1.2.3 From f271d85b865cb5e82b50a29f91d2cabbbede6a9a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 30 Apr 2015 14:04:41 +0200 Subject: Fix T44439: outliner's treestore could keep invalid ID pointers, could crash on undo due to invalid mem access. We cannot nuke treestore in readfile's `blo_lib_link_screen_restore()`, because this will destroy all UI-state data (like opened/closed items, etc.). Since we cannot know for sure whether an ID pointer from tselem->id is valid here, we have to ensure they are never invalid, i.e. to always set them to NULL when we delete them. To do so, this commit uses a similar approach as what already exists for ID references in WM notifiers - it extends `free_notifier_reference_cb()` to also nullify those IDs in all outliners. Note that some ID types are not used(shown) by outliner currently, so `TREESTORE_ID_TYPE` macro was added, that checks whether an ID is possibly used by outliner. Avoids a few searches in whole tree whene deleting some IDs. Reviewers: campbellbarton, sergey Maniphest Tasks: T44439 Differential Revision: https://developer.blender.org/D1272 --- source/blender/editors/include/ED_outliner.h | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 source/blender/editors/include/ED_outliner.h (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_outliner.h b/source/blender/editors/include/ED_outliner.h new file mode 100644 index 00000000000..af4af8e2f5d --- /dev/null +++ b/source/blender/editors/include/ED_outliner.h @@ -0,0 +1,36 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2015, Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file ED_outliner.h + * \ingroup editors + */ + +#ifndef __ED_OUTLINER_H__ +#define __ED_OUTLINER_H__ + +struct ID; +struct SpaceOops; + +/* Used to check whether a given texture context is valid in current context. */ +void ED_outliner_id_unref(struct SpaceOops *so, const struct ID *id); + +#endif /* __ED_OUTLINER_H__ */ -- cgit v1.2.3 From fdc5f9c0a81bba0be6bab5120cdfc955d63265d5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 May 2015 12:25:33 +1000 Subject: Add name argument to data creation API calls Was adding then renaming, unnecessarily. --- source/blender/editors/include/ED_object.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 3b7157bd465..c52174c8f2d 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -138,8 +138,10 @@ bool ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, c bool *enter_editmode, unsigned int *layer, bool *is_view_aligned); struct Object *ED_object_add_type( - struct bContext *C, int type, const float loc[3], const float rot[3], - bool enter_editmode, unsigned int layer) ATTR_RETURNS_NONNULL; + struct bContext *C, + int type, const char *name, const float loc[3], const float rot[3], + bool enter_editmode, unsigned int layer) + ATTR_NONNULL(1) ATTR_RETURNS_NONNULL; void ED_object_single_users(struct Main *bmain, struct Scene *scene, const bool full, const bool copy_groups); void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob); -- cgit v1.2.3 From 77e6a001a96b7eb3b2b1c2216a48c85c1b6906e0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 May 2015 15:07:24 +1000 Subject: Fix T44376: Buttons context, invalid data access Removing a scene from the buttons window would crash from a Python operator. --- source/blender/editors/include/ED_buttons.h | 2 ++ source/blender/editors/include/ED_screen.h | 1 - source/blender/editors/include/ED_util.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_buttons.h b/source/blender/editors/include/ED_buttons.h index 64c16605dec..9a987d7618c 100644 --- a/source/blender/editors/include/ED_buttons.h +++ b/source/blender/editors/include/ED_buttons.h @@ -37,4 +37,6 @@ bool ED_texture_context_check_particles(const struct bContext *C); bool ED_texture_context_check_linestyle(const struct bContext *C); bool ED_texture_context_check_others(const struct bContext *C); +void ED_buttons_id_unref(struct SpaceButs *sbuts, const struct ID *id); + #endif /* __ED_BUTTONS_H__ */ diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 5b0b4642644..8de9a7f5f88 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -76,7 +76,6 @@ void ED_region_visible_rect(struct ARegion *ar, struct rcti *rect); void ED_spacetypes_keymap(struct wmKeyConfig *keyconf); int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco); - /* areas */ void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa); void ED_area_exit(struct bContext *C, struct ScrArea *sa); diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 9556c601d1f..496ce7f2c60 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -42,6 +42,8 @@ void ED_editors_exit(struct bContext *C); bool ED_editors_flush_edits(const struct bContext *C, bool for_render); +void ED_spacedata_id_unref(struct SpaceLink *sl, const struct ID *id); + /* ************** Undo ************************ */ /* undo.c */ -- cgit v1.2.3 From 74dc4e87a6df2826f26eb94eaff8fe02a3911c24 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 May 2015 18:02:56 +1000 Subject: Fix Buttons context, invalid object data access Another instance of T44376. Crash where the Python context would access a stale pointer to the active object. --- source/blender/editors/include/ED_node.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index b02ebeb650b..1445308c485 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -103,6 +103,8 @@ void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNod void ED_node_composite_job(const struct bContext *C, struct bNodeTree *nodetree, struct Scene *scene_owner); +void ED_node_id_unref(struct SpaceNode *snode, const ID *id); + /* node_ops.c */ void ED_operatormacros_node(void); -- cgit v1.2.3 From 711e2f71a80923e0b1d5acc0b6634c0b326238b6 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 4 May 2015 12:17:49 +0200 Subject: Support displaying metadata for images in sequencer preview windows (not backdrop) --- source/blender/editors/include/ED_screen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 8de9a7f5f88..7f6679b827b 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -66,7 +66,7 @@ void ED_region_header_init(struct ARegion *ar); void ED_region_header(const struct bContext *C, struct ARegion *ar); void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar); void ED_region_info_draw(struct ARegion *ar, const char *text, int block, float fill_color[4]); -void ED_region_image_metadata_draw(struct ARegion *ar, struct ImBuf *ibuf, float zoomx, float zoomy); +void ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, rctf frame, float zoomx, float zoomy); void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy); float ED_region_blend_factor(struct ARegion *ar); void ED_region_visible_rect(struct ARegion *ar, struct rcti *rect); -- cgit v1.2.3 From cc81b58277dcea68587d3ff2f4a3ee8a6b28c074 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 4 May 2015 21:12:28 +0200 Subject: Cleanup: deduplicate code. FileBrowser had its own 'shorten_string' func, when we have a full fledge one in interface_widget code... --- source/blender/editors/include/UI_interface.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 1e0cc972ef8..01fd19c14e9 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -319,6 +319,11 @@ void UI_draw_safe_areas( #define UI_SCROLL_NO_OUTLINE (1 << 2) void UI_draw_widget_scroll(struct uiWidgetColors *wcol, const struct rcti *rect, const struct rcti *slider, int state); +/* Shortening string helper. */ +float UI_text_clip_middle_ex( + struct uiFontStyle *fstyle, char *str, float okwidth, const float minwidth, + const size_t max_len, const char *rpart_sep); + /* Callbacks * * UI_block_func_handle_set/ButmFunc are for handling events through a callback. -- cgit v1.2.3 From a077be36580e40af7ef3a84e8a52b8e90a61a0e5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 8 May 2015 07:25:39 +1000 Subject: Cleanup: use r_* prefix for return args --- source/blender/editors/include/BIF_glutil.h | 4 ++-- source/blender/editors/include/ED_image.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 4dc39681ed2..b904417cfcb 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -181,8 +181,8 @@ typedef struct gla2DDrawInfo gla2DDrawInfo; #if 0 gla2DDrawInfo *glaBegin2DDraw(struct rcti *screen_rect, struct rctf *world_rect); -void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r); -void gla2DDrawTranslatePtv(gla2DDrawInfo *di, float world[2], int screen_r[2]); +void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *r_sc_x, int *r_sc_y); +void gla2DDrawTranslatePtv(gla2DDrawInfo *di, float world[2], int r_screen[2]); void glaEnd2DDraw(gla2DDrawInfo *di); diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index fc42d2b5495..f49d4b508c6 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -47,7 +47,7 @@ struct Mask *ED_space_image_get_mask(struct SpaceImage *sima); void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct Mask *mask); bool ED_space_image_color_sample(struct Scene *scene, struct SpaceImage *sima, struct ARegion *ar, int mval[2], float r_col[3]); -struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **lock_r); +struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock); void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock); bool ED_space_image_has_buffer(struct SpaceImage *sima); -- cgit v1.2.3 From dfbb876d4660481a980e18b66a3f8d11b5f55b23 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 11 May 2015 15:32:43 +1000 Subject: UI: initial support for UI editing selected items Add basic support (holding Alt) to edit all selected objects/bones/sequences. --- source/blender/editors/include/UI_interface.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 01fd19c14e9..cc66cbe1879 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -981,6 +981,10 @@ void ED_button_operatortypes(void); void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop); int UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event); +bool UI_context_copy_to_selected_list( + struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, + struct ListBase *r_lb, bool *r_use_path_from_id, char **r_path); + /* Helpers for Operators */ uiBut *UI_context_active_but_get(const struct bContext *C); void UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index); -- cgit v1.2.3 From d30f664c0438e8378c79d5beb114b1338d0e1d94 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 11 May 2015 16:29:12 +0200 Subject: Expose PreviewImage & custom icons to py API. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit mainly: * Exposes PreviewImage struct in RNA, including ways for user to set images data. * Adds a new kind of PreviewImage, using a file path and IMB_thumb to get image. * Adds a new kind of custom icon using PreviewImage, unrelated to ID previews system. * Adds a python API (utils.previews) to allow python scripts to access those custom previews/icons. Note that loading image from files' thumbnails is done when needed (deferred loading), not when defining the custom preview/icon. WARNING: for release addons who would want to use this, please keep it to a strict minimum, really needed level. We do not want our UI to explode under hundreds of different flashy icons! For more info, see also the release notes of Blender 2.75 (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/Addons) and the example/templates featured with Blender. Patch by Campbell (ideasman42), InĂªs (brita) and Bastien (mont29). Differential Revision: https://developer.blender.org/D1255 --- source/blender/editors/include/ED_render.h | 10 +++++++--- source/blender/editors/include/UI_interface_icons.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 2bc0566f4a6..414126cac13 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -60,11 +60,15 @@ struct Scene *ED_render_job_get_current_scene(const struct bContext *C); * - PR_BUTS_RENDER: preview is rendered for buttons window * - PR_ICON_RENDER: preview is rendered for icons. hopefully fast enough for at least 32x32 * - PR_NODE_RENDER: preview is rendered for node editor + * - PR_ICON_DEFERRED: No render, we just ensure deferred icon data gets generated. */ -#define PR_BUTS_RENDER 0 -#define PR_ICON_RENDER 1 -#define PR_NODE_RENDER 2 +enum { + PR_BUTS_RENDER = 0, + PR_ICON_RENDER = 1, + PR_NODE_RENDER = 2, + PR_ICON_DEFERRED = 3, +}; void ED_preview_init_dbase(void); void ED_preview_free_dbase(void); diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index 9d190fa81c7..92f3b0180c6 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -49,7 +49,7 @@ typedef struct IconFile { #define ICON_DEFAULT_HEIGHT_SCALE ((int)(UI_UNIT_Y * 0.8f)) #define ICON_DEFAULT_WIDTH_SCALE ((int)(UI_UNIT_X * 0.8f)) -#define PREVIEW_DEFAULT_HEIGHT 96 +#define PREVIEW_DEFAULT_HEIGHT 128 /* * Resizable Icons for Blender -- cgit v1.2.3 From e4c93dc7db9b50acf898b667c95b208856b80ea8 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Wed, 13 May 2015 20:30:53 +0200 Subject: Zoom to frame options, requested by the Hwoozeberry (dutch translation) team. There are 3 options here: 1) Keep range (previous behaviour) 2) Seconds - allows a specified offset in seconds around current frame 3) keyframes - zoom to include a number of keyframes around the cursor Options 2 and 3 have their own properties to tweak the behaviour and all options can be found in User Preferences->Interface under the 2D viewports section. Number 3 will probably need some refinement so commiting here for the hwoozeberry team to test first. --- source/blender/editors/include/ED_anim_api.h | 1 + source/blender/editors/include/UI_view2d.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 73f28986375..0f70bf3c745 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -659,6 +659,7 @@ void ANIM_list_elem_update(struct Scene *scene, bAnimListElem *ale); /* data -> channels syncing */ void ANIM_sync_animchannels_to_data(const struct bContext *C); +void ANIM_center_frame(struct bContext *C, int smooth_viewtx); /* ************************************************* */ /* OPERATORS */ diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 430093b641b..2c8f5f6590a 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -233,7 +233,6 @@ void ED_keymap_view2d(struct wmKeyConfig *keyconf); void UI_view2d_smooth_view(struct bContext *C, struct ARegion *ar, const struct rctf *cur, const int smooth_viewtx); -void UI_view2d_center_frame(struct bContext *C, int smooth_viewtx); #define UI_MARKER_MARGIN_Y (42 * UI_DPI_FAC) #endif /* __UI_VIEW2D_H__ */ -- cgit v1.2.3 From 30b45d5591fdd20e5cd5abd0cf3be62622c0b0db Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 17 May 2015 23:04:34 +1000 Subject: BMesh: don't check winding for uv-vert-map Made link-select separate front/back with projected UV's --- source/blender/editors/include/ED_mesh.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index ea544135d3b..3f16055e762 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -116,7 +116,9 @@ struct MTexPoly *EDBM_mtexpoly_active_get(struct BMEditMesh *em, struct BMFace * void BM_uv_vert_map_free(struct UvVertMap *vmap); struct UvMapVert *BM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v); -struct UvVertMap *BM_uv_vert_map_create(struct BMesh *bm, bool use_select, const float limit[2]); +struct UvVertMap *BM_uv_vert_map_create( + struct BMesh *bm, + const float limit[2], const bool use_select, const bool use_winding); void EDBM_flag_enable_all(struct BMEditMesh *em, const char hflag); void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag); -- cgit v1.2.3 From 78250f1d1d87d5158be4824e64d8869a3b361f75 Mon Sep 17 00:00:00 2001 From: Ines Almeida Date: Fri, 22 May 2015 21:31:26 +0100 Subject: IconView template: adding optional labels to popup buttons --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index cc66cbe1879..1b09671b3f6 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -889,7 +889,7 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr); void uiTemplatePreview(uiLayout *layout, struct bContext *C, struct ID *id, int show_buttons, struct ID *parent, struct MTex *slot, const char *preview_id); void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int expand); -void uiTemplateIconView(uiLayout *layout, struct PointerRNA *ptr, const char *propname); +void uiTemplateIconView(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int show_labels); void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *propname); void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname); void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname); -- cgit v1.2.3 From 1ac0fef34543b00774c9267b7988ee7f37dc9977 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 25 May 2015 22:06:25 +0200 Subject: Fix `widget_draw_preview()` not taking into account given alpha. Needed to get correct 'inactive' effect on buttons with big previews. --- source/blender/editors/include/UI_interface_icons.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index 92f3b0180c6..634dd3d5bbc 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -64,7 +64,7 @@ void UI_id_icon_render( void UI_icon_draw(float x, float y, int icon_id); void UI_icon_draw_preview(float x, float y, int icon_id); void UI_icon_draw_preview_aspect(float x, float y, int icon_id, float aspect); -void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspect, int size); +void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspect, float alpha, int size); void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha); void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, const float rgb[3]); -- cgit v1.2.3 From bfa7586ba33bd090af13b8671326cdffd4c7592b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 1 Jun 2015 16:40:43 +1000 Subject: Fix T44747: Drag toggle /w nodes (glitch) It was possible to perform actions while performing a drag-toggle. --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 1b09671b3f6..e5ab7f2bb70 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -746,7 +746,7 @@ void UI_panel_category_draw_all(struct ARegion *ar, const * as screen/ if ED_KEYMAP_UI is set, or internally in popup functions. */ void UI_region_handlers_add(struct ListBase *handlers); -void UI_popup_handlers_add(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup, const bool accept_dbl_click); +void UI_popup_handlers_add(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup, const char flag); void UI_popup_handlers_remove(struct ListBase *handlers, uiPopupBlockHandle *popup); void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers); -- cgit v1.2.3 From 2c7cb8ce59da8b4d9fb9d9128c736e6f6560aa01 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 3 Jun 2015 15:01:02 +1000 Subject: Fix UI string clip (reverse search separator char) The string may have many '|' characters, only the last is clipped. --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index e5ab7f2bb70..0b400e254f8 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -322,7 +322,7 @@ void UI_draw_widget_scroll(struct uiWidgetColors *wcol, const struct rcti *rect, /* Shortening string helper. */ float UI_text_clip_middle_ex( struct uiFontStyle *fstyle, char *str, float okwidth, const float minwidth, - const size_t max_len, const char *rpart_sep); + const size_t max_len, const char rpart_sep); /* Callbacks * -- cgit v1.2.3 From b54e95a5c8dcb7eae1059af107a7cdfa028d7e2e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 8 Jun 2015 15:57:42 +1000 Subject: Alternative fix copying windows from popup dialogs It could still crash if the window was freed and another was activated. see T44688. --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 0b400e254f8..ef0a57fed75 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -401,7 +401,7 @@ void UI_popup_block_invoke_ex(struct bContext *C, uiBlockCreateFunc func, void * void UI_popup_block_ex(struct bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg); /* void uiPupBlockOperator(struct bContext *C, uiBlockCreateFunc func, struct wmOperator *op, int opcontext); */ /* UNUSED */ -void UI_popup_block_close(struct bContext *C, uiBlock *block); +void UI_popup_block_close(struct bContext *C, struct wmWindow *win, uiBlock *block); /* Blocks * -- cgit v1.2.3 From 0589a814ba0b6abc5323da69b92e2fd5f752065c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 7 Jun 2015 21:33:48 +0200 Subject: Cycles: Fix crash doing render preview of external OSL script --- source/blender/editors/include/ED_render.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 414126cac13..ba58ae60b15 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -74,7 +74,7 @@ void ED_preview_init_dbase(void); void ED_preview_free_dbase(void); void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, struct ID *parent, struct MTex *slot, int sizex, int sizey, int method); -void ED_preview_icon_render(struct Scene *scene, struct ID *id, unsigned int *rect, int sizex, int sizey); +void ED_preview_icon_render(struct Main *bmain, struct Scene *scene, struct ID *id, unsigned int *rect, int sizex, int sizey); void ED_preview_icon_job(const struct bContext *C, void *owner, struct ID *id, unsigned int *rect, int sizex, int sizey); void ED_preview_kill_jobs(struct wmWindowManager *wm, struct Main *bmain); -- cgit v1.2.3 From 4f9494715719d563d7f45210e45aa3056535a09b Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 8 Jun 2015 15:59:32 +0200 Subject: Fix T44976: 3D View turns into an Image Editor after saving render result Was a case of two stacked temporary fullscreens, so a quite extreme situation. --- source/blender/editors/include/ED_screen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 7f6679b827b..441a9bdb1c1 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -109,7 +109,7 @@ void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, void ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh); void ED_screen_restore_temp_type(struct bContext *C, ScrArea *sa); ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type); -void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa); +void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa, const bool was_prev_temp); void ED_screen_full_restore(struct bContext *C, ScrArea *sa); struct ScrArea *ED_screen_state_toggle(struct bContext *C, struct wmWindow *win, struct ScrArea *sa, const short state); void ED_screens_header_tools_menu_create(struct bContext *C, struct uiLayout *layout, void *arg); -- cgit v1.2.3 From cb9bd23d0cac33c456c97c207cac4539269db518 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 9 Jun 2015 17:17:22 +1000 Subject: Fix T44930: File-select in redo panel, disables UI --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index ef0a57fed75..1976d9953f9 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -991,7 +991,7 @@ void UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA void UI_context_active_but_prop_handle(struct bContext *C); struct wmOperator *UI_context_active_operator_get(const struct bContext *C); void UI_context_update_anim_flag(const struct bContext *C); -void UI_context_active_but_prop_get_filebrowser(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop); +void UI_context_active_but_prop_get_filebrowser(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, bool *r_is_undo); void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop); /* Styled text draw */ -- cgit v1.2.3 From 96d9801423be600268afc57c078063cd9906f609 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 11 Jun 2015 22:46:42 +0200 Subject: Masking: Numpad-. now centers view to selected control points Currently feather points are being ignored, it could be improved in the future. --- source/blender/editors/include/ED_mask.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h index 1611276ca70..1f13b46ff2a 100644 --- a/source/blender/editors/include/ED_mask.h +++ b/source/blender/editors/include/ED_mask.h @@ -31,6 +31,7 @@ #ifndef __ED_MASK_H__ #define __ED_MASK_H__ +struct bContext; struct wmKeyConfig; struct MaskLayer; struct MaskLayerShape; @@ -48,6 +49,7 @@ void ED_mask_point_pos__reverse(struct ScrArea *sa, struct ARegion *ar, float x, float y, float *xr, float *yr); void ED_mask_cursor_location_get(struct ScrArea *sa, float cursor[2]); +bool ED_mask_selected_minmax(const struct bContext *C, float min[2], float max[2]); void ED_operatortypes_mask(void); void ED_keymap_mask(struct wmKeyConfig *keyconf); -- cgit v1.2.3 From 9326820a1baa120bbd4da5f20baca16460bd32c0 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sat, 13 Jun 2015 14:04:39 -0300 Subject: Multi-View: Show multiview image properties only in the places where they are supported aka, remove multiview properties from the texture panel, the textures node (image), and any other parts. The multiview options are now to be explicitly set in the image template in order to have them available in the respective panel --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 1976d9953f9..b5e1b9f08b1 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -901,7 +901,7 @@ void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *prop PointerRNA *used_ptr, const char *used_propname, int active_layer); void uiTemplateGameStates(uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *used_ptr, const char *used_propname, int active_state); -void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, int compact); +void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, int compact, int multiview); void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, int color_management); void uiTemplateImageStereo3d(uiLayout *layout, struct PointerRNA *stereo3d_format_ptr); void uiTemplateImageViews(uiLayout *layout, struct PointerRNA *imaptr); -- cgit v1.2.3 From 3b57f075a8031d2fc0e58f4f28ed060832065b0b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 17 Jun 2015 12:30:30 +0200 Subject: Fix (unreported) redo of 'bone envelope distance resize' transform op not working (it would behave like 'bone envelope resize' instead). Issue comes from the fact this transform op shares some common points with both BoneResize and BoneEnvelope operations. However, trying to re-use `TFM_BONE_ENVELOPE` itself in this case is bad idea, since this mode gets stored in transform op and is directly re-used for redo, by-passing the whole init phase that shall be done in `TFM_BONESIZE` mode... So now, we add a real new mode, `TFM_BONE_ENVELOPE_DIST`, while keeping most of existing code and all existing behavior. This is slightly hackish - but was already anyway, and avoids creating a full new set of function for pretty much the same thing. As a side note, also makes it possible to resize envelope distance outside of envelope viewing mode (from py or by adding a custom shortcut). --- source/blender/editors/include/ED_transform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 478cb927011..732e67a341d 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -83,7 +83,8 @@ enum TfmMode { TFM_ALIGN, TFM_EDGE_SLIDE, TFM_VERT_SLIDE, - TFM_SEQ_SLIDE + TFM_SEQ_SLIDE, + TFM_BONE_ENVELOPE_DIST, }; /* TRANSFORM CONTEXTS */ -- cgit v1.2.3 From e019d8fb8c3bdab9c2eb20f6217c93af704979f5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 20 Jun 2015 19:28:51 +1000 Subject: Transform: UV islands were split by winding This meant front/back faces from a projection would be seen as separate islands. --- source/blender/editors/include/ED_mesh.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 3f16055e762..9534da622fb 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -107,7 +107,9 @@ void EDBM_mesh_reveal(struct BMEditMesh *em); void EDBM_update_generic(struct BMEditMesh *em, const bool do_tessface, const bool is_destructive); -struct UvElementMap *BM_uv_element_map_create(struct BMesh *bm, const bool selected, const bool do_islands); +struct UvElementMap *BM_uv_element_map_create( + struct BMesh *bm, + const bool selected, const bool use_winding, const bool do_islands); void BM_uv_element_map_free(struct UvElementMap *vmap); struct UvElement *BM_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l); -- cgit v1.2.3 From 60575480583500f27698e2e3e372ec8fab40033e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 21 Jun 2015 16:06:44 +0200 Subject: Fix/Cleanup possibility to type insane values in 'add' operators options. Our 'hard limit' values was too often max_int/float here, mis-typing could lead to crash (or infinite hanging) of Blender, see e.g. http://blender.stackexchange.com/questions/32790/blender-forces-computer-to-reboot-after-mistyping-extreme-value-for-resolution-i --- source/blender/editors/include/ED_object.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index c52174c8f2d..43f1757a66d 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -131,6 +131,10 @@ float ED_object_new_primitive_matrix( struct bContext *C, struct Object *editob, const float loc[3], const float rot[3], float primmat[4][4]); + +/* Avoid allowing too much insane values even by typing (typos can hang/crash Blender otherwise). */ +#define OBJECT_ADD_SIZE_MAXF 1.0e12f + void ED_object_add_unit_props(struct wmOperatorType *ot); void ED_object_add_generic_props(struct wmOperatorType *ot, bool do_editmode); bool ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, const char view_align_axis, -- cgit v1.2.3 From b318795c3b3dc3bc274dfb445b4eb11b1fd6257e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 23 Jun 2015 17:35:55 +0200 Subject: Fix T45051: Curve parent bug. PARCURVE is deprecated parting type, should never have been exposed to user! Not a regression, but safe enough for final 2.75 imho. --- source/blender/editors/include/ED_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 43f1757a66d..c62bdc1ba87 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -77,7 +77,7 @@ typedef enum eParentType { PAR_PATH_CONST, PAR_LATTICE, PAR_VERTEX, - PAR_VERTEX_TRI + PAR_VERTEX_TRI, } eParentType; #ifdef __RNA_TYPES_H__ -- cgit v1.2.3 From ba98e6148b7f8ca1b9040c5555b7dfa011c13b90 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Jun 2015 15:59:48 +1000 Subject: API calls for converting weights to float array --- source/blender/editors/include/ED_mesh.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 9534da622fb..8e19ec839d8 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -243,6 +243,11 @@ void ED_vgroup_parray_mirror_assign(struct Object *ob, void ED_vgroup_parray_remove_zero(struct MDeformVert **dvert_array, const int dvert_tot, const bool *vgroup_validmap, const int vgroup_tot, const float epsilon, const bool keep_single); +void ED_vgroup_parray_to_weight_array(const struct MDeformVert **dvert_array, const int dvert_tot, + float *dvert_weights, const int def_nr); +void ED_vgroup_parray_from_weight_array(struct MDeformVert **dvert_array, const int dvert_tot, + const float *dvert_weights, const int def_nr, + const bool remove_zero); void ED_vgroup_mirror(struct Object *ob, const bool mirror_weights, const bool flip_vgroups, const bool all_vgroups, const bool use_topology, -- cgit v1.2.3