- 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:
parent
03305de86d
commit
ee73c96e90
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue