diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-18 00:56:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-18 00:56:25 +0400 |
commit | 48006292d8b3c6c8dd4bfe87bdbe271db93cffff (patch) | |
tree | ca98c07367717703c5a8801063cc42e0aff5b855 /source/blender/editors | |
parent | 4c66e696fbcaefe40f0394fea8fc4a55bb7d6994 (diff) | |
parent | 61596d5bb365a96b4b19adf0ef72ec1ea47212aa (diff) |
svn merge ^/trunk/blender -r44189:44204
Diffstat (limited to 'source/blender/editors')
93 files changed, 363 insertions, 276 deletions
diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h index 0ac941e5630..bfc70c79404 100644 --- a/source/blender/editors/animation/anim_intern.h +++ b/source/blender/editors/animation/anim_intern.h @@ -28,8 +28,8 @@ */ -#ifndef ANIM_INTERN_H -#define ANIM_INTERN_H +#ifndef __ANIM_INTERN_H__ +#define __ANIM_INTERN_H__ /* KeyingSets/Keyframing Interface ------------- */ @@ -79,4 +79,4 @@ void ANIM_OT_driver_button_remove(struct wmOperatorType *ot); void ANIM_OT_copy_driver_button(struct wmOperatorType *ot); void ANIM_OT_paste_driver_button(struct wmOperatorType *ot); -#endif // ANIM_INTERN_H +#endif // __ANIM_INTERN_H__ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 84206c4275e..5557923c3d6 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1178,7 +1178,8 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - prop= RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", + "Show a popup when the keyframes get successfully added"); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1233,7 +1234,8 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) * - by default, this is disabled so that if a menu is shown, this doesn't come up too */ // XXX should this just be always on? - prop= RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert", + "Show a popup when the keyframes get successfully added"); RNA_def_property_flag(prop, PROP_HIDDEN); /* whether the menu should always be shown @@ -1273,7 +1275,7 @@ static int delete_key_exec (bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* try to insert keyframes for the channels specified by KeyingSet */ + /* try to delete keyframes for the channels specified by KeyingSet */ success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_DELETE, cfra); if (G.f & G_DEBUG) printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success); @@ -1325,7 +1327,8 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Delete", + "Show a popup when the keyframes get successfully removed"); } /* Delete Key Operator ------------------------ */ diff --git a/source/blender/editors/armature/BIF_generate.h b/source/blender/editors/armature/BIF_generate.h index 311b110a3f6..1d8ee8e2c62 100644 --- a/source/blender/editors/armature/BIF_generate.h +++ b/source/blender/editors/armature/BIF_generate.h @@ -23,8 +23,8 @@ */ -#ifndef BIF_GENERATE_H -#define BIF_GENERATE_H +#ifndef __BIF_GENERATE_H__ +#define __BIF_GENERATE_H__ struct ToolSettings; struct EditBone; @@ -45,4 +45,4 @@ struct EditBone * subdivideArcBy(struct ToolSettings *toolsettings, struct bArma void setBoneRollFromNormal(struct EditBone *bone, float *no, float invmat[][4], float tmat[][3]); -#endif /* BIF_GENERATE_H */ +#endif /* __BIF_GENERATE_H__ */ diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h index ad3d3555250..c878b0c36df 100644 --- a/source/blender/editors/armature/BIF_retarget.h +++ b/source/blender/editors/armature/BIF_retarget.h @@ -23,8 +23,8 @@ */ -#ifndef BIF_RETARGET_H -#define BIF_RETARGET_H +#ifndef __BIF_RETARGET_H__ +#define __BIF_RETARGET_H__ #include "DNA_listBase.h" @@ -168,4 +168,4 @@ void RIG_printArc(struct RigGraph *rg, struct RigArc *arc); void RIG_printGraph(struct RigGraph *rg); void RIG_printArcBones(struct RigArc *arc); -#endif /* BIF_RETARGET_H */ +#endif /* __BIF_RETARGET_H__ */ diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index 40d909380a0..13239f87e65 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -28,8 +28,8 @@ * \ingroup edarmature */ -#ifndef ED_ARMATURE_INTERN_H -#define ED_ARMATURE_INTERN_H +#ifndef __ARMATURE_INTERN_H__ +#define __ARMATURE_INTERN_H__ /* internal exports only */ struct wmOperatorType; @@ -219,5 +219,5 @@ struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, const char * /* editbones is the source list */ void updateDuplicateSubtargetObjects(struct EditBone *dupBone, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob); -#endif /* ED_ARMATURE_INTERN_H */ +#endif /* __ARMATURE_INTERN_H__ */ diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 4ddce14ab92..bb493d3fec4 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -182,9 +182,9 @@ static void laplacian_triangle_area(LaplacianSystem *sys, int i1, int i2, int i3 t2= cotan_weight(v2, v3, v1); t3= cotan_weight(v3, v1, v2); - if(RAD2DEGF(angle_v3v3v3(v2, v1, v3)) > 90) obtuse= 1; - else if(RAD2DEGF(angle_v3v3v3(v1, v2, v3)) > 90) obtuse= 2; - else if(RAD2DEGF(angle_v3v3v3(v1, v3, v2)) > 90) obtuse= 3; + if (angle_v3v3v3(v2, v1, v3) > DEG2RADF(90.0f)) obtuse= 1; + else if(angle_v3v3v3(v1, v2, v3) > DEG2RADF(90.0f)) obtuse= 2; + else if(angle_v3v3v3(v1, v3, v2) > DEG2RADF(90.0f)) obtuse= 3; if (obtuse > 0) { area= area_tri_v3(v1, v2, v3); diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h index 6ec67997d24..fbc1596ed0c 100644 --- a/source/blender/editors/armature/meshlaplacian.h +++ b/source/blender/editors/armature/meshlaplacian.h @@ -31,8 +31,8 @@ */ -#ifndef BIF_MESHLAPLACIAN_H -#define BIF_MESHLAPLACIAN_H +#ifndef __MESHLAPLACIAN_H__ +#define __MESHLAPLACIAN_H__ //#define RIGID_DEFORM diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h index 0080bbec120..b925aea510a 100644 --- a/source/blender/editors/armature/reeb.h +++ b/source/blender/editors/armature/reeb.h @@ -25,8 +25,8 @@ */ -#ifndef REEB_H_ -#define REEB_H_ +#ifndef __REEB_H__ +#define __REEB_H__ #define WITH_BF_REEB @@ -203,4 +203,4 @@ void REEB_exportGraph(ReebGraph *rg, int count); void REEB_draw(void); -#endif /*REEB_H_*/ +#endif /*__REEB_H__*/ diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h index 2014345e163..0cc47774207 100644 --- a/source/blender/editors/curve/curve_intern.h +++ b/source/blender/editors/curve/curve_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_CURVE_INTERN_H -#define ED_CURVE_INTERN_H +#ifndef __CURVE_INTERN_H__ +#define __CURVE_INTERN_H__ /* internal exports only */ struct wmOperatorType; diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 8000af54f53..b88723d8a3c 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -28,8 +28,8 @@ * \ingroup edgpencil */ -#ifndef ED_GPENCIL_INTERN_H -#define ED_GPENCIL_INTERN_H +#ifndef __GPENCIL_INTERN_H__ +#define __GPENCIL_INTERN_H__ /* internal exports only */ @@ -117,5 +117,5 @@ typedef enum ACTCONT_TYPES { -#endif /* ED_GPENCIL_INTERN_H */ +#endif /* __GPENCIL_INTERN_H__ */ diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h index 940a5866fcd..d34e6f74b4c 100644 --- a/source/blender/editors/include/BIF_gl.h +++ b/source/blender/editors/include/BIF_gl.h @@ -30,8 +30,8 @@ * \ingroup editorui */ -#ifndef BIF_GL_H -#define BIF_GL_H +#ifndef __BIF_GL_H__ +#define __BIF_GL_H__ #include "GL/glew.h" @@ -50,5 +50,5 @@ #define glMultMatrixf(x) glMultMatrixf( (float *)(x)) #define glLoadMatrixf(x) glLoadMatrixf( (float *)(x)) -#endif /* #ifdef BIF_GL_H */ +#endif /* #ifdef __BIF_GL_H__ */ diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 33e9192a23e..b1114eba141 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -27,8 +27,8 @@ * \ingroup editorui */ -#ifndef BIF_GLUTIL_H -#define BIF_GLUTIL_H +#ifndef __BIF_GLUTIL_H__ +#define __BIF_GLUTIL_H__ struct rcti; struct rctf; @@ -216,5 +216,5 @@ typedef struct bglMats { } bglMats; void bgl_get_mats(bglMats *mats); -#endif /* BIF_GLUTIL_H */ +#endif /* __BIF_GLUTIL_H__ */ diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 6b449f68e1d..c75ec259504 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_ANIM_API_H -#define ED_ANIM_API_H +#ifndef __ED_ANIM_API_H__ +#define __ED_ANIM_API_H__ struct ID; struct ListBase; @@ -605,5 +605,5 @@ void ED_operatormacros_action(void); /* ************************************************ */ -#endif /* ED_ANIM_API_H */ +#endif /* __ED_ANIM_API_H__ */ diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index d345f16b768..544250fcd2e 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_ARMATURE_H -#define ED_ARMATURE_H +#ifndef __ED_ARMATURE_H__ +#define __ED_ARMATURE_H__ #ifdef __cplusplus extern "C" { @@ -182,7 +182,7 @@ void mesh_deform_bind(struct Scene *scene, } #endif -#endif /* ED_ARMATURE_H */ +#endif /* __ED_ARMATURE_H__ */ diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h index 7d36159f47e..5e8ef618a42 100644 --- a/source/blender/editors/include/ED_clip.h +++ b/source/blender/editors/include/ED_clip.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_MOVIECLIP_H -#define ED_MOVIECLIP_H +#ifndef __ED_CLIP_H__ +#define __ED_CLIP_H__ struct ARegion; struct bContext; diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 7e7d60fdea8..700ff39fdba 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_CURVE_H -#define ED_CURVE_H +#ifndef __ED_CURVE_H__ +#define __ED_CURVE_H__ struct Base; struct bContext; @@ -95,5 +95,5 @@ int ED_curve_actSelection(struct Curve *cu, float center[3]); /* debug only */ void printknots(struct Object *obedit); -#endif /* ED_CURVE_H */ +#endif /* __ED_CURVE_H__ */ diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 2c4472c4636..9fe2fe685a0 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_DATAFILES_H -#define ED_DATAFILES_H +#ifndef __ED_DATAFILES_H__ +#define __ED_DATAFILES_H__ /* Datafiles embedded in Blender */ @@ -142,5 +142,5 @@ extern int datatoc_vertexdraw_png_size; extern char datatoc_vertexdraw_png[]; -#endif /* ED_DATAFILES_H */ +#endif /* __ED_DATAFILES_H__ */ diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index dc362f9f99b..7cf750f5a9b 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_FILES_H -#define ED_FILES_H +#ifndef __ED_FILESELECT_H__ +#define __ED_FILESELECT_H__ struct SpaceFile; struct ARegion; @@ -106,5 +106,5 @@ void ED_fileselect_exit(struct bContext *C, struct SpaceFile *sfile); int ED_file_extension_icon(const char *relname); -#endif /* ED_FILES_H */ +#endif /* __ED_FILESELECT_H__ */ diff --git a/source/blender/editors/include/ED_fluidsim.h b/source/blender/editors/include/ED_fluidsim.h index d47ba2bfba9..54acf73aacd 100644 --- a/source/blender/editors/include/ED_fluidsim.h +++ b/source/blender/editors/include/ED_fluidsim.h @@ -32,8 +32,8 @@ * \ingroup editors */ -#ifndef ED_FLUIDSIM_H -#define ED_FLUIDSIM_H +#ifndef __ED_FLUIDSIM_H__ +#define __ED_FLUIDSIM_H__ struct Object; struct FluidsimSettings; @@ -48,4 +48,4 @@ void fluidsimSettingsFree(struct FluidsimSettings* sb); /* duplicate internal data */ struct FluidsimSettings* fluidsimSettingsCopy(struct FluidsimSettings* sb); -#endif /* ED_FLUIDSIM_H */ +#endif /* __ED_FLUIDSIM_H__ */ diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index a640b5c911c..ce434493137 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_GPENCIL_H -#define ED_GPENCIL_H +#ifndef __ED_GPENCIL_H__ +#define __ED_GPENCIL_H__ struct ListBase; struct bContext; @@ -109,4 +109,4 @@ void mirror_gplayer_frames(struct bGPDlayer *gpl, short mode); int ED_gpencil_session_active(void); int ED_undo_gpencil_step(struct bContext *C, int step, const char *name); -#endif /* ED_GPENCIL_H */ +#endif /* __ED_GPENCIL_H__ */ diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 05cde05f25c..b95615ce365 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_IMAGE_H -#define ED_IMAGE_H +#ifndef __ED_IMAGE_H__ +#define __ED_IMAGE_H__ struct SpaceImage; struct Main; @@ -70,5 +70,5 @@ void ED_image_update_frame(const struct Main *mainp, int cfra); void ED_image_draw_info(struct ARegion *ar, int color_manage, int channels, int x, int y, const unsigned char cp[4], const float fp[4], int *zp, float *zpf); -#endif /* ED_IMAGE_H */ +#endif /* __ED_IMAGE_H__ */ diff --git a/source/blender/editors/include/ED_info.h b/source/blender/editors/include/ED_info.h index 7044ab63cad..6970abaa633 100644 --- a/source/blender/editors/include/ED_info.h +++ b/source/blender/editors/include/ED_info.h @@ -24,11 +24,11 @@ * \ingroup editors */ -#ifndef ED_INFO_H -#define ED_INFO_H +#ifndef __ED_INFO_H__ +#define __ED_INFO_H__ /* info_stats.c */ void ED_info_stats_clear(struct Scene *scene); const char *ED_info_stats_string(struct Scene *scene); -#endif /* ED_INFO_H */ +#endif /* __ED_INFO_H__ */ diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 91723a1a33f..7f68325e5ee 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -29,8 +29,8 @@ * \ingroup editors */ -#ifndef ED_KEYFRAMES_DRAW_H -#define ED_KEYFRAMES_DRAW_H +#ifndef __ED_KEYFRAMES_DRAW_H__ +#define __ED_KEYFRAMES_DRAW_H__ struct bAnimContext; struct AnimData; @@ -150,5 +150,5 @@ short compare_ab_cfraPtr(void *node, void *data); /* Checks if ActKeyBlock can be used (i.e. drawn/used to detect "holds") */ short actkeyblock_is_valid(ActKeyBlock *ab, struct DLRBT_Tree *keys); -#endif /* ED_KEYFRAMES_DRAW_H */ +#endif /* __ED_KEYFRAMES_DRAW_H__ */ diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 5881e8c4bfe..7ba37b49f85 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_KEYFRAMES_EDIT_H -#define ED_KEYFRAMES_EDIT_H +#ifndef __ED_KEYFRAMES_EDIT_H__ +#define __ED_KEYFRAMES_EDIT_H__ struct bAnimContext; struct bAnimListElem; @@ -254,4 +254,4 @@ short paste_animedit_keys(struct bAnimContext *ac, ListBase *anim_data, /* ************************************************ */ -#endif /* ED_KEYFRAMES_EDIT_H */ +#endif /* __ED_KEYFRAMES_EDIT_H__ */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index eda84d0e7a4..63c0511e6b3 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_KEYFRAMING_H -#define ED_KEYFRAMING_H +#ifndef __ED_KEYFRAMING_H__ +#define __ED_KEYFRAMING_H__ #ifdef __cplusplus extern "C" { @@ -330,4 +330,4 @@ int ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object } #endif -#endif /* ED_KEYFRAMING_H */ +#endif /* __ED_KEYFRAMING_H__ */ diff --git a/source/blender/editors/include/ED_logic.h b/source/blender/editors/include/ED_logic.h index ce1f2b8faac..71a5552ae26 100644 --- a/source/blender/editors/include/ED_logic.h +++ b/source/blender/editors/include/ED_logic.h @@ -27,10 +27,10 @@ * \ingroup editors */ -#ifndef ED_LOGIC_H -#define ED_LOGIC_H +#ifndef __ED_LOGIC_H__ +#define __ED_LOGIC_H__ /* logic_ops.c */ void ED_operatortypes_logic(void); -#endif /* ED_LOGIC_H */ +#endif /* __ED_LOGIC_H__ */ diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h index 30a0d47eda2..c0b5ba6ecf8 100644 --- a/source/blender/editors/include/ED_markers.h +++ b/source/blender/editors/include/ED_markers.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_MARKERS_H -#define ED_MARKERS_H +#ifndef __ED_MARKERS_H__ +#define __ED_MARKERS_H__ struct wmKeyConfig; struct wmKeyMap; @@ -77,5 +77,5 @@ void ED_marker_keymap_animedit_conflictfree(struct wmKeyMap *keymap); /* debugging only */ void debug_markers_print_list(struct ListBase *markers); -#endif /* ED_MARKERS_H */ +#endif /* __ED_MARKERS_H__ */ diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h index 259004864fb..89917f09284 100644 --- a/source/blender/editors/include/ED_mball.h +++ b/source/blender/editors/include/ED_mball.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef _ED_MBALL_H_ -#define _ED_MBALL_H_ +#ifndef __ED_MBALL_H__ +#define __ED_MBALL_H__ struct bContext; struct Object; diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 50fbf6fbb15..5e64925baca 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_MESH_H -#define ED_MESH_H +#ifndef __ED_MESH_H__ +#define __ED_MESH_H__ #ifdef __cplusplus extern "C" { @@ -342,4 +342,4 @@ void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store); } #endif -#endif /* ED_MESH_H */ +#endif /* __ED_MESH_H__ */ diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 18bb4975da9..192236b7cb8 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_NODE_H -#define ED_NODE_H +#ifndef __ED_NODE_H__ +#define __ED_NODE_H__ struct ID; struct Main; @@ -63,5 +63,5 @@ void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNod /* node ops.c */ void ED_operatormacros_node(void); -#endif /* ED_NODE_H */ +#endif /* __ED_NODE_H__ */ diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h index e2387c3e9dd..f103b07d09c 100644 --- a/source/blender/editors/include/ED_numinput.h +++ b/source/blender/editors/include/ED_numinput.h @@ -24,8 +24,8 @@ * \ingroup editors */ -#ifndef ED_NUMINPUT_H -#define ED_NUMINPUT_H +#ifndef __ED_NUMINPUT_H__ +#define __ED_NUMINPUT_H__ typedef struct NumInput { diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index c996fefe575..3e78a5649e5 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_OBJECT_H -#define ED_OBJECT_H +#ifndef __ED_OBJECT_H__ +#define __ED_OBJECT_H__ #ifdef __cplusplus extern "C" { @@ -178,5 +178,5 @@ int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struc } #endif -#endif /* ED_OBJECT_H */ +#endif /* __ED_OBJECT_H__ */ diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index 3035aa44735..1c7f5cf0641 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -30,8 +30,8 @@ * \ingroup editors */ -#ifndef ED_PARTICLE_H -#define ED_PARTICLE_H +#ifndef __ED_PARTICLE_H__ +#define __ED_PARTICLE_H__ struct bContext; struct Object; @@ -74,5 +74,5 @@ int PE_undo_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); -#endif /* ED_PARTICLE_H */ +#endif /* __ED_PARTICLE_H__ */ diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h index eadd1566671..6c885b9336f 100644 --- a/source/blender/editors/include/ED_physics.h +++ b/source/blender/editors/include/ED_physics.h @@ -30,8 +30,8 @@ * \ingroup editors */ -#ifndef ED_PHYSICS_H -#define ED_PHYSICS_H +#ifndef __ED_PHYSICS_H__ +#define __ED_PHYSICS_H__ struct wmKeyConfig; @@ -44,5 +44,5 @@ int PE_poll_view3d(struct bContext *C); void ED_operatortypes_physics(void); void ED_keymap_physics(struct wmKeyConfig *keyconf); -#endif /* ED_PHYSICS_H */ +#endif /* __ED_PHYSICS_H__ */ diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 73776f7234b..c9e00b0296a 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -25,8 +25,8 @@ * \ingroup editors */ -#ifndef ED_RENDER_H -#define ED_RENDER_H +#ifndef __ED_RENDER_H__ +#define __ED_RENDER_H__ #include "DNA_vec_types.h" diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index e0ff5cddf85..252eb790b2a 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_SCREEN_H -#define ED_SCREEN_H +#ifndef __ED_SCREEN_H__ +#define __ED_SCREEN_H__ #include "DNA_screen_types.h" #include "DNA_space_types.h" @@ -181,5 +181,5 @@ int ED_operator_posemode(struct bContext *C); #define ED_KEYMAP_GPENCIL 32 #define ED_KEYMAP_HEADER 64 -#endif /* ED_SCREEN_H */ +#endif /* __ED_SCREEN_H__ */ diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 544d366c926..51699d095ae 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_SCREEN_TYPES_H__ -#define ED_SCREEN_TYPES_H__ +#ifndef __ED_SCREEN_TYPES_H__ +#define __ED_SCREEN_TYPES_H__ /* ----------------------------------------------------- */ @@ -100,4 +100,4 @@ typedef struct AZone { #define AZONE_AREA 1 #define AZONE_REGION 2 -#endif /* ED_SCREEN_TYPES_H__ */ +#endif /* __ED_SCREEN_TYPES_H__ */ diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index bd746e36ef4..9cb32c31f5b 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_SCULPT_H -#define ED_SCULPT_H +#ifndef __ED_SCULPT_H__ +#define __ED_SCULPT_H__ struct ARegion; struct bContext; diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h index da2fce2596b..abeb00c301f 100644 --- a/source/blender/editors/include/ED_sequencer.h +++ b/source/blender/editors/include/ED_sequencer.h @@ -24,9 +24,9 @@ * \ingroup editors */ -#ifndef ED_SEQUENCER_H -#define ED_SEQUENCER_H +#ifndef __ED_SEQUENCER_H__ +#define __ED_SEQUENCER_H__ #define SEQ_ZOOM_FAC(szoom) ((szoom) > 0.0f)? (szoom) : ((szoom) == 0.0f)? (1.0f) : (-1.0f/(szoom)) -#endif /* ED_SEQUENCER_H */ +#endif /* __ED_SEQUENCER_H__ */ diff --git a/source/blender/editors/include/ED_sound.h b/source/blender/editors/include/ED_sound.h index a4e90094e19..d3e7502bb99 100644 --- a/source/blender/editors/include/ED_sound.h +++ b/source/blender/editors/include/ED_sound.h @@ -28,10 +28,10 @@ * \ingroup editors */ -#ifndef ED_SOUND_H -#define ED_SOUND_H +#ifndef __ED_SOUND_H__ +#define __ED_SOUND_H__ void ED_operatortypes_sound(void); -#endif /* ED_SOUND_H */ +#endif /* __ED_SOUND_H__ */ diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index b5a1ca193db..0d6e640c7bf 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_SPACE_API_H -#define ED_SPACE_API_H +#ifndef __ED_SPACE_API_H__ +#define __ED_SPACE_API_H__ struct ARegionType; struct bContext; @@ -73,5 +73,5 @@ void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int); void ED_region_draw_cb_exit(struct ARegionType *, void *); void *ED_region_draw_cb_customdata(void *handle); -#endif /* ED_SPACE_API_H */ +#endif /* __ED_SPACE_API_H__ */ diff --git a/source/blender/editors/include/ED_text.h b/source/blender/editors/include/ED_text.h index da01e25f4d9..9a36cb3d6ab 100644 --- a/source/blender/editors/include/ED_text.h +++ b/source/blender/editors/include/ED_text.h @@ -27,12 +27,12 @@ * \ingroup editors */ -#ifndef ED_TEXT_H -#define ED_TEXT_H +#ifndef __ED_TEXT_H__ +#define __ED_TEXT_H__ struct bContext; void ED_text_undo_step(struct bContext *C, int step); -#endif /* ED_TEXT_H */ +#endif /* __ED_TEXT_H__ */ diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 2ca3e2bfe7f..36bda11b1d4 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -29,8 +29,8 @@ * \ingroup editors */ -#ifndef ED_TRANSFORM_H -#define ED_TRANSFORM_H +#ifndef __ED_TRANSFORM_H__ +#define __ED_TRANSFORM_H__ /* ******************* Registration Function ********************** */ diff --git a/source/blender/editors/include/ED_types.h b/source/blender/editors/include/ED_types.h index 6ea45c995c9..c4104472a82 100644 --- a/source/blender/editors/include/ED_types.h +++ b/source/blender/editors/include/ED_types.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_TYPES_H -#define ED_TYPES_H +#ifndef __ED_TYPES_H__ +#define __ED_TYPES_H__ /* **************** GENERAL EDITOR-WIDE TYPES AND DEFINES ************************** */ @@ -44,5 +44,5 @@ -#endif /* ED_TYPES_H */ +#endif /* __ED_TYPES_H__ */ diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index db7b736e3eb..9bde252e776 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_UTIL_H -#define ED_UTIL_H +#ifndef __ED_UTIL_H__ +#define __ED_UTIL_H__ struct Scene; struct Object; @@ -93,5 +93,5 @@ int GetButStringLength(const char *str); /* where else to go ? */ void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf); -#endif /* ED_UTIL_H */ +#endif /* __ED_UTIL_H__ */ diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index c19872213ca..6c74eea3a5e 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_UVEDIT_H -#define ED_UVEDIT_H +#ifndef __ED_UVEDIT_H__ +#define __ED_UVEDIT_H__ struct ARegionType; struct EditFace; @@ -89,5 +89,5 @@ void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene /* uvedit_buttons.c */ void ED_uvedit_buttons_register(struct ARegionType *art); -#endif /* ED_UVEDIT_H */ +#endif /* __ED_UVEDIT_H__ */ diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 78de1809f69..2d4e267ba80 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_VIEW3D_H -#define ED_VIEW3D_H +#ifndef __ED_VIEW3D_H__ +#define __ED_VIEW3D_H__ /* ********* exports for space_view3d/ module ********** */ struct ARegion; @@ -312,4 +312,4 @@ void ED_view3d_operator_properties_viewmat(struct wmOperatorType *ot); void ED_view3d_operator_properties_viewmat_set(struct bContext *C, struct wmOperator *op); void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, int *winy, float persmat[4][4]); -#endif /* ED_VIEW3D_H */ +#endif /* __ED_VIEW3D_H__ */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index f102ecb0d08..f35af356c94 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -29,8 +29,8 @@ */ /* Note: this is included twice with different #defines for DEF_ICON - once from UI_resources.h for the internal icon enum and - once for interface_api.c for the definition of the RNA enum for the icons */ + * once from UI_resources.h for the internal icon enum and + * once for interface_api.c for the definition of the RNA enum for the icons */ /* ICON_ prefix added */ DEF_ICON(NONE) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 3f907004931..5eafdc27e68 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -29,8 +29,8 @@ * \ingroup editorui */ -#ifndef UI_INTERFACE_H -#define UI_INTERFACE_H +#ifndef __UI_INTERFACE_H__ +#define __UI_INTERFACE_H__ #include "BLO_sys_types.h" /* size_t */ #include "RNA_types.h" @@ -838,5 +838,5 @@ void UI_template_fix_linking(void); int UI_editsource_enable_check(void); void UI_editsource_active_but_test(uiBut *but); -#endif /* UI_INTERFACE_H */ +#endif /* __UI_INTERFACE_H__ */ diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index e5ad51169a8..a1b42ac39c2 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -29,8 +29,8 @@ * \ingroup editorui */ -#ifndef UI_INTERFACE_ICONS_H -#define UI_INTERFACE_ICONS_H +#ifndef __UI_INTERFACE_ICONS_H__ +#define __UI_INTERFACE_ICONS_H__ struct Image; struct ImBuf; @@ -75,4 +75,4 @@ struct ListBase *UI_iconfile_list(void); int UI_iconfile_get_index(const char *filename); -#endif /* UI_INTERFACE_ICONS_H */ +#endif /* __UI_INTERFACE_ICONS_H__ */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index d755b17bc98..f676dcbdff2 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -30,8 +30,8 @@ * \ingroup editorui */ -#ifndef UI_RESOURCES_H -#define UI_RESOURCES_H +#ifndef __UI_RESOURCES_H__ +#define __UI_RESOURCES_H__ /* elubie: TODO: move the typedef for icons to UI_interface_icons.h */ /* and add/replace include of UI_resources.h by UI_interface_icons.h */ diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 7ff27a5bbde..436f268d1bf 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -31,8 +31,8 @@ * \ingroup editorui */ -#ifndef UI_VIEW2D_H -#define UI_VIEW2D_H +#ifndef __UI_VIEW2D_H__ +#define __UI_VIEW2D_H__ /* ------------------------------------------ */ /* Settings and Defines: */ @@ -201,5 +201,5 @@ void UI_view2d_text_cache_draw(struct ARegion *ar); void UI_view2d_operatortypes(void); void UI_view2d_keymap(struct wmKeyConfig *keyconf); -#endif /* UI_VIEW2D_H */ +#endif /* __UI_VIEW2D_H__ */ diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 3feda5d4db4..7c2d411e076 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1013,21 +1013,26 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al } } +static void ui_id_preview_image_render_size(bContext *C, ID *id, PreviewImage *pi, int size) +{ + if ((pi->changed[size] ||!pi->rect[size])) /* changed only ever set by dynamic icons */ + { + /* create the rect if necessary */ + icon_set_image(C, id, pi, size); + + pi->changed[size] = 0; + } +} + static void ui_id_icon_render(bContext *C, ID *id, int big) { - PreviewImage *pi = BKE_previewimg_get(id); - - if (pi) { - if ((pi->changed[0] ||!pi->rect[0])) /* changed only ever set by dynamic icons */ - { - /* create the rect if necessary */ - - icon_set_image(C, id, pi, ICON_SIZE_ICON); /* icon size */ - if (big) - icon_set_image(C, id, pi, ICON_SIZE_PREVIEW); /* bigger preview size */ - - pi->changed[0] = 0; - } + PreviewImage *pi = BKE_previewimg_get(id); + + if (pi) { + if (big) + ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_PREVIEW); /* bigger preview size */ + else + ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_ICON); /* icon size */ } } diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 2d8de475c4b..d324018e4ba 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -30,8 +30,8 @@ */ -#ifndef INTERFACE_H -#define INTERFACE_H +#ifndef __INTERFACE_INTERN_H__ +#define __INTERFACE_INTERN_H__ #include "UI_resources.h" #include "RNA_types.h" diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 429cd658dea..b3b187f92a2 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1281,7 +1281,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s BLI_strncpy(name_ui, id->name+2, sizeof(name_ui)); #endif name= BLI_strdup(name_ui); - iconid= ui_id_icon_get((bContext*)C, id, 1); + iconid= ui_id_icon_get((bContext*)C, id, 0); } else { name= RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); /* could use the string length here */ diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 55e89ea4428..0b10ab1c92f 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -96,6 +96,7 @@ typedef struct TemplateID { ListBase *idlb; int prv_rows, prv_cols; + int preview; } TemplateID; /* Search browse menu, assign */ @@ -143,7 +144,7 @@ static void id_search_cb(const bContext *C, void *arg_template, const char *str, char name_ui[MAX_ID_NAME]; name_uiprefix_id(name_ui, id); - iconid= ui_id_icon_get((bContext*)C, id, 1); + iconid= ui_id_icon_get((bContext*)C, id, template->preview); if(!uiSearchItemAdd(items, name_ui, id, iconid)) break; @@ -370,6 +371,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str uiButSetFlag(but, UI_BUT_DISABLED); uiLayoutRow(layout, 1); + template->preview= 1; } else if(flag & UI_ID_BROWSE) { but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 7334acfdfb0..ec92b78c2c4 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -32,8 +32,8 @@ /* Internal for editmesh_xxxx.c functions */ -#ifndef MESH_INTERN_H -#define MESH_INTERN_H +#ifndef __MESH_INTERN_H__ +#define __MESH_INTERN_H__ struct bContext; struct wmOperatorType; @@ -313,5 +313,5 @@ void MESH_OT_navmesh_face_add(struct wmOperatorType *ot); void MESH_OT_navmesh_reset(struct wmOperatorType *ot); void MESH_OT_navmesh_clear(struct wmOperatorType *ot); -#endif // MESH_INTERN_H +#endif // __MESH_INTERN_H__ diff --git a/source/blender/editors/metaball/mball_intern.h b/source/blender/editors/metaball/mball_intern.h index 1cb4c19fc72..0329f8e5bfa 100644 --- a/source/blender/editors/metaball/mball_intern.h +++ b/source/blender/editors/metaball/mball_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_MBALL_INTERN_H -#define ED_MBALL_INTERN_H +#ifndef __MBALL_INTERN_H__ +#define __MBALL_INTERN_H__ #include "DNA_object_types.h" diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index f8b6d89d397..526706b566d 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -28,8 +28,8 @@ * \ingroup edobj */ -#ifndef ED_OBJECT_INTERN_H -#define ED_OBJECT_INTERN_H +#ifndef __OBJECT_INTERN_H__ +#define __OBJECT_INTERN_H__ struct wmOperatorType; struct KeyBlock; @@ -226,5 +226,5 @@ void OBJECT_OT_group_remove(struct wmOperatorType *ot); /* object_bake.c */ void OBJECT_OT_bake_image(wmOperatorType *ot); -#endif /* ED_OBJECT_INTERN_H */ +#endif /* __OBJECT_INTERN_H__ */ diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index db6d63f6396..75779cf6102 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -30,8 +30,8 @@ */ -#ifndef ED_PHYSICS_INTERN_H -#define ED_PHYSICS_INTERN_H +#ifndef __PHYSICS_INTERN_H__ +#define __PHYSICS_INTERN_H__ struct wmOperatorType; @@ -105,5 +105,5 @@ void PTCACHE_OT_bake_from_cache(struct wmOperatorType *ot); void PTCACHE_OT_add(struct wmOperatorType *ot); void PTCACHE_OT_remove(struct wmOperatorType *ot); -#endif /* ED_PHYSICS_INTERN_H */ +#endif /* __PHYSICS_INTERN_H__ */ diff --git a/source/blender/editors/render/render_intern.h b/source/blender/editors/render/render_intern.h index 08001688e3f..18ba2b5abf9 100644 --- a/source/blender/editors/render/render_intern.h +++ b/source/blender/editors/render/render_intern.h @@ -29,8 +29,8 @@ */ -#ifndef RENDER_INTERN_H -#define RENDER_INTERN_H +#ifndef __RENDER_INTERN_H__ +#define __RENDER_INTERN_H__ struct wmOperatorType; struct RenderResult; @@ -77,5 +77,5 @@ void RENDER_OT_view_cancel(struct wmOperatorType *ot); /* render_opengl.c */ void RENDER_OT_opengl(struct wmOperatorType *ot); -#endif /* RENDER_INTERN_H */ +#endif /* __RENDER_INTERN_H__ */ diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 3e34a55a3d9..3eda30e1554 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -164,6 +164,19 @@ typedef struct ShaderPreview { } ShaderPreview; +typedef struct IconPreviewSize { + struct IconPreviewSize *next, *prev; + int sizex, sizey; + unsigned int *rect; +} IconPreviewSize; + +typedef struct IconPreview { + Scene *scene; + void *owner; + ID *id; + ListBase sizes; +} IconPreview; + /* *************************** Preview for buttons *********************** */ static Main *pr_main= NULL; @@ -944,38 +957,96 @@ static void common_preview_startjob(void *customdata, short *stop, short *do_upd shader_preview_startjob(customdata, stop, do_update); } -static void common_preview_endjob(void *customdata) +/* exported functions */ + +static void icon_preview_add_size(IconPreview *ip, unsigned int *rect, int sizex, int sizey) { - ShaderPreview *sp= customdata; + IconPreviewSize *cur_size = ip->sizes.first, *new_size; - if(sp->id && GS(sp->id->name) == ID_BR) - WM_main_add_notifier(NC_BRUSH|NA_EDITED, sp->id); + while (cur_size) { + if (cur_size->sizex == sizex && cur_size->sizey == sizey) { + /* requested size is already in list, no need to add it again */ + return; + } + + cur_size = cur_size->next; + } + + new_size = MEM_callocN(sizeof(IconPreviewSize), "IconPreviewSize"); + new_size->sizex = sizex; + new_size->sizey = sizey; + new_size->rect = rect; + + BLI_addtail(&ip->sizes, new_size); } -/* exported functions */ +static void icon_preview_startjob_all_sizes(void *customdata, short *stop, short *do_update, float *progress) +{ + IconPreview *ip = (IconPreview *)customdata; + IconPreviewSize *cur_size = ip->sizes.first; + + while (cur_size) { + ShaderPreview sp; + + memset(&sp, 0, sizeof(ShaderPreview)); + + /* construct shader preview from image size and previewcustomdata */ + sp.scene= ip->scene; + sp.owner= ip->owner; + sp.sizex= cur_size->sizex; + sp.sizey= cur_size->sizey; + sp.pr_method= PR_ICON_RENDER; + sp.pr_rect= cur_size->rect; + sp.id = ip->id; + + common_preview_startjob(&sp, stop, do_update, progress); + + cur_size = cur_size->next; + } +} + +static void icon_preview_endjob(void *customdata) +{ + IconPreview *ip = customdata; + + if (ip->id && GS(ip->id->name) == ID_BR) + WM_main_add_notifier(NC_BRUSH|NA_EDITED, ip->id); +} + +static void icon_preview_free(void *customdata) +{ + IconPreview *ip = (IconPreview *)customdata; + + BLI_freelistN(&ip->sizes); + MEM_freeN(ip); +} void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *rect, int sizex, int sizey) { wmJob *steve; - ShaderPreview *sp; + IconPreview *ip, *old_ip; /* suspended start means it starts after 1 timer step, see WM_jobs_timer below */ steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, "Icon Preview", WM_JOB_EXCL_RENDER|WM_JOB_SUSPEND); - sp= MEM_callocN(sizeof(ShaderPreview), "shader preview"); + + ip= MEM_callocN(sizeof(IconPreview), "icon preview"); + + /* render all resolutions from suspended job too */ + old_ip= WM_jobs_get_customdata(steve); + if (old_ip) + BLI_movelisttolist(&ip->sizes, &old_ip->sizes); /* customdata for preview thread */ - sp->scene= CTX_data_scene(C); - sp->owner= id; - sp->sizex= sizex; - sp->sizey= sizey; - sp->pr_method= PR_ICON_RENDER; - sp->pr_rect= rect; - sp->id = id; + ip->scene= CTX_data_scene(C); + ip->owner= id; + ip->id= id; + + icon_preview_add_size(ip, rect, sizex, sizey); /* setup job */ - WM_jobs_customdata(steve, sp, shader_preview_free); + WM_jobs_customdata(steve, ip, icon_preview_free); WM_jobs_timer(steve, 0.25, NC_MATERIAL, NC_MATERIAL); - WM_jobs_callbacks(steve, common_preview_startjob, NULL, NULL, common_preview_endjob); + WM_jobs_callbacks(steve, icon_preview_startjob_all_sizes, NULL, NULL, icon_preview_endjob); WM_jobs_start(CTX_wm_manager(C), steve); } diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index b882a0881a1..90533fd3a12 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -28,8 +28,8 @@ * \ingroup edscr */ -#ifndef ED_SCREEN_INTERN_H -#define ED_SCREEN_INTERN_H +#ifndef __SCREEN_INTERN_H__ +#define __SCREEN_INTERN_H__ /* internal exports only */ struct wmWindow; @@ -65,7 +65,7 @@ extern const char *screen_context_dir[]; /* doc access */ void SCREEN_OT_screenshot(struct wmOperatorType *ot); void SCREEN_OT_screencast(struct wmOperatorType *ot); -#endif /* ED_SCREEN_INTERN_H */ +#endif /* __SCREEN_INTERN_H__ */ diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index 73dc1e236f6..b4315c2847d 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_PAINT_INTERN_H -#define ED_PAINT_INTERN_H +#ifndef __PAINT_INTERN_H__ +#define __PAINT_INTERN_H__ struct ARegion; struct bContext; @@ -168,5 +168,5 @@ struct ListBase *undo_paint_push_get_list(int type); void undo_paint_push_count_alloc(int type, int size); void undo_paint_push_end(int type); -#endif /* ED_PAINT_INTERN_H */ +#endif /* __PAINT_INTERN_H__ */ diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 5c739f043fe..94ec0d17bb9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -30,8 +30,8 @@ */ -#ifndef BDR_SCULPTMODE_H -#define BDR_SCULPTMODE_H +#ifndef __SCULPT_INTERN_H__ +#define __SCULPT_INTERN_H__ #include "DNA_listBase.h" #include "DNA_vec_types.h" diff --git a/source/blender/editors/sound/sound_intern.h b/source/blender/editors/sound/sound_intern.h index 91c1b5d1456..e8a8ec55ab5 100644 --- a/source/blender/editors/sound/sound_intern.h +++ b/source/blender/editors/sound/sound_intern.h @@ -29,10 +29,10 @@ */ -#ifndef ED_SOUND_INTERN_H -#define ED_SOUND_INTERN_H +#ifndef __SOUND_INTERN_H__ +#define __SOUND_INTERN_H__ struct wmOperatorType; -#endif /* ED_SOUND_INTERN_H */ +#endif /* __SOUND_INTERN_H__ */ diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index 2a23f105737..751a809cac6 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -28,8 +28,8 @@ * \ingroup spaction */ -#ifndef ED_ACTION_INTERN_H -#define ED_ACTION_INTERN_H +#ifndef __ACTION_INTERN_H__ +#define __ACTION_INTERN_H__ struct bContext; struct bAnimContext; @@ -135,5 +135,5 @@ enum { void action_operatortypes(void); void action_keymap(struct wmKeyConfig *keyconf); -#endif /* ED_ACTION_INTERN_H */ +#endif /* __ACTION_INTERN_H__ */ diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index aa692a940d8..8d0f84cf70f 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -28,8 +28,8 @@ * \ingroup spbuttons */ -#ifndef ED_BUTTONS_INTERN_H -#define ED_BUTTONS_INTERN_H +#ifndef __BUTTONS_INTERN_H__ +#define __BUTTONS_INTERN_H__ #include "DNA_listBase.h" #include "RNA_types.h" @@ -117,5 +117,5 @@ void BUTTONS_OT_file_browse(struct wmOperatorType *ot); void BUTTONS_OT_directory_browse(struct wmOperatorType *ot); void BUTTONS_OT_toolbox(struct wmOperatorType *ot); -#endif /* ED_BUTTONS_INTERN_H */ +#endif /* __BUTTONS_INTERN_H__ */ diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 9ff58a73ca2..c0b7137b5d8 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -29,8 +29,8 @@ * \ingroup spclip */ -#ifndef ED_CLIP_INTERN_H -#define ED_CLIP_INTERN_H +#ifndef __CLIP_INTERN_H__ +#define __CLIP_INTERN_H__ struct bContext; struct ARegion; @@ -152,4 +152,4 @@ void CLIP_OT_tracking_object_remove(struct wmOperatorType *ot); void CLIP_OT_copy_tracks(struct wmOperatorType *ot); void CLIP_OT_paste_tracks(struct wmOperatorType *ot); -#endif /* ED_CLIP_INTERN_H */ +#endif /* __CLIP_INTERN_H__ */ diff --git a/source/blender/editors/space_console/console_intern.h b/source/blender/editors/space_console/console_intern.h index 1c7aef01450..ce5c5f81f63 100644 --- a/source/blender/editors/space_console/console_intern.h +++ b/source/blender/editors/space_console/console_intern.h @@ -24,8 +24,8 @@ * \ingroup spconsole */ -#ifndef ED_CONSOLE_INTERN_H -#define ED_CONSOLE_INTERN_H +#ifndef __CONSOLE_INTERN_H__ +#define __CONSOLE_INTERN_H__ /* internal exports only */ @@ -69,4 +69,4 @@ void CONSOLE_OT_select_set(struct wmOperatorType *ot); enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD }; enum { DEL_ALL, DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_SELECTION, DEL_NEXT_SEL, DEL_PREV_SEL }; -#endif /* ED_CONSOLE_INTERN_H */ +#endif /* __CONSOLE_INTERN_H__ */ diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index d9de804404e..e2c0591f901 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -28,8 +28,8 @@ * \ingroup spfile */ -#ifndef ED_FILE_INTERN_H -#define ED_FILE_INTERN_H +#ifndef __FILE_INTERN_H__ +#define __FILE_INTERN_H__ /* internal exports only */ @@ -112,5 +112,5 @@ void autocomplete_file(struct bContext *C, char *str, void *arg_v); /* file_panels.c */ void file_panels_register(struct ARegionType *art); -#endif /* ED_FILE_INTERN_H */ +#endif /* __FILE_INTERN_H__ */ diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h index 0a8824e473d..fac6a387b9f 100644 --- a/source/blender/editors/space_file/filelist.h +++ b/source/blender/editors/space_file/filelist.h @@ -30,8 +30,8 @@ */ -#ifndef FILELIST_H -#define FILELIST_H +#ifndef __FILELIST_H__ +#define __FILELIST_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/editors/space_file/fsmenu.h b/source/blender/editors/space_file/fsmenu.h index 5947db073f6..0d046fd985d 100644 --- a/source/blender/editors/space_file/fsmenu.h +++ b/source/blender/editors/space_file/fsmenu.h @@ -31,8 +31,8 @@ */ -#ifndef BSE_FSMENU_H -#define BSE_FSMENU_H +#ifndef __FSMENU_H__ +#define __FSMENU_H__ /* XXX could become UserPref */ #define FSMENU_RECENT_MAX 10 diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index bc4fa398221..363ec407f71 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -28,8 +28,8 @@ * \ingroup spgraph */ -#ifndef ED_GRAPH_INTERN_H -#define ED_GRAPH_INTERN_H +#ifndef __GRAPH_INTERN_H__ +#define __GRAPH_INTERN_H__ struct bContext; struct wmWindowManager; @@ -173,5 +173,5 @@ void graphedit_keymap(struct wmKeyConfig *keyconf); void graphedit_operatortypes(void); -#endif /* ED_GRAPH_INTERN_H */ +#endif /* __GRAPH_INTERN_H__ */ diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index 29673f74538..71762a087a7 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_IMAGE_INTERN_H -#define ED_IMAGE_INTERN_H +#ifndef __IMAGE_INTERN_H__ +#define __IMAGE_INTERN_H__ /* internal exports only */ struct bContext; @@ -95,5 +95,5 @@ void image_buttons_register(struct ARegionType *art); void IMAGE_OT_properties(struct wmOperatorType *ot); void IMAGE_OT_scopes(struct wmOperatorType *ot); -#endif /* ED_IMAGE_INTERN_H */ +#endif /* __IMAGE_INTERN_H__ */ diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index b03ae1aecd6..dd988c94dc9 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -870,6 +870,12 @@ static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn) if(wmn->action==NA_EDITED) ED_region_tag_redraw(ar); break; + case NC_TEXTURE: + case NC_MATERIAL: + /* sending by texture render job and needed to properly update displaying + * brush texture icon */ + ED_region_tag_redraw(ar); + break; } } diff --git a/source/blender/editors/space_info/info_intern.h b/source/blender/editors/space_info/info_intern.h index fc0615a914b..80018e849d3 100644 --- a/source/blender/editors/space_info/info_intern.h +++ b/source/blender/editors/space_info/info_intern.h @@ -28,8 +28,8 @@ * \ingroup spinfo */ -#ifndef ED_INFO_INTERN_H -#define ED_INFO_INTERN_H +#ifndef __INFO_INTERN_H__ +#define __INFO_INTERN_H__ /* internal exports only */ @@ -61,4 +61,4 @@ void INFO_OT_report_replay(struct wmOperatorType *ot); void INFO_OT_report_delete(struct wmOperatorType *ot); void INFO_OT_report_copy(struct wmOperatorType *ot); -#endif /* ED_INFO_INTERN_H */ +#endif /* __INFO_INTERN_H__ */ diff --git a/source/blender/editors/space_logic/logic_intern.h b/source/blender/editors/space_logic/logic_intern.h index 457fe14352c..3e0b13e9d6c 100644 --- a/source/blender/editors/space_logic/logic_intern.h +++ b/source/blender/editors/space_logic/logic_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_LOGIC_INTERN_H -#define ED_LOGIC_INTERN_H +#ifndef __LOGIC_INTERN_H__ +#define __LOGIC_INTERN_H__ /* internal exports only */ struct bContext; @@ -56,5 +56,5 @@ void LOGIC_OT_links_cut(struct wmOperatorType *ot); void logic_buttons(struct bContext *C, struct ARegion *ar); void make_unique_prop_names(struct bContext *C, char *str); -#endif /* ED_LOGIC_INTERN_H */ +#endif /* __LOGIC_INTERN_H__ */ diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h index 00c16d68f36..9d0762ce108 100644 --- a/source/blender/editors/space_nla/nla_intern.h +++ b/source/blender/editors/space_nla/nla_intern.h @@ -28,8 +28,8 @@ * \ingroup spnla */ -#ifndef ED_NLA_INTERN_H -#define ED_NLA_INTERN_H +#ifndef __NLA_INTERN_H__ +#define __NLA_INTERN_H__ /* internal exports only */ @@ -140,5 +140,5 @@ short nlaedit_is_tweakmode_on(bAnimContext *ac); void nla_operatortypes(void); void nla_keymap(wmKeyConfig *keyconf); -#endif /* ED_NLA_INTERN_H */ +#endif /* __NLA_INTERN_H__ */ diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 186ad3768be..48501079e60 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -28,8 +28,8 @@ * \ingroup spnode */ -#ifndef ED_NODE_INTERN_H -#define ED_NODE_INTERN_H +#ifndef __NODE_INTERN_H__ +#define __NODE_INTERN_H__ #include <stddef.h> /* for size_t */ #include "UI_interface.h" @@ -190,4 +190,4 @@ enum { B_NODE_SETIMAGE, } eNodeSpace_ButEvents; -#endif /* ED_NODE_INTERN_H */ +#endif /* __NODE_INTERN_H__ */ diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index be33fc2e37a..8c53e9ad111 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_OUTLINER_INTERN_H -#define ED_OUTLINER_INTERN_H +#ifndef __OUTLINER_INTERN_H__ +#define __OUTLINER_INTERN_H__ #include "RNA_types.h" @@ -237,4 +237,4 @@ void OUTLINER_OT_action_set(struct wmOperatorType *ot); void outliner_operatortypes(void); void outliner_keymap(struct wmKeyConfig *keyconf); -#endif /* ED_OUTLINER_INTERN_H */ +#endif /* __OUTLINER_INTERN_H__ */ diff --git a/source/blender/editors/space_script/script_intern.h b/source/blender/editors/space_script/script_intern.h index 98e9699079b..00863863994 100644 --- a/source/blender/editors/space_script/script_intern.h +++ b/source/blender/editors/space_script/script_intern.h @@ -28,8 +28,8 @@ * \ingroup spscript */ -#ifndef ED_SCRIPT_INTERN_H -#define ED_SCRIPT_INTERN_H +#ifndef __SCRIPT_INTERN_H__ +#define __SCRIPT_INTERN_H__ /* internal exports only */ @@ -41,5 +41,5 @@ void script_keymap(struct wmKeyConfig *keyconf); void SCRIPT_OT_reload(struct wmOperatorType *ot); void SCRIPT_OT_python_file_run(struct wmOperatorType *ot); -#endif /* ED_SCRIPT_INTERN_H */ +#endif /* __SCRIPT_INTERN_H__ */ diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 812bdbc678f..91d4e490ddc 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -28,8 +28,8 @@ * \ingroup spseq */ -#ifndef ED_SEQUENCER_INTERN_H -#define ED_SEQUENCER_INTERN_H +#ifndef __SEQUENCER_INTERN_H__ +#define __SEQUENCER_INTERN_H__ #include "RNA_access.h" #include "DNA_sequence_types.h" @@ -176,5 +176,5 @@ struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf * ibuf); void SEQUENCER_OT_properties(struct wmOperatorType *ot); void sequencer_buttons_register(struct ARegionType *art); -#endif /* ED_SEQUENCER_INTERN_H */ +#endif /* __SEQUENCER_INTERN_H__ */ diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index 043fb97547b..2d297dd20d7 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -28,8 +28,8 @@ * \ingroup sptext */ -#ifndef ED_TEXT_INTERN_H -#define ED_TEXT_INTERN_H +#ifndef __TEXT_INTERN_H__ +#define __TEXT_INTERN_H__ /* internal exports only */ @@ -163,5 +163,5 @@ void TEXT_OT_resolve_conflict(struct wmOperatorType *ot); /* space_text.c */ extern const char *text_context_dir[]; /* doc access */ -#endif /* ED_TEXT_INTERN_H */ +#endif /* __TEXT_INTERN_H__ */ diff --git a/source/blender/editors/space_time/time_intern.h b/source/blender/editors/space_time/time_intern.h index a345d00bd74..ce52cbbd65e 100644 --- a/source/blender/editors/space_time/time_intern.h +++ b/source/blender/editors/space_time/time_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_TIME_INTERN_H -#define ED_TIME_INTERN_H +#ifndef __TIME_INTERN_H__ +#define __TIME_INTERN_H__ /* internal exports only */ @@ -40,5 +40,5 @@ struct wmWindowManager; void time_operatortypes(void); void time_keymap(struct wmKeyConfig *keyconf); -#endif /* ED_TIME_INTERN_H */ +#endif /* __TIME_INTERN_H__ */ diff --git a/source/blender/editors/space_userpref/userpref_intern.h b/source/blender/editors/space_userpref/userpref_intern.h index fc6d218b20c..03074290d13 100644 --- a/source/blender/editors/space_userpref/userpref_intern.h +++ b/source/blender/editors/space_userpref/userpref_intern.h @@ -28,10 +28,10 @@ * \ingroup spuserpref */ -#ifndef ED_USERPREF_INTERN_H -#define ED_USERPREF_INTERN_H +#ifndef __USERPREF_INTERN_H__ +#define __USERPREF_INTERN_H__ /* internal exports only */ -#endif /* ED_USERPREF_INTERN_H */ +#endif /* __USERPREF_INTERN_H__ */ diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 94ab847c91b..72a068af095 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -933,6 +933,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_TEXTURE: + case NC_MATERIAL: /* for brush textures */ ED_region_tag_redraw(ar); break; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 61f08a84ac7..0a942a42540 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -488,8 +488,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* mode */ if(ob) { v3d->modeselect = ob->mode; - is_paint = ELEM5(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, - OB_MODE_TEXTURE_PAINT, OB_MODE_PARTICLE_EDIT); + is_paint = ELEM4(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT,OB_MODE_TEXTURE_PAINT); } else { v3d->modeselect = OB_MODE_OBJECT; diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 07754c0883c..40037f82376 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -28,8 +28,8 @@ * \ingroup spview3d */ -#ifndef ED_VIEW3D_INTERN_H -#define ED_VIEW3D_INTERN_H +#ifndef __VIEW3D_INTERN_H__ +#define __VIEW3D_INTERN_H__ #include "ED_view3d.h" @@ -215,5 +215,5 @@ extern float view3d_camera_border_hack_col[4]; extern short view3d_camera_border_hack_test; #endif -#endif /* ED_VIEW3D_INTERN_H */ +#endif /* __VIEW3D_INTERN_H__ */ diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 090b12e401e..13f7d279da9 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -30,8 +30,8 @@ */ -#ifndef TRANSFORM_H -#define TRANSFORM_H +#ifndef __TRANSFORM_H__ +#define __TRANSFORM_H__ #include "ED_transform.h" #include "ED_numinput.h" diff --git a/source/blender/editors/util/util_intern.h b/source/blender/editors/util/util_intern.h index c6e2d079c28..d366ad7997f 100644 --- a/source/blender/editors/util/util_intern.h +++ b/source/blender/editors/util/util_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_UTIL_INTERN_H -#define ED_UTIL_INTERN_H +#ifndef __UTIL_INTERN_H__ +#define __UTIL_INTERN_H__ /* internal exports only */ @@ -42,5 +42,5 @@ void *undo_editmode_get_prev (struct Object *ob); void undo_editmode_step (struct bContext *C, int step); void undo_editmode_number (struct bContext *C, int nr); -#endif /* ED_UTIL_INTERN_H */ +#endif /* __UTIL_INTERN_H__ */ diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h index 6e399e81f0f..6566a79e467 100644 --- a/source/blender/editors/uvedit/uvedit_intern.h +++ b/source/blender/editors/uvedit/uvedit_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_UVEDIT_INTERN_H -#define ED_UVEDIT_INTERN_H +#ifndef __UVEDIT_INTERN_H__ +#define __UVEDIT_INTERN_H__ struct EditFace; struct EditMesh; @@ -118,5 +118,5 @@ void UV_OT_sphere_project(struct wmOperatorType *ot); void UV_OT_unwrap(struct wmOperatorType *ot); void UV_OT_stitch(struct wmOperatorType *ot); -#endif /* ED_UVEDIT_INTERN_H */ +#endif /* __UVEDIT_INTERN_H__ */ diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h index df2fbfa193e..5adb3074314 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.h +++ b/source/blender/editors/uvedit/uvedit_parametrizer.h @@ -2,8 +2,8 @@ * \ingroup eduv */ -#ifndef __PARAMETRIZER_H__ -#define __PARAMETRIZER_H__ +#ifndef __UVEDIT_PARAMETRIZER_H__ +#define __UVEDIT_PARAMETRIZER_H__ #ifdef __cplusplus extern "C" { @@ -98,5 +98,5 @@ void param_flush_restore(ParamHandle *handle); } #endif -#endif /*__PARAMETRIZER_H__*/ +#endif /*__UVEDIT_PARAMETRIZER_H__*/ |