From 51dcbdde033f6e8e55c4b1b4a47ca0624a6571ee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Nov 2010 09:45:45 +0000 Subject: use 'const char *' by default with RNA functions except when the value is flagged as PROP_THICK_WRAP. Also use const char in many other parts of blenders code. Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand. --- source/blender/editors/include/ED_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 7bf3ec88a4b..618353c100b 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -43,7 +43,7 @@ void ED_editors_exit (struct bContext *C); /* ************** Undo ************************ */ /* undo.c */ -void ED_undo_push (struct bContext *C, char *str); +void ED_undo_push (struct bContext *C, const char *str); void ED_undo_push_op (struct bContext *C, struct wmOperator *op); void ED_undo_pop_op (struct bContext *C, struct wmOperator *op); void ED_undo_pop (struct bContext *C); @@ -52,7 +52,7 @@ void ED_OT_undo (struct wmOperatorType *ot); void ED_OT_redo (struct wmOperatorType *ot); /* undo_editmode.c */ -void undo_editmode_push(struct bContext *C, char *name, +void undo_editmode_push(struct bContext *C, const char *name, void * (*getdata)(struct bContext *C), void (*freedata)(void *), void (*to_editmode)(void *, void *), -- cgit v1.2.3 From 263830f0004481cd4921f03f4242d7c80794b08d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 3 Dec 2010 17:05:21 +0000 Subject: Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,. Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into. --- source/blender/editors/include/ED_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 618353c100b..8d654e4eaa5 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -70,7 +70,7 @@ void undo_editmode_step (struct bContext *C, int step); /* ************** XXX OLD CRUFT WARNING ************* */ void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert); -int GetButStringLength(char *str); +int GetButStringLength(const char *str); #endif /* ED_UTIL_H */ -- cgit v1.2.3 From acd7b81c2d3fa7828d28c1562fad10663d911783 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 04:06:19 +0000 Subject: bugfix [#25230] Quick extrude Ctrl-LMB : wrong behaviour of 'RotateSource' option. Problem is is with operator redo which click-extrude exposed. Check if redo operator can run, otherwise lock the UI and add a label that the operator doesn't support redo. This is clunky but IMHO better then failing silently and leaving the user confused. - Merged redo functions into ED_undo_operator_repeat(), code was duplicated in a few places. - added WM_operator_repeat_check to check if WM_operator_repeat() can run, avoids an undo call when redo work. Unrelated changes - GHOST_SystemWin32.cpp set to utf8 encoding. - cmake_consistency_check.py now checks source files are utf8. --- source/blender/editors/include/ED_util.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 8d654e4eaa5..2936d63511c 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -51,6 +51,11 @@ void ED_undo_redo (struct bContext *C); void ED_OT_undo (struct wmOperatorType *ot); void ED_OT_redo (struct wmOperatorType *ot); +int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); + /* convenience since UI callbacks use this mostly*/ +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); + /* undo_editmode.c */ void undo_editmode_push(struct bContext *C, const char *name, void * (*getdata)(struct bContext *C), @@ -66,7 +71,6 @@ void undo_editmode_menu (struct bContext *C); void undo_editmode_clear (void); void undo_editmode_step (struct bContext *C, int step); - /* ************** XXX OLD CRUFT WARNING ************* */ void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert); -- cgit v1.2.3 From 604d029ddf164e87eb453d83c59e65c2f16f8879 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 12 Jan 2011 18:00:23 +0000 Subject: Bugfix #25570 The tool-redo depends on a working undo system, so it can rewind a step and then redo operator with new settings. When a user disables undo, this won't work. Now the properties for redo operator (toolbar, F6) will grey out when a redo isn't possible. --- source/blender/editors/include/ED_util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 2936d63511c..626ca4bd1e8 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -56,6 +56,8 @@ 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); + /* undo_editmode.c */ void undo_editmode_push(struct bContext *C, const char *name, void * (*getdata)(struct bContext *C), -- cgit v1.2.3 From 2761799c649e728f7ed219f57faa78210c1291ca Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 26 Jan 2011 14:18:16 +0000 Subject: Possible fix for issue #2 in [#25664] Remove Pack does not work in Texture panel - There were 2 pack menu's, merged into 1. - Don't attempt to unpack into // if the blend file isn't saved, would use the CWD instead. --- source/blender/editors/include/ED_util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 626ca4bd1e8..1cbf1d0e998 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -78,5 +78,8 @@ void undo_editmode_step (struct bContext *C, int step); void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert); 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 */ -- cgit v1.2.3 From d909e61d99d760e9c5ae0c9e29804ac609bf7b5f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 12 Feb 2011 17:51:02 +0000 Subject: Sculpting on deformed mesh ========================== Removed limitation of armatured-only objects for sculpting -- now all deformation modifiers are allowed in sculpt mode. Use crazyspace corrections like from transformation modules was used to support all deformation modifiers. Internal change: all crazyspace-related functions were noved to crazyspace.c P.S. Brush could make quite unexpected deformation for meshes which are deformed in specified way. Got patch for this and discussing with Brecht if it's really needed or maybe it could be done in better way. --- source/blender/editors/include/ED_util.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 1cbf1d0e998..473d889c731 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -28,12 +28,15 @@ #ifndef ED_UTIL_H #define ED_UTIL_H +struct Scene; struct Object; struct bContext; struct ARegion; struct uiBlock; struct wmOperator; struct wmOperatorType; +struct EditMesh; +struct Mesh; /* ed_util.c */ @@ -73,6 +76,15 @@ void undo_editmode_menu (struct bContext *C); void undo_editmode_clear (void); void undo_editmode_step (struct bContext *C, int step); +/* crazyspace.c */ +float *crazyspace_get_mapped_editverts(struct Scene *scene, struct Object *obedit); +void crazyspace_set_quats_editmesh(struct EditMesh *em, float *origcos, float *mappedcos, float *quats); +void crazyspace_set_quats_mesh(struct Mesh *me, float *origcos, float *mappedcos, float *quats); +int editmesh_get_first_deform_matrices(struct Scene *scene, struct Object *ob, struct EditMesh *em, float (**deformmats)[3][3], float (**deformcos)[3]); +int sculpt_get_first_deform_matrices(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]); +void crazyspace_build_sculpt(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]); + + /* ************** XXX OLD CRUFT WARNING ************* */ void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert); -- cgit v1.2.3 From 8172207d203ef909585c9e782ea34a52ab2cf1c1 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Mon, 21 Feb 2011 07:25:24 +0000 Subject: doxygen: editor entry --- source/blender/editors/include/ED_util.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 473d889c731..6943772e6ff 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,6 +25,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file ED_util.h + * \ingroup editors + */ + #ifndef ED_UTIL_H #define ED_UTIL_H -- cgit v1.2.3 From 36618a099673a4d6b8552a67d469a223153f55a1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 22 Feb 2011 02:42:19 +0000 Subject: operator ED_OT_undo_push, needed for editmode undo/redo glitch fix, (coming next). --- source/blender/editors/include/ED_util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/include/ED_util.h') diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 6943772e6ff..77b754519fb 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -57,6 +57,7 @@ void ED_undo_pop_op (struct bContext *C, struct wmOperator *op); void ED_undo_pop (struct bContext *C); void ED_undo_redo (struct bContext *C); void ED_OT_undo (struct wmOperatorType *ot); +void ED_OT_undo_push (struct wmOperatorType *ot); void ED_OT_redo (struct wmOperatorType *ot); int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); -- cgit v1.2.3