diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-02-11 02:17:58 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-02-11 02:17:58 +0300 |
commit | b77da4893dc18adf981f158d52842f0c6d81498e (patch) | |
tree | 1b0215c79dc833403d036249acd0b5b170b1f3bd /source/blender/makesrna | |
parent | 1195c22207c452f1d6d974c8043d533ab8f41402 (diff) |
2.5: Image window operators, quite a few of these still have
missing parts and are work in progress.
Set 3D Cursor
Set Tile
Sample Color
New
Open
Replace
Reload
Save (As)
Save Sequence
Pack
Unpack
Record Composite
The file select operators have context issues still. They need
to get the image space in the context on exec() but it's not
there currently, not sure how to solve that yet.
Also added name parameter to uiMenuItemEnumO, and fixed "mute"
argument in ED_update_for_newframe calls in fluidsim bake.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 33f386fd35a..793727d4d7b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -33,6 +33,11 @@ #ifdef RNA_RUNTIME +#include "DNA_scene_types.h" + +#include "BKE_brush.h" +#include "BKE_context.h" + static StructRNA* rna_Space_refine(struct PointerRNA *ptr) { SpaceLink *space= (SpaceLink*)ptr->data; @@ -80,6 +85,14 @@ static PointerRNA rna_SpaceImage_uvedit_get(PointerRNA *ptr) return rna_pointer_inherit_refine(ptr, &RNA_SpaceUVEditor, ptr->data); } +static void rna_SpaceImage_paint_update(bContext *C, PointerRNA *ptr) +{ + Scene *scene= CTX_data_scene(C); + + if(scene) + brush_check_exists(&scene->toolsettings->imapaint.brush); +} + #else static void rna_def_space(BlenderRNA *brna) @@ -270,8 +283,8 @@ static void rna_def_space_image(BlenderRNA *brna) /* paint */ prop= RNA_def_property(srna, "image_painting", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // brush check RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode."); + RNA_def_property_update(prop, 0, "rna_SpaceImage_paint_update"); /* grease pencil */ prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); |