- fix for rna show_brush variable shadowing its parent classes with a flag which is now unused.

- getting clipboard RNA variable would crash blender in background mode.
This commit is contained in:
Campbell Barton 2010-12-12 14:28:23 +00:00
parent 03305de86d
commit ee73c96e90
3 changed files with 9 additions and 11 deletions

View File

@ -1159,8 +1159,9 @@ typedef enum SculptFlags {
/* ImagePaintSettings.flag */
#define IMAGEPAINT_DRAWING 1
#define IMAGEPAINT_DRAW_TOOL 2
#define IMAGEPAINT_DRAW_TOOL_DRAWING 4
// #define IMAGEPAINT_DRAW_TOOL 2 // deprecated
// #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated
/* projection painting only */
#define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
#define IMAGEPAINT_PROJECT_XRAY 16

View File

@ -285,15 +285,6 @@ static void rna_def_image_paint(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode");
/* booleans */
prop= RNA_def_property(srna, "show_brush_draw", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_DRAW_TOOL);
RNA_def_property_ui_text(prop, "Show Brush Draw", "Enables brush shape while drawing");
prop= RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_DRAW_TOOL_DRAWING);
RNA_def_property_ui_text(prop, "Show Brush", "Enables brush shape while not drawing");
prop= RNA_def_property(srna, "use_projection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_DISABLE);
RNA_def_property_ui_text(prop, "Project Paint", "Use projection painting for improved consistency in the brush strokes");

View File

@ -1007,6 +1007,9 @@ char *WM_clipboard_text_get(int selection)
{
char *p, *p2, *buf, *newbuf;
if(G.background)
return NULL;
buf= (char*)GHOST_getClipboard(selection);
if(!buf)
return NULL;
@ -1027,6 +1030,9 @@ char *WM_clipboard_text_get(int selection)
void WM_clipboard_text_set(char *buf, int selection)
{
if(G.background)
return;
#ifdef _WIN32
/* do conversion from \n to \r\n on Windows */
char *p, *p2, *newbuf;