Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
| Context not available. | |||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| #include "ED_object.h" | #include "ED_object.h" | ||||
| #include "ED_gpencil.h" | |||||
| #include "GPU_extensions.h" | #include "GPU_extensions.h" | ||||
| Context not available. | |||||
| #endif | #endif | ||||
| /* loaded dynamic only defined as dummy */ | |||||
| EnumPropertyItem rna_enum_gpencil_drawing_brushes_items[] = { | |||||
| { 0, "BASIC", ICON_BRUSH_SCULPT_DRAW, "Basic", "Basic drawing brush" }, | |||||
| { 0, NULL, 0, NULL, NULL } | |||||
| }; | |||||
| static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[] = { | |||||
| { GP_FILL_DMODE_STROKE, "STROKE", 0, "Strokes", "Use visible strokes as fill boundary limits" }, | |||||
| { GP_FILL_DMODE_CONTROL, "CONTROL", 0, "Control", "Use internal control lines as fill boundary limits" }, | |||||
| { GP_FILL_DMODE_BOTH, "BOTH", 0, "Both", "Use visible strokes and control lines as fill boundary limits" }, | |||||
| { 0, NULL, 0, NULL, NULL } | |||||
| }; | |||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| Context not available. | |||||
| #include "FRS_freestyle.h" | #include "FRS_freestyle.h" | ||||
| #endif | #endif | ||||
| /* Grease Pencil update cache */ | |||||
| static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | |||||
| { | |||||
| BKE_gpencil_batch_cache_alldirty_main(bmain); | |||||
| WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); | |||||
| } | |||||
| /* Grease Pencil Interpolation settings */ | /* Grease Pencil Interpolation settings */ | ||||
| static char *rna_GPencilInterpolateSettings_path(PointerRNA *UNUSED(ptr)) | static char *rna_GPencilInterpolateSettings_path(PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| Context not available. | |||||
| BLI_uniquename(&ts->gp_brushes, brush, DATA_("GP_Brush"), '.', offsetof(bGPDbrush, info), sizeof(brush->info)); | BLI_uniquename(&ts->gp_brushes, brush, DATA_("GP_Brush"), '.', offsetof(bGPDbrush, info), sizeof(brush->info)); | ||||
| } | } | ||||
| /* GPencilBrush icon */ | |||||
| static int gpencil_get_brush_icon(int type) | |||||
| { | |||||
| switch (type) { | |||||
| case GPBRUSH_CUSTOM: | |||||
| return ICON_GPBRUSH_CUSTOM; | |||||
| case GPBRUSH_PENCIL: | |||||
| return ICON_GPBRUSH_PENCIL; | |||||
| case GPBRUSH_PEN: | |||||
| return ICON_GPBRUSH_PEN; | |||||
| case GPBRUSH_INK: | |||||
| return ICON_GPBRUSH_INK; | |||||
| case GPBRUSH_INKNOISE: | |||||
| return ICON_GPBRUSH_INKNOISE; | |||||
| case GPBRUSH_BLOCK: | |||||
| return ICON_GPBRUSH_BLOCK; | |||||
| case GPBRUSH_MARKER: | |||||
| return ICON_GPBRUSH_MARKER; | |||||
| case GPBRUSH_FILL: | |||||
| return ICON_GPBRUSH_FILL; | |||||
| default: | |||||
| return ICON_GPBRUSH_CUSTOM; | |||||
| } | |||||
| } | |||||
| /* Dynamic Enums of GP Brushes */ | |||||
| const EnumPropertyItem *rna_GPencilBrush_enum_itemf( | |||||
| bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), | |||||
| bool *r_free) | |||||
| { | |||||
| ToolSettings *ts = NULL; | |||||
| bGPDbrush *brush; | |||||
| EnumPropertyItem item_tmp = {0}; | |||||
| EnumPropertyItem *item = NULL; | |||||
| int totitem = 0; | |||||
| int i = 0; | |||||
| /* Try to get toolsettings pointer */ | |||||
| if (ptr->id.data != NULL) { | |||||
| Scene *scene = ptr->id.data; | |||||
| if (GS(scene->id.name) == ID_SCE) { | |||||
| ts = scene->toolsettings; | |||||
| } | |||||
| } | |||||
| else if (C != NULL) { | |||||
| ts = CTX_data_tool_settings(C); | |||||
| } | |||||
| /* Fallback - For generating Py/RNA docs */ | |||||
| if (ts == NULL) { | |||||
| return rna_enum_gpencil_drawing_brushes_items; | |||||
| } | |||||
| /* Existing brushes */ | |||||
| for (brush = ts->gp_brushes.first; brush; brush = brush->next, i++) { | |||||
| item_tmp.identifier = brush->info; | |||||
| item_tmp.name = brush->info; | |||||
| item_tmp.value = i; | |||||
| if (brush->flag & GP_BRUSH_FILL_ONLY) { | |||||
| item_tmp.icon = ICON_GPBRUSH_FILL; | |||||
| } | |||||
| else { | |||||
| item_tmp.icon = gpencil_get_brush_icon(brush->icon); | |||||
| } | |||||
| RNA_enum_item_add(&item, &totitem, &item_tmp); | |||||
| } | |||||
| RNA_enum_item_end(&item, &totitem); | |||||
| *r_free = true; | |||||
| return item; | |||||
| } | |||||
| /* ----------------- end of Grease pencil drawing brushes ------------*/ | /* ----------------- end of Grease pencil drawing brushes ------------*/ | ||||
| static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) | static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) | ||||
| Context not available. | |||||
| /* Line Thickness */ | /* Line Thickness */ | ||||
| prop = RNA_def_property(srna, "line_width", PROP_INT, PROP_PIXEL); | prop = RNA_def_property(srna, "line_width", PROP_INT, PROP_PIXEL); | ||||
| RNA_def_property_int_sdna(prop, NULL, "thickness"); | RNA_def_property_int_sdna(prop, NULL, "thickness"); | ||||
| RNA_def_property_range(prop, 1, 300); | RNA_def_property_range(prop, 1, 1000); | ||||
| RNA_def_property_ui_range(prop, 1, 10, 1, 0); | RNA_def_property_ui_range(prop, 1, 500, 1, 0); | ||||
| RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)"); | RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| Context not available. | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_smoothfac"); | RNA_def_property_float_sdna(prop, NULL, "draw_smoothfac"); | ||||
| RNA_def_property_range(prop, 0.0, 2.0f); | RNA_def_property_range(prop, 0.0, 2.0f); | ||||
| RNA_def_property_ui_text(prop, "Smooth", | RNA_def_property_ui_text(prop, "Smooth", | ||||
| "Amount of smoothing to apply to newly created strokes, to reduce jitter/noise"); | "Amount of smoothing to apply after finish newly created strokes, to reduce jitter/noise"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Iterations of the Smoothing factor */ | /* Iterations of the Smoothing factor */ | ||||
| Context not available. | |||||
| "Number of times to smooth newly created strokes"); | "Number of times to smooth newly created strokes"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Thickness smoothing factor for new strokes */ | |||||
| prop = RNA_def_property(srna, "pen_thick_smooth_factor", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "thick_smoothfac"); | |||||
| RNA_def_property_range(prop, 0.0, 2.0f); | |||||
| RNA_def_property_ui_text(prop, "Smooth Thickness", | |||||
| "Amount of thickness smoothing to apply after finish newly created strokes, to reduce jitter/noise"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Thickness iterations of the Smoothing factor */ | |||||
| prop = RNA_def_property(srna, "pen_thick_smooth_steps", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "thick_smoothlvl"); | |||||
| RNA_def_property_range(prop, 1, 3); | |||||
| RNA_def_property_ui_text(prop, "Iterations Thickness", | |||||
| "Number of times to smooth thickness for newly created strokes"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Subdivision level for new strokes */ | /* Subdivision level for new strokes */ | ||||
| prop = RNA_def_property(srna, "pen_subdivision_steps", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "pen_subdivision_steps", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "sublevel"); | RNA_def_property_int_sdna(prop, NULL, "sublevel"); | ||||
| Context not available. | |||||
| RNA_def_property_ui_text(prop, "Curve Jitter", "Curve used for the jitter effect"); | RNA_def_property_ui_text(prop, "Curve Jitter", "Curve used for the jitter effect"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* fill threshold for transparence */ | |||||
| prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "fill_threshold"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Threshold", | |||||
| "Threshold to consider color transparent for filling"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* fill leak size */ | |||||
| prop = RNA_def_property(srna, "fill_leak", PROP_INT, PROP_PIXEL); | |||||
| RNA_def_property_int_sdna(prop, NULL, "fill_leak"); | |||||
| RNA_def_property_range(prop, 0, 100); | |||||
| RNA_def_property_ui_text(prop, "Leak Size", | |||||
| "Size in pixels to consider the leak closed"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* fill simplify steps */ | |||||
| prop = RNA_def_property(srna, "fill_simplyfy_lvl", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "fill_simplylvl"); | |||||
| RNA_def_property_range(prop, 0, 10); | |||||
| RNA_def_property_ui_text(prop, "Simplify", | |||||
| "Number of simplify steps (large values reduce fill accuracy)"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "lazy_radius", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "lazy_radius"); | |||||
| RNA_def_property_range(prop, 1, 200); | |||||
| RNA_def_property_ui_text(prop, "Distance", "Minimum distance from last point before stroke continues"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "lazy_factor", PROP_FLOAT, PROP_FACTOR); | |||||
| RNA_def_property_float_sdna(prop, NULL, "lazy_factor"); | |||||
| RNA_def_property_range(prop, 0.5, 0.99); | |||||
| RNA_def_property_ui_text(prop, "Factor", "Higher values give a smoother stroke"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Flags */ | /* Flags */ | ||||
| prop = RNA_def_property(srna, "use_pressure", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pressure", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_PRESSURE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_PRESSURE); | ||||
| Context not available. | |||||
| RNA_def_property_ui_text(prop, "Random Strength", "Use random value for strength"); | RNA_def_property_ui_text(prop, "Random Strength", "Use random value for strength"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| prop = RNA_def_property(srna, "use_stabilizer", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_STABILIZE_MOUSE); | |||||
| RNA_def_property_boolean_default(prop, true); | |||||
| RNA_def_property_ui_text(prop, "Stabilizer", | |||||
| "Draw lines with a delay to allow smooth strokes. Press Shift key to override while drawing"); | |||||
| /* Cursor Color */ | |||||
| static float default_1[3] = { 1.0f, 1.0f, 1.0f }; | |||||
| prop = RNA_def_property(srna, "cursor_color", PROP_FLOAT, PROP_COLOR_GAMMA); | |||||
| RNA_def_property_float_sdna(prop, NULL, "curcolor"); | |||||
| RNA_def_property_array(prop, 3); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_float_array_default(prop, default_1); | |||||
| RNA_def_property_ui_text(prop, "Cursor Color", "Color for the cursor"); | |||||
| prop = RNA_def_property(srna, "use_cursor", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_ENABLE_CURSOR); | |||||
| RNA_def_property_boolean_default(prop, true); | |||||
| RNA_def_property_ui_text(prop, "Enable Cursor", "Enable cursor on screen"); | |||||
| prop = RNA_def_property(srna, "fill_only", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_ONLY); | |||||
| RNA_def_property_boolean_default(prop, true); | |||||
| RNA_def_property_ui_text(prop, "Fill Only", "The brush is only for filling strokes"); | |||||
| prop = RNA_def_property(srna, "fill_draw_mode", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "fill_draw_mode"); | |||||
| RNA_def_property_enum_items(prop, rna_enum_gpencil_fill_draw_modes_items); | |||||
| RNA_def_property_ui_text(prop, "Mode", "Mode to draw boundary limits"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "fill_show_boundary", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_SHOW_HELPLINES); | |||||
| RNA_def_property_boolean_default(prop, true); | |||||
| RNA_def_property_ui_text(prop, "Show Lines", "Show help lines for filling to see boundaries"); | |||||
| prop = RNA_def_property(srna, "fill_hide", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_HIDE); | |||||
| RNA_def_property_boolean_default(prop, true); | |||||
| RNA_def_property_ui_text(prop, "Hide", "Hide transparent lines to use as boundary for filling"); | |||||
| } | } | ||||
| /* Grease Pencil Drawing Brushes API */ | /* Grease Pencil Drawing Brushes API */ | ||||
| Context not available. | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem gpencil_source_3d_items[] = { | |||||
| {GP_TOOL_SOURCE_SCENE, "SCENE", 0, "Scene", | |||||
| "Grease Pencil data attached to the current scene is used, " | |||||
| "unless the active object already has Grease Pencil data (i.e. for old files)"}, | |||||
| {GP_TOOL_SOURCE_OBJECT, "OBJECT", 0, "Object", | |||||
| "Grease Pencil data-blocks attached to the active object are used " | |||||
| "(required when using pre 2.73 add-ons, e.g. BSurfaces)"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| static const EnumPropertyItem gpencil_stroke_placement_items[] = { | static const EnumPropertyItem gpencil_stroke_placement_items[] = { | ||||
| {GP_PROJECT_VIEWSPACE, "CURSOR", 0, "Cursor", "Draw stroke at the 3D cursor"}, | {GP_PROJECT_VIEWSPACE, "ORIGIN", ICON_OBJECT_ORIGIN, "Origin", "Draw stroke at Object origin"}, | ||||
| {0, "VIEW", 0, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */ | {GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Draw stroke at 3D cursor location" }, | ||||
| {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", 0, "Surface", "Stick stroke to surfaces"}, | // {0, "VIEW", ICON_VISIBLE_IPO_ON, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */ | ||||
| {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_STROKE, "STROKE", 0, "Stroke", "Stick stroke to other strokes"}, | {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", ICON_FACESEL, "Surface", "Stick stroke to surfaces"}, | ||||
| //{GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_STROKE, "STROKE", ICON_GREASEPENCIL, "Stroke", "Stick stroke to other strokes"}, | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| Context not available. | |||||
| "When draw new strokes, the new stroke is drawn below of all strokes in the layer"); | "When draw new strokes, the new stroke is drawn below of all strokes in the layer"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); | ||||
| prop = RNA_def_property(srna, "grease_pencil_source", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_src"); | |||||
| RNA_def_property_enum_items(prop, gpencil_source_3d_items); | |||||
| RNA_def_property_ui_text(prop, "Grease Pencil Source", | |||||
| "Data-block where active Grease Pencil data is found from"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "gpencil_sculpt", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "gpencil_sculpt", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "gp_sculpt"); | RNA_def_property_pointer_sdna(prop, NULL, "gp_sculpt"); | ||||
| RNA_def_property_struct_type(prop, "GPencilSculptSettings"); | RNA_def_property_struct_type(prop, "GPencilSculptSettings"); | ||||
| Context not available. | |||||
| RNA_def_property_ui_text(prop, "Grease Pencil Brushes", "Grease Pencil drawing brushes"); | RNA_def_property_ui_text(prop, "Grease Pencil Brushes", "Grease Pencil drawing brushes"); | ||||
| rna_def_gpencil_brushes(brna, prop); | rna_def_gpencil_brushes(brna, prop); | ||||
| prop = RNA_def_property(srna, "gpencil_brushes_enum", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, rna_enum_gpencil_drawing_brushes_items); | |||||
| RNA_def_property_enum_funcs(prop, "rna_GPencilBrushes_index_get", "rna_GPencilBrushes_index_set", "rna_GPencilBrush_enum_itemf"); | |||||
| RNA_def_property_ui_text(prop, "Enum of drawing brushes", ""); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Grease Pencil - 3D View Stroke Placement */ | /* Grease Pencil - 3D View Stroke Placement */ | ||||
| prop = RNA_def_property(srna, "gpencil_stroke_placement_view3d", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "gpencil_stroke_placement_view3d", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v3d_align"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v3d_align"); | ||||
| Context not available. | |||||
| RNA_def_property_ui_text(prop, "Stroke Placement (Image Editor)", ""); | RNA_def_property_ui_text(prop, "Stroke Placement (Image Editor)", ""); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Grease Pencil - Simplify Options */ | |||||
| prop = RNA_def_property(srna, "gpencil_simplify", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY); | |||||
| RNA_def_property_ui_text(prop, "Simplify", "Simplify Grease Pencil Drawing"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_simplify_onplay", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_ON_PLAY); | |||||
| RNA_def_property_ui_text(prop, "On Play", "Simplify Grease Pencil only when play animation"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_simplify_view_fill", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_VIEW_FILL); | |||||
| RNA_def_property_ui_text(prop, "Fill", "Do not fill strokes on viewport"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_simplify_remove_lines", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_REMOVE_LINE); | |||||
| RNA_def_property_ui_text(prop, "Remove Lines", "Remove External Lines of Filling Strokes"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_simplify_view_modifier", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_VIEW_MODIF); | |||||
| RNA_def_property_ui_text(prop, "Fill", "Do not apply modifiers on viewport"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_simplify_view_vfx", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_VIEW_VFX); | |||||
| RNA_def_property_ui_text(prop, "Fill", "Do not apply VFX modifiers on viewport"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_disable_fast_drawing", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_DISABLE_FAST_DRAWING); | |||||
| RNA_def_property_ui_text(prop, "Disable Fast Drawing", "Disable fast drawing while painting"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| /* Auto Keying */ | /* Auto Keying */ | ||||
| prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON); | RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON); | ||||
| Context not available. | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data-block"); | RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data-block"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | ||||
| prop = RNA_def_property(srna, "gpencil_object", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "gp_object"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_GPencil_object_poll"); | |||||
| RNA_def_property_ui_text(prop, "GPencil Object", "Grease Pencil object where scene annotations are stored by default"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | NA_EDITED, NULL); | |||||
| /* active MovieClip */ | /* active MovieClip */ | ||||
| prop = RNA_def_property(srna, "active_clip", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active_clip", PROP_POINTER, PROP_NONE); | ||||
| Context not available. | |||||