diff options
author | Joshua Leung <aligorith@gmail.com> | 2012-06-11 04:21:50 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2012-06-11 04:21:50 +0400 |
commit | 0df68aacb10a7f947673d925e09a539ee8c4bb9c (patch) | |
tree | c19679d63689445aa770bdfc2b421a71229235e2 /source/blender/makesrna/intern/rna_space.c | |
parent | f305261f14254656c888438205887769ad45b8bd (diff) |
Grease Pencil - Support for Grease Pencil in the Sequence Editor preview/image
space works again
This commit restores the support for using Grease Pencil in the Sequence Editor
image preview region, making it possible to scribble on footage for review
purposes again. Due to internal changes in how the Sequencer handles the image
drawing for this stuff (i.e. it is now fully based on View2D instead of trying
to implement its own little crazy offset+zoom stuff), a lot of the old code for
handling those offsets is no longer needed. Instead, one of the "standard" cases
is now used, and works quite well.
Bugfixes:
* View-space Grease Pencil drawing was done in wrong place (before view2d
restore)
* Grease Pencil entry in RNA had wrong/missing type
Credits:
* DingTo - initial patch/attempt at restoring support
* Aligorith - solved the "offset problems"
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 3d01f5ba082..3ff54076f82 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1970,10 +1970,12 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); +#if 0 // XXX: unused - old stuff which may not be restored prop = RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DISPGP); RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay"); +#endif /* update */ prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); @@ -2050,7 +2052,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Display Mode", "View mode to use for displaying sequencer output"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - /* flag's */ + /* flags */ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_DRAW_CFRANUM); RNA_def_property_ui_text(prop, "Show Frame Number Indicator", @@ -2077,23 +2079,10 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - prop = RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL); - RNA_def_property_ui_text(prop, "Use Grease Pencil", - "Display and edit the grease pencil freehand annotations overlay"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES); RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - - /* grease pencil */ - prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "gpd"); - RNA_def_property_struct_type(prop, "UnknownType"); - RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); prop = RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "chanshown"); @@ -2114,6 +2103,14 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); + + /* grease pencil */ + prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "gpd"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_struct_type(prop, "GreasePencil"); + RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); } static void rna_def_space_text(BlenderRNA *brna) |