Small changes

- font->blur was uninitialized
- Use Ctrl+Alt+Shift+P to run scripts from the 3d view not Pkey. (still useful for testing)
This commit is contained in:
Campbell Barton 2009-04-23 05:56:09 +00:00
parent 7ee587c04a
commit d00c3ef2d6
4 changed files with 4 additions and 3 deletions

@ -368,6 +368,7 @@ FontBLF *blf_font_new_from_mem(char *name, unsigned char *mem, int mem_size)
font->name= BLI_strdup(name);
font->filename= NULL;
font->engine= (void *)face;
font->blur= 0;
blf_font_fill(font);
return(font);
}

@ -67,6 +67,6 @@ void script_keymap(wmWindowManager *wm)
ListBase *keymap= WM_keymap_listbase(wm, "Script", SPACE_SCRIPT, 0);
/* TODO - this is just while we have no way to load a text datablock */
RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py");
RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filename", "test.py");
}

@ -224,7 +224,7 @@ void view3d_keymap(wmWindowManager *wm)
RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH);
/* TODO - this is just while we have no way to load a text datablock */
RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py");
RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filename", "test.py");
transform_keymap_for_space(wm, keymap, SPACE_VIEW3D);

@ -1989,7 +1989,7 @@ PyObject *pyrna_basetype_unregister(PyObject *self, PyObject *args)
BPy_StructRNA *py_srna;
StructUnregisterFunc unreg;
if(!PyArg_ParseTuple(args, "O:register", &py_class))
if(!PyArg_ParseTuple(args, "O:unregister", &py_class))
return NULL;
if(!PyType_Check(py_class)) {