Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-01 18:05:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-01 18:05:31 +0300
commit30aff3b830ac222bae90bea02fef0d41fd9d197c (patch)
tree0b798790b22d728dd8f1c06d55b6f21e47d2afb5 /source/blender/makesrna/intern/rna_gpencil.c
parentc58f2dfc9d27a5635360a96116fb3a887c35b890 (diff)
- grease pencil mode for drawing onto geometry (using the z-buffer), access in the 3D view panel.
- account for parts of the line going off into infinity by making the stroke stretch between the last valid depth values (like an elastic band), if the endpoints are not over any geometry then use the closest valid depth.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 129fad4e98c..d55f5f21e72 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -220,6 +220,12 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem draw_mode_items[] = {
+ {GP_DATA_VIEWALIGN, "CURSOR", 0, "Cursor", ""},
+ {0, "VIEW", 0, "View", ""}, /* weired, GP_DATA_VIEWALIGN is inverted */
+ {GP_DATA_VIEWALIGN|GP_DATA_VIEWDEPTH, "DEPTH", 0, "Depth", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "GreasePencil", "ID");
RNA_def_struct_sdna(srna, "bGPdata");
RNA_def_struct_ui_text(srna, "Grease Pencil", "Freehand annotation sketchbook.");
@@ -232,9 +238,10 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Layers", "Similar to layers in Photoshop.");
/* Flags */
- prop= RNA_def_property(srna, "view_space_draw", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GP_DATA_VIEWALIGN);
- RNA_def_property_ui_text(prop, "Stick to View", "Newly drawn strokes get added in view space (i.e. sketches stick to data when view is manipulated).");
+ prop= RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, draw_mode_items);
+ RNA_def_property_ui_text(prop, "Draw Mode", "");
}
/* --- */