Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-25 00:19:04 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-25 00:19:04 +0400
commit55ab66b45582f4973a0ba13b2573c8d5f6990652 (patch)
tree86c24f0f6c0d8dd654f9c3532b9a20391177943f /source
parentf673fc92930836a4df2a3f3552e3a106ea966a02 (diff)
parentf1cea89d99f0c80bdccd2ba1359142b5ff14cdb9 (diff)
Cycles: svn merge -r41205:41225 ^/trunk/blender
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/intern/brush.c2
-rw-r--r--source/blender/blenlib/BLI_string_utf8.h1
-rw-r--r--source/blender/blenlib/intern/path_util.c15
-rw-r--r--source/blender/blenlib/intern/string_utf8.c12
-rw-r--r--source/blender/blenloader/intern/writefile.c1
-rw-r--r--source/blender/editors/animation/keyingsets.c9
-rw-r--r--source/blender/editors/armature/editarmature.c8
-rw-r--r--source/blender/editors/armature/poseUtils.c2
-rw-r--r--source/blender/editors/armature/poselib.c4
-rw-r--r--source/blender/editors/armature/poseobject.c4
-rw-r--r--source/blender/editors/include/ED_keyframing.h8
-rw-r--r--source/blender/editors/include/UI_interface.h5
-rw-r--r--source/blender/editors/interface/interface.c19
-rw-r--r--source/blender/editors/interface/interface_handlers.c43
-rw-r--r--source/blender/editors/interface/interface_intern.h5
-rw-r--r--source/blender/editors/interface/interface_ops.c241
-rw-r--r--source/blender/editors/object/object_transform.c6
-rw-r--r--source/blender/editors/render/render_preview.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c4
-rw-r--r--source/blender/editors/transform/transform_conversions.c16
-rw-r--r--source/blender/makesrna/intern/rna_wm.c37
-rw-r--r--source/blender/python/intern/bpy_interface.c7
-rw-r--r--source/blender/render/intern/source/rayshade.c2
-rw-r--r--source/blender/windowmanager/WM_types.h4
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c22
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c83
-rw-r--r--source/gameengine/Physics/common/PHY_IMotionState.h2
29 files changed, 403 insertions, 167 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 0cad398995a..f5684810e14 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -51,7 +51,7 @@ extern "C" {
/* used by packaging tools */
/* can be left blank, otherwise a,b,c... etc with no quotes */
-#define BLENDER_VERSION_CHAR
+#define BLENDER_VERSION_CHAR a
/* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE alpha
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index c84a3cfc730..4ab9d085de3 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -930,7 +930,7 @@ void brush_jitter_pos(Brush *brush, float pos[2], float jitterpos[2])
{
int use_jitter= brush->jitter != 0;
- /* jitter-ed brush gives wierd and unpredictable result for this
+ /* jitter-ed brush gives weird and unpredictable result for this
kinds of stroke, so manyally disable jitter usage (sergey) */
use_jitter&= (brush->flag & (BRUSH_RESTORE_MESH|BRUSH_ANCHORED)) == 0;
diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h
index 765ae93828e..bcb641d79d8 100644
--- a/source/blender/blenlib/BLI_string_utf8.h
+++ b/source/blender/blenlib/BLI_string_utf8.h
@@ -37,6 +37,7 @@ char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy);
int BLI_utf8_invalid_byte(const char *str, int length);
int BLI_utf8_invalid_strip(char *str, int length);
+int BLI_str_utf8_size(const char *p); /* warning, can return -1 on bad chars */
/* copied from glib */
unsigned int BLI_str_utf8_as_unicode(const char *p);
unsigned int BLI_str_utf8_as_unicode_and_size(const char *p, size_t *index);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index d9176c5f162..d28c1e29820 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1257,9 +1257,18 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir,
{
int sl;
- if (!string || !dir || !file) return; /* We don't want any NULLs */
-
- string[0]= 0; /* ton */
+ if (string) {
+ /* ensure this is always set even if dir/file are NULL */
+ string[0]= '\0';
+
+ if (ELEM(NULL, dir, file)) {
+ return; /* We don't want any NULLs */
+ }
+ }
+ else {
+ return; /* string is NULL, probably shouldnt happen but return anyway */
+ }
+
/* we first push all slashes into unix mode, just to make sure we don't get
any mess with slashes later on. -jesterKing */
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index b1ad04eb70d..b4c58d3bab4 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -312,6 +312,18 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
}
+/* uses glib functions but not from glib */
+/* gets the size of a single utf8 char */
+int BLI_str_utf8_size(const char *p)
+{
+ int mask = 0, len;
+ unsigned char c = (unsigned char) *p;
+
+ UTF8_COMPUTE (c, mask, len);
+
+ return len;
+}
+
/* was g_utf8_get_char */
/**
* BLI_str_utf8_as_unicode:
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 10cc5e85f9d..07ece571255 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2711,7 +2711,6 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
}
}
- userfilename[0]= '\0'; /* ensure its initialized */
BLI_make_file_string(G.main->name, userfilename, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_STARTUP_FILE);
write_user_block= (BLI_path_cmp(filepath, userfilename) == 0);
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 7c2f969e187..95324554a06 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -552,7 +552,12 @@ KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, const char name[
if (strcmp(name, ks->name) == 0)
return ks;
}
-
+
+ /* complain about missing keying sets on debug builds */
+#ifndef NDEBUG
+ printf("%s: '%s' not found\n", __func__, name);
+#endif
+
/* no matches found */
return NULL;
}
@@ -687,7 +692,7 @@ KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *tranformK
if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (scene->active_keyingset))
return ANIM_scene_get_active_keyingset(scene);
else if (IS_AUTOKEY_FLAG(scene, INSERTAVAIL))
- return ANIM_builtin_keyingset_get_named(NULL, "Available");
+ return ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_AVAILABLE_ID);
else
return ANIM_builtin_keyingset_get_named(NULL, tranformKSName);
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 11fd932eed6..15c8868f9b9 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -4948,7 +4948,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
static int pose_clear_scale_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_scale, "Scaling");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_scale, ANIM_KS_SCALING_ID);
}
void POSE_OT_scale_clear(wmOperatorType *ot)
@@ -4969,7 +4969,7 @@ void POSE_OT_scale_clear(wmOperatorType *ot)
static int pose_clear_rot_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_rot, "Rotation");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_rot, ANIM_KS_ROTATION_ID);
}
void POSE_OT_rot_clear(wmOperatorType *ot)
@@ -4990,7 +4990,7 @@ void POSE_OT_rot_clear(wmOperatorType *ot)
static int pose_clear_loc_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_loc, "Location");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_loc, ANIM_KS_LOCATION_ID);
}
void POSE_OT_loc_clear(wmOperatorType *ot)
@@ -5011,7 +5011,7 @@ void POSE_OT_loc_clear(wmOperatorType *ot)
static int pose_clear_transforms_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_transforms, "LocRotScale");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_transforms, ANIM_KS_LOC_ROT_SCALE_ID);
}
void POSE_OT_transforms_clear(wmOperatorType *ot)
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 4b22d76ad0b..5c98fdc08bd 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -223,7 +223,7 @@ void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListB
{
/* insert keyframes as necessary if autokeyframing */
if (autokeyframe_cfra_can_key(scene, &ob->id)) {
- KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Whole Character");
+ KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_WHOLE_CHARACTER_ID);
ListBase dsources = {NULL, NULL};
tPChanFCurveLink *pfl;
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 8e9f5c7543c..064defb1aef 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -433,7 +433,7 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
bAction *act = poselib_validate(ob);
bPose *pose= (ob) ? ob->pose : NULL;
TimeMarker *marker;
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Whole Character"); /* this includes custom props :)*/
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_ID); /* this includes custom props :)*/
int frame= RNA_int_get(op->ptr, "frame");
char name[64];
@@ -903,7 +903,7 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData
bAction *act= pld->act;
bActionGroup *agrp;
- KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Whole Character");
+ KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_WHOLE_CHARACTER_ID);
ListBase dsources = {NULL, NULL};
short autokey = autokeyframe_cfra_can_key(scene, &pld->ob->id);
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index a978f327993..beae9c12bfe 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -1151,7 +1151,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
int selOnly= RNA_boolean_get(op->ptr, "selected_mask");
/* get KeyingSet to use */
- KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "LocRotScale");
+ KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOC_ROT_SCALE_ID);
/* sanity checks */
if ELEM(NULL, ob, ob->pose)
@@ -2165,7 +2165,7 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
+ KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
/* loop through all selected pchans, flipping and keying (as needed) */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 8dd543d8f63..eda84d0e7a4 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -317,6 +317,14 @@ typedef enum eAnimFilterFlags {
int ED_autokeyframe_object(struct bContext *C, struct Scene *scene, struct Object *ob, struct KeyingSet *ks);
int ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, struct KeyingSet *ks);
+/* Names for builtin keying sets so we don't confuse these with labels/text,
+ * defined in python script: keyingsets_builtins.py */
+#define ANIM_KS_LOCATION_ID "Location"
+#define ANIM_KS_ROTATION_ID "Rotation"
+#define ANIM_KS_SCALING_ID "Scaling"
+#define ANIM_KS_LOC_ROT_SCALE_ID "LocRotScale"
+#define ANIM_KS_AVAILABLE_ID "Available"
+#define ANIM_KS_WHOLE_CHARACTER_ID "Whole Character"
#ifdef __cplusplus
}
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index c0fa8b7bebd..39847418ca6 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -797,6 +797,7 @@ void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propn
void UI_buttons_operatortypes(void);
/* Helpers for Operators */
+uiBut *uiContextActiveButton(const struct bContext *C);
void uiContextActiveProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
void uiContextActivePropertyHandle(struct bContext *C);
void uiContextAnimUpdate(const struct bContext *C);
@@ -827,5 +828,9 @@ const char *UI_translate_do_tooltip(const char *msgid);
#define IFACE_(msgid) UI_translate_do_iface(msgid)
#define TIP_(msgid) UI_translate_do_tooltip(msgid)
+/* UI_OT_editsource helpers */
+int UI_editsource_enable_check(void);
+void UI_editsource_active_but_test(uiBut *but);
+
#endif /* UI_INTERFACE_H */
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index b7b572e7217..f9991079507 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2562,23 +2562,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
if(block->curlayout)
ui_layout_add_but(block->curlayout, but);
-#ifdef WITH_PYTHON_UI_INFO
- {
- extern void PyC_FileAndNum_Safe(const char **filename, int *lineno);
-
- const char *fn;
- int lineno= -1;
- PyC_FileAndNum_Safe(&fn, &lineno);
- if (lineno != -1) {
- BLI_strncpy(but->py_dbg_fn, fn, sizeof(but->py_dbg_fn));
- but->py_dbg_ln= lineno;
- }
- else {
- but->py_dbg_fn[0]= '\0';
- but->py_dbg_ln= -1;
- }
+ /* if the 'UI_OT_editsource' is running, extract the source info from the button */
+ if (UI_editsource_enable_check()) {
+ UI_editsource_active_but_test(but);
}
-#endif /* WITH_PYTHON_UI_INFO */
return but;
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 32c4ec21e13..9f77317292c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1447,7 +1447,7 @@ static int ui_textedit_type_utf8(uiBut *but, uiHandleButtonData *data, const cha
len= strlen(str);
if(len-(but->selend - but->selsta)+1 <= data->maxlen) {
- int step= BLI_strnlen(utf8_buf, sizeof(utf8_buf));
+ int step= BLI_str_utf8_size(utf8_buf);
/* type over the current selection */
if ((but->selend - but->selsta) > 0) {
@@ -4443,16 +4443,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
}
-#ifdef WITH_PYTHON_UI_INFO
- if (but->py_dbg_ln != -1) {
- PointerRNA ptr_props;
-
- WM_operator_properties_create(&ptr_props, "WM_OT_text_edit");
- RNA_string_set(&ptr_props, "filepath", but->py_dbg_fn);
- RNA_int_set(&ptr_props, "line", but->py_dbg_ln);
- uiItemFullO(layout, "WM_OT_text_edit", "Edit Source", ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
- }
-#endif /* WITH_PYTHON_UI_INFO */
+ /* perhaps we should move this into (G.f & G_DEBUG) - campbell */
+ uiItemFullO(layout, "UI_OT_editsource", "Edit Source", ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0);
uiPupMenuEnd(C, pup);
@@ -5146,9 +5138,10 @@ void ui_button_active_free(const bContext *C, uiBut *but)
}
}
-static uiBut *ui_context_rna_button_active(const bContext *C)
+/* returns the active button with an optional checking function */
+static uiBut *ui_context_button_active(const bContext *C, int (*but_check_cb)(uiBut *))
{
- uiBut *rnabut= NULL;
+ uiBut *but_found= NULL;
ARegion *ar= CTX_wm_region(C);
@@ -5166,26 +5159,40 @@ static uiBut *ui_context_rna_button_active(const bContext *C)
}
}
- if(activebut && activebut->rnapoin.data) {
+ if(activebut && (but_check_cb == NULL || but_check_cb(activebut))) {
uiHandleButtonData *data= activebut->active;
- rnabut= activebut;
+ but_found= activebut;
/* recurse into opened menu, like colorpicker case */
if(data && data->menu && (ar != data->menu->region)) {
ar = data->menu->region;
}
else {
- return rnabut;
+ return but_found;
}
}
else {
/* no active button */
- return rnabut;
+ return but_found;
}
}
- return rnabut;
+ return but_found;
+}
+
+static int ui_context_rna_button_active_test(uiBut *but)
+{
+ return (but->rnapoin.data != NULL);
+}
+static uiBut *ui_context_rna_button_active(const bContext *C)
+{
+ return ui_context_button_active(C, ui_context_rna_button_active_test);
+}
+
+uiBut *uiContextActiveButton(const struct bContext *C)
+{
+ return ui_context_button_active(C, NULL);
}
/* helper function for insert keyframe, reset to default, etc operators */
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index b3e7417b438..a85a267d795 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -253,11 +253,6 @@ struct uiBut {
/* pointer back */
uiBlock *block;
-
-#ifdef WITH_PYTHON_UI_INFO
- char py_dbg_fn[240];
- int py_dbg_ln;
-#endif
};
struct uiBlock {
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 081b528d153..eee771cbd93 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -61,6 +61,10 @@
#include "WM_api.h"
#include "WM_types.h"
+/* only for UI_OT_editsource */
+#include "ED_screen.h"
+#include "BKE_main.h"
+#include "BLI_ghash.h"
/* ********************************************************** */
@@ -474,6 +478,242 @@ static void UI_OT_reports_to_textblock(wmOperatorType *ot)
ot->exec= reports_to_text_exec;
}
+
+/* ------------------------------------------------------------------------- */
+/* EditSource Utility funcs and operator,
+ * note, this includes itility functions and button matching checks */
+
+struct uiEditSourceStore {
+ uiBut but_orig;
+ GHash *hash;
+} uiEditSourceStore;
+
+struct uiEditSourceButStore {
+ char py_dbg_fn[240];
+ int py_dbg_ln;
+} uiEditSourceButStore;
+
+/* should only ever be set while the edit source operator is running */
+struct uiEditSourceStore *ui_editsource_info= NULL;
+
+int UI_editsource_enable_check(void)
+{
+ return (ui_editsource_info != NULL);
+}
+
+static void ui_editsource_active_but_set(uiBut *but)
+{
+ BLI_assert(ui_editsource_info == NULL);
+
+ ui_editsource_info= MEM_callocN(sizeof(uiEditSourceStore), __func__);
+ memcpy(&ui_editsource_info->but_orig, but, sizeof(uiBut));
+
+ ui_editsource_info->hash = BLI_ghash_new(BLI_ghashutil_ptrhash,
+ BLI_ghashutil_ptrcmp,
+ __func__);
+}
+
+static void ui_editsource_active_but_clear(void)
+{
+ BLI_ghash_free(ui_editsource_info->hash, NULL, (GHashValFreeFP)MEM_freeN);
+ MEM_freeN(ui_editsource_info);
+ ui_editsource_info= NULL;
+}
+
+static int ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b)
+{
+#if 0
+ printf("matching buttons: '%s' == '%s'\n",
+ but_a->drawstr, but_b->drawstr);
+#endif
+
+ /* this just needs to be a 'good-enough' comparison so we can know beyond
+ * reasonable doubt that these buttons are the same between redraws.
+ * if this fails it only means edit-source fails - campbell */
+ if( (but_a->x1 == but_b->x1) &&
+ (but_a->x2 == but_b->x2) &&
+ (but_a->y1 == but_b->y1) &&
+ (but_a->y2 == but_b->y2) &&
+ (but_a->type == but_b->type) &&
+ (but_a->rnaprop == but_b->rnaprop) &&
+ (but_a->optype == but_b->optype) &&
+ (but_a->unit_type == but_b->unit_type) &&
+ strncmp(but_a->drawstr, but_b->drawstr, UI_MAX_DRAW_STR) == 0
+ ) {
+ return TRUE;
+ }
+ else {
+ return FALSE;
+ }
+}
+
+void UI_editsource_active_but_test(uiBut *but)
+{
+ extern void PyC_FileAndNum_Safe(const char **filename, int *lineno);
+
+ struct uiEditSourceButStore *but_store= MEM_callocN(sizeof(uiEditSourceButStore), __func__);
+
+ const char *fn;
+ int lineno= -1;
+
+#if 0
+ printf("comparing buttons: '%s' == '%s'\n",
+ but->drawstr, ui_editsource_info->but_orig.drawstr);
+#endif
+
+ PyC_FileAndNum_Safe(&fn, &lineno);
+
+ if (lineno != -1) {
+ BLI_strncpy(but_store->py_dbg_fn, fn,
+ sizeof(but_store->py_dbg_fn));
+ but_store->py_dbg_ln= lineno;
+ }
+ else {
+ but_store->py_dbg_fn[0]= '\0';
+ but_store->py_dbg_ln= -1;
+ }
+
+ BLI_ghash_insert(ui_editsource_info->hash, but, but_store);
+}
+
+/* editsource operator component */
+
+static ScrArea *biggest_text_view(bContext *C)
+{
+ bScreen *sc= CTX_wm_screen(C);
+ ScrArea *sa, *big= NULL;
+ int size, maxsize= 0;
+
+ for(sa= sc->areabase.first; sa; sa= sa->next) {
+ if(sa->spacetype==SPACE_TEXT) {
+ size= sa->winx * sa->winy;
+ if(size > maxsize) {
+ maxsize= size;
+ big= sa;
+ }
+ }
+ }
+ return big;
+}
+
+static int editsource_text_edit(bContext *C, wmOperator *op,
+ char filepath[240], int line)
+{
+ struct Main *bmain= CTX_data_main(C);
+ Text *text;
+
+ for (text=bmain->text.first; text; text=text->id.next) {
+ if (text->name && BLI_path_cmp(text->name, filepath) == 0) {
+ break;
+ }
+ }
+
+ if (text == NULL) {
+ text= add_text(filepath, bmain->name);
+ }
+
+ if (text == NULL) {
+ BKE_reportf(op->reports, RPT_WARNING,
+ "file: '%s' can't be opened", filepath);
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ /* naughty!, find text area to set, not good behavior
+ * but since this is a dev tool lets allow it - campbell */
+ ScrArea *sa= biggest_text_view(C);
+ if(sa) {
+ SpaceText *st= sa->spacedata.first;
+ st->text= text;
+ }
+ else {
+ BKE_reportf(op->reports, RPT_INFO,
+ "See '%s' in the text editor", text->id.name + 2);
+ }
+
+ txt_move_toline(text, line - 1, FALSE);
+ WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+static int editsource_exec(bContext *C, wmOperator *op)
+{
+ uiBut *but= uiContextActiveButton(C);
+
+ if (but) {
+ GHashIterator ghi;
+ struct uiEditSourceButStore *but_store= NULL;
+
+ ARegion *ar= CTX_wm_region(C);
+ int ret;
+
+ /* needed else the active button does not get tested */
+ uiFreeActiveButtons(C, CTX_wm_screen(C));
+
+ // printf("%s: begin\n", __func__);
+
+ /* take care not to return before calling ui_editsource_active_but_clear */
+ ui_editsource_active_but_set(but);
+
+ /* redraw and get active button python info */
+ ED_region_do_draw(C, ar);
+
+ for(BLI_ghashIterator_init(&ghi, ui_editsource_info->hash);
+ !BLI_ghashIterator_isDone(&ghi);
+ BLI_ghashIterator_step(&ghi))
+ {
+ uiBut *but= BLI_ghashIterator_getKey(&ghi);
+ if (but && ui_editsource_uibut_match(&ui_editsource_info->but_orig, but)) {
+ but_store= BLI_ghashIterator_getValue(&ghi);
+ break;
+ }
+
+ }
+
+ if (but_store) {
+ if (but_store->py_dbg_ln != -1) {
+ ret= editsource_text_edit(C, op,
+ but_store->py_dbg_fn,
+ but_store->py_dbg_ln);
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR,
+ "Active button isn't from a script, cant edit source.");
+ ret= OPERATOR_CANCELLED;
+ }
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR,
+ "Active button match can't be found.");
+ ret= OPERATOR_CANCELLED;
+ }
+
+
+ ui_editsource_active_but_clear();
+
+ // printf("%s: end\n", __func__);
+
+ return ret;
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Active button not found");
+ return OPERATOR_CANCELLED;
+ }
+}
+
+static void UI_OT_editsource(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Reports to Text Block";
+ ot->idname= "UI_OT_editsource";
+ ot->description= "Edit source code for a button";
+
+ /* callbacks */
+ ot->exec= editsource_exec;
+}
+
+
/* ********************************************************* */
/* Registration */
@@ -485,5 +725,6 @@ void UI_buttons_operatortypes(void)
WM_operatortype_append(UI_OT_reset_default_button);
WM_operatortype_append(UI_OT_copy_to_selected_button);
WM_operatortype_append(UI_OT_reports_to_textblock); // XXX: temp?
+ WM_operatortype_append(UI_OT_editsource);
}
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 4ca7d272503..6d721e828af 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -252,7 +252,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
static int object_location_clear_exec(bContext *C, wmOperator *op)
{
- return object_clear_transform_generic_exec(C, op, object_clear_loc, "Location");
+ return object_clear_transform_generic_exec(C, op, object_clear_loc, ANIM_KS_LOCATION_ID);
}
void OBJECT_OT_location_clear(wmOperatorType *ot)
@@ -272,7 +272,7 @@ void OBJECT_OT_location_clear(wmOperatorType *ot)
static int object_rotation_clear_exec(bContext *C, wmOperator *op)
{
- return object_clear_transform_generic_exec(C, op, object_clear_rot, "Rotation");
+ return object_clear_transform_generic_exec(C, op, object_clear_rot, ANIM_KS_ROTATION_ID);
}
void OBJECT_OT_rotation_clear(wmOperatorType *ot)
@@ -292,7 +292,7 @@ void OBJECT_OT_rotation_clear(wmOperatorType *ot)
static int object_scale_clear_exec(bContext *C, wmOperator *op)
{
- return object_clear_transform_generic_exec(C, op, object_clear_scale, "Scaling");
+ return object_clear_transform_generic_exec(C, op, object_clear_scale, ANIM_KS_SCALING_ID);
}
void OBJECT_OT_scale_clear(wmOperatorType *ot)
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 7b0a056bb53..865d95d07ed 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -123,8 +123,6 @@ ImBuf* get_brush_icon(Brush *brush)
if (!(brush->icon_imbuf)) {
folder= BLI_get_folder(BLENDER_DATAFILES, "brushicons");
- path[0]= 0;
-
BLI_make_file_string(G.main->name, path, folder, brush->icon_filepath);
if (path[0])
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index b66440738b2..8e2a9c30193 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -699,11 +699,11 @@ static void move_camera(bContext* C, RegionView3D* rv3d, FlyInfo* fly, int orien
* TODO: need to check in future that frame changed before doing this
*/
if (orientationChanged) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
}
if (positionChanged) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
}
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index fa3007d2fb7..c69d2159ac2 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -495,7 +495,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
}
else {
- struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Location");
+ struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
if(ob->mode & OB_MODE_POSE) {
@@ -625,7 +625,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
}
else {
- struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Location");
+ struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
if(ob->mode & OB_MODE_POSE) {
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 879dc425091..1d28b594e57 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4582,21 +4582,21 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *ob,
/* insert keyframes for the affected sets of channels using the builtin KeyingSets found */
if (doLoc) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doRot) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doScale) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Scale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_SCALING_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
}
/* insert keyframe in all (transform) channels */
else {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
@@ -4697,21 +4697,21 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
}
if (doLoc) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doRot) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doScale) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Scale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_SCALING_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
}
/* insert keyframe in all (transform) channels */
else {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 676fe1e092d..942c0d39c37 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -460,17 +460,45 @@ static PointerRNA rna_OperatorMacro_properties_get(PointerRNA *ptr)
static void rna_Event_ascii_get(PointerRNA *ptr, char *value)
{
- wmEvent *event= (wmEvent*)ptr->id.data;
+ wmEvent *event= (wmEvent*)ptr->data;
value[0]= event->ascii;
value[1]= '\0';
}
static int rna_Event_ascii_length(PointerRNA *ptr)
{
- wmEvent *event= (wmEvent*)ptr->id.data;
+ wmEvent *event= (wmEvent*)ptr->data;
return (event->ascii)? 1 : 0;
}
+static void rna_Event_unicode_get(PointerRNA *ptr, char *value)
+{
+ /* utf8 buf isnt \0 terminated */
+ wmEvent *event= (wmEvent*)ptr->data;
+ size_t len= 0;
+
+ if (event->utf8_buf[0]) {
+ BLI_str_utf8_as_unicode_and_size(event->utf8_buf, &len);
+ if (len > 0) {
+ memcpy(value, event->utf8_buf, len);
+ }
+ }
+
+ value[len]= '\0';
+}
+
+static int rna_Event_unicode_length(PointerRNA *ptr)
+{
+
+ wmEvent *event= (wmEvent*)ptr->data;
+ if (event->utf8_buf[0]) {
+ return BLI_str_utf8_size(event->utf8_buf); /* invalid value is checked on assignment so we dont need to account for this */
+ }
+ else {
+ return 0;
+ }
+}
+
static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
{
wmWindow *win= (wmWindow*)ptr->data;
@@ -1358,6 +1386,11 @@ static void rna_def_event(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "ASCII", "Single ASCII character for this event");
+ prop= RNA_def_property(srna, "unicode", PROP_STRING, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_string_funcs(prop, "rna_Event_unicode_get", "rna_Event_unicode_length", NULL);
+ RNA_def_property_ui_text(prop, "Unicode", "Single unicode character for this event");
+
/* enums */
prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "val");
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index d8a6b192a23..6cce5342926 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -208,6 +208,13 @@ void BPY_python_start(int argc, const char **argv)
/* allow to use our own included python */
PyC_SetHomePath(BLI_get_folder(BLENDER_SYSTEM_PYTHON, NULL));
+ /* without this the sys.stdout may be set to 'ascii'
+ * (it is on my system at least), where printing unicode values will raise
+ * an error, this is highly annoying, another stumbling block for devs,
+ * so use a more relaxed error handler and enforce utf-8 since the rest of
+ * blender is utf-8 too - campbell */
+ BLI_setenv("PYTHONIOENCODING", "utf-8:surrogateescape");
+
/* Python 3.2 now looks for '2.xx/python/include/python3.2d/pyconfig.h' to
* parse from the 'sysconfig' module which is used by 'site',
* so for now disable site. alternatively we could copy the file. */
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 8fa90a51442..0fc00731d60 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -1526,7 +1526,7 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr)
do_tra= ((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP) && shr->alpha!=1.0f && (shi->depth <= shi->mat->ray_depth_tra));
do_mir= ((shi->mat->mode & MA_RAYMIRROR) && shi->ray_mirror!=0.0f && (shi->depth <= shi->mat->ray_depth));
- /* raytrace mirror amd refract like to separate the spec color */
+ /* raytrace mirror and refract like to separate the spec color */
if(shi->combinedflag & SCE_PASS_SPEC)
sub_v3_v3v3(diff, shr->combined, shr->spec);
else
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 5048166c8b7..fc96c8804b2 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -346,7 +346,9 @@ typedef struct wmEvent {
short val; /* press, release, scrollvalue */
int x, y; /* mouse pointer position, screen coord */
int mval[2]; /* region mouse position, name convention pre 2.5 :) */
- char utf8_buf[6]; /* from, ghost if utf8 is enabled for the platform */
+ char utf8_buf[6]; /* from, ghost if utf8 is enabled for the platform,
+ * BLI_str_utf8_size() must _always_ be valid, check
+ * when assigning s we dont need to check on every access after */
char ascii; /* from ghost, fallback if utf8 isnt set */
char pad;
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index c497959f072..6cda007fc33 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -460,11 +460,12 @@ void WM_event_print(wmEvent *event)
printf("wmEvent - type:%d/%s, val:%d/%s, "
"shift:%d, ctrl:%d, alt:%d, oskey:%d, keymodifier:%d, "
- "mouse:(%d,%d), ascii:'%c', utf8:'%.6s', "
+ "mouse:(%d,%d), ascii:'%c', utf8:'%.*s', "
"keymap_idname:%s, pointer:%p\n",
event->type, type_id, event->val, val_id,
event->shift, event->ctrl, event->alt, event->oskey, event->keymodifier,
- event->x, event->y, event->ascii, event->utf8_buf,
+ event->x, event->y, event->ascii,
+ BLI_str_utf8_size(event->utf8_buf), event->utf8_buf,
event->keymap_idname, (void *)event);
}
else {
@@ -2622,16 +2623,25 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
/* exclude arrow keys, esc, etc from text input */
if(type==GHOST_kEventKeyUp) {
- if (event.ascii<32 && event.ascii > 0) {
- event.ascii= '\0';
- }
+ event.ascii= '\0';
/* ghost should do this already for key up */
if (event.utf8_buf[0]) {
- printf("%s: ghost on you're platform is misbehaving, utf8 events on key up!\n", __func__);
+ printf("%s: ghost on your platform is misbehaving, utf8 events on key up!\n", __func__);
}
event.utf8_buf[0]= '\0';
}
+ else if (event.ascii<32 && event.ascii > 0) {
+ event.ascii= '\0';
+ /* TODO. should this also zero utf8?, dont for now, campbell */
+ }
+
+ if (event.utf8_buf[0]) {
+ if (BLI_str_utf8_size(event.utf8_buf) == -1) {
+ printf("%s: ghost detected an invalid unicode character '%d'!\n", __func__, (int)(unsigned char)event.utf8_buf[0]);
+ event.utf8_buf[0]= '\0';
+ }
+ }
/* modifiers */
/* assigning both first and second is strange - campbell */
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 5fee5fb2a57..49bb3132204 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -104,11 +104,6 @@
static GHash *global_ops_hash= NULL;
-#ifdef WITH_PYTHON_UI_INFO
-# include "DNA_text_types.h"
-# include "BKE_text.h"
-#endif
-
/* ************ operator API, exported ********** */
@@ -3509,79 +3504,6 @@ static void operatortype_ghash_free_cb(wmOperatorType *ot)
MEM_freeN(ot);
}
-#ifdef WITH_PYTHON_UI_INFO
-
-static ScrArea *biggest_text_view(bContext *C)
-{
- bScreen *sc= CTX_wm_screen(C);
- ScrArea *sa, *big= NULL;
- int size, maxsize= 0;
-
- for(sa= sc->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_TEXT) {
- size= sa->winx * sa->winy;
- if(size > maxsize) {
- maxsize= size;
- big= sa;
- }
- }
- }
- return big;
-}
-
-static int wm_text_edit_exec(bContext *C, wmOperator *op)
-{
- Main *bmain= CTX_data_main(C);
- Text *text;
-
- char filepath[240];
- int line= RNA_int_get(op->ptr, "line");
- RNA_string_get(op->ptr, "filepath", filepath);
-
- for (text=bmain->text.first; text; text=text->id.next) {
- if (text->name && BLI_path_cmp(text->name, filepath) == 0) {
- break;
- }
- }
-
- if (text == NULL) {
- text= add_text(filepath, bmain->name);
- }
-
- if (text == NULL) {
- BKE_reportf(op->reports, RPT_WARNING, "file: '%s' can't be opened", filepath);
- return OPERATOR_CANCELLED;
- }
- else {
- /* naughty!, find text area to set, not good behavior
- * but since this is a dev tool lets allow it - campbell */
- ScrArea *sa= biggest_text_view(C);
- if(sa) {
- SpaceText *st= sa->spacedata.first;
- st->text= text;
- }
-
- txt_move_toline(text, line - 1, FALSE);
- WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);
- }
-
- return OPERATOR_FINISHED;
-}
-
-static void WM_OT_text_edit(wmOperatorType *ot)
-{
- ot->name= "Edit Text File";
- ot->idname= "WM_OT_text_edit";
-
- ot->exec= wm_text_edit_exec;
-
- RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, "Path", "");
- RNA_def_int(ot->srna, "line", 0, INT_MIN, INT_MAX, "Line", "", 0, INT_MAX);
-}
-
-#endif /* WITH_PYTHON_UI_INFO */
-
-
/* ******************************************************* */
/* called on initialize WM_exit() */
void wm_operatortype_free(void)
@@ -3624,11 +3546,6 @@ void wm_operatortype_init(void)
WM_operatortype_append(WM_OT_collada_export);
WM_operatortype_append(WM_OT_collada_import);
#endif
-
-#ifdef WITH_PYTHON_UI_INFO
- WM_operatortype_append(WM_OT_text_edit);
-#endif
-
}
/* circleselect-like modal operators */
diff --git a/source/gameengine/Physics/common/PHY_IMotionState.h b/source/gameengine/Physics/common/PHY_IMotionState.h
index 00b4f105348..3914cb9aef5 100644
--- a/source/gameengine/Physics/common/PHY_IMotionState.h
+++ b/source/gameengine/Physics/common/PHY_IMotionState.h
@@ -51,7 +51,7 @@ class PHY_IMotionState
virtual void getWorldPosition(float& posX,float& posY,float& posZ)=0;
virtual void getWorldScaling(float& scaleX,float& scaleY,float& scaleZ)=0;
virtual void getWorldOrientation(float& quatIma0,float& quatIma1,float& quatIma2,float& quatReal)=0;
- // ori = array 12 floats, [0..3] = first column + 0, [4..7] = second colum, [8..11] = third column
+ // ori = array 12 floats, [0..3] = first column + 0, [4..7] = second column, [8..11] = third column
virtual void getWorldOrientation(float* ori)=0;
virtual void setWorldOrientation(const float* ori)=0;