Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 432 Lines • ▼ Show 20 Lines | static const EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = { | ||||
| {GP_IPO_BOUNCE, "BOUNCE", ICON_IPO_BOUNCE, "Bounce", "Exponentially decaying parabolic bounce, like when objects collide"}, | {GP_IPO_BOUNCE, "BOUNCE", ICON_IPO_BOUNCE, "Bounce", "Exponentially decaying parabolic bounce, like when objects collide"}, | ||||
| {GP_IPO_ELASTIC, "ELASTIC", ICON_IPO_ELASTIC, "Elastic", "Exponentially decaying sine wave, like an elastic band"}, | {GP_IPO_ELASTIC, "ELASTIC", ICON_IPO_ELASTIC, "Elastic", "Exponentially decaying sine wave, like an elastic band"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| #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 } | |||||
| }; | |||||
| const EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = { | const EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = { | ||||
| {COLLECTION_MODE_OBJECT, "OBJECT", 0, "Object", ""}, | {COLLECTION_MODE_OBJECT, "OBJECT", 0, "Object", ""}, | ||||
| {COLLECTION_MODE_EDIT, "EDIT", 0, "Edit", ""}, | {COLLECTION_MODE_EDIT, "EDIT", 0, "Edit", ""}, | ||||
| {COLLECTION_MODE_PAINT_WEIGHT, "PAINT_WEIGHT", 0, "Weight Paint", ""}, | {COLLECTION_MODE_PAINT_WEIGHT, "PAINT_WEIGHT", 0, "Weight Paint", ""}, | ||||
| {COLLECTION_MODE_PAINT_WEIGHT, "PAINT_VERTEX", 0, "Vertex Paint", ""}, | {COLLECTION_MODE_PAINT_WEIGHT, "PAINT_VERTEX", 0, "Vertex Paint", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_build.h" | #include "DEG_depsgraph_build.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #ifdef WITH_FREESTYLE | #ifdef WITH_FREESTYLE | ||||
| #include "FRS_freestyle.h" | #include "FRS_freestyle.h" | ||||
| #endif | #endif | ||||
| /* Grease Pencil update cache */ | |||||
| static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | |||||
| { | |||||
| BKE_gpencil_batch_cache_alldirty(); | |||||
| 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)) | ||||
| { | { | ||||
| return BLI_strdup("tool_settings.gpencil_interpolate"); | return BLI_strdup("tool_settings.gpencil_interpolate"); | ||||
| } | } | ||||
| static void rna_GPencilInterpolateSettings_type_set(PointerRNA *ptr, int value) | static void rna_GPencilInterpolateSettings_type_set(PointerRNA *ptr, int value) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | static void rna_GPencilBrush_name_set(PointerRNA *ptr, const char *value) | ||||
| bGPDbrush *brush = ptr->data; | bGPDbrush *brush = ptr->data; | ||||
| /* copy the new name into the name slot */ | /* copy the new name into the name slot */ | ||||
| BLI_strncpy_utf8(brush->info, value, sizeof(brush->info)); | BLI_strncpy_utf8(brush->info, value, sizeof(brush->info)); | ||||
| 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)); | ||||
| } | } | ||||
| /* Dynamic Enums of GP Brushes */ | |||||
| static const EnumPropertyItem *rna_GPencilBrush_enum_itemf( | |||||
| bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), | |||||
| bool *r_free) | |||||
| { | |||||
| ToolSettings *ts = ((Scene *)ptr->id.data)->toolsettings; | |||||
| bGPDbrush *brush; | |||||
| EnumPropertyItem *item = NULL, item_tmp = { 0 }; | |||||
| int totitem = 0; | |||||
| int i = 0; | |||||
| if (ELEM(NULL, ts)) { | |||||
| 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; | |||||
| item_tmp.icon = ICON_BRUSH_DATA; | |||||
| 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)) | ||||
| { | { | ||||
| ED_space_image_uv_sculpt_update(bmain->wm.first, scene); | ED_space_image_uv_sculpt_update(bmain->wm.first, scene); | ||||
| } | } | ||||
| static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr) | static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr) | ||||
| ▲ Show 20 Lines • Show All 2,526 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_brush(BlenderRNA *brna) | ||||
| RNA_def_property_string_funcs(prop, NULL, NULL, "rna_GPencilBrush_name_set"); | RNA_def_property_string_funcs(prop, NULL, NULL, "rna_GPencilBrush_name_set"); | ||||
| RNA_def_struct_name_property(srna, prop); | RNA_def_struct_name_property(srna, prop); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* 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, 300); | ||||
| RNA_def_property_ui_range(prop, 1, 10, 1, 0); | RNA_def_property_ui_range(prop, 1, 100, 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); | ||||
| /* Sensitivity factor for new strokes */ | /* Sensitivity factor for new strokes */ | ||||
| prop = RNA_def_property(srna, "pen_sensitivity_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "pen_sensitivity_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "draw_sensitivity"); | RNA_def_property_float_sdna(prop, NULL, "draw_sensitivity"); | ||||
| RNA_def_property_range(prop, 0.1f, 3.0f); | RNA_def_property_range(prop, 0.1f, 3.0f); | ||||
| RNA_def_property_ui_text(prop, "Sensitivity", "Pressure sensitivity factor for new strokes"); | RNA_def_property_ui_text(prop, "Sensitivity", "Pressure sensitivity factor for new strokes"); | ||||
| ▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_brush(BlenderRNA *brna) | ||||
| 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_random_strength", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_random_strength", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_RANDOM_STRENGTH); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_RANDOM_STRENGTH); | ||||
| RNA_def_property_ui_icon(prop, ICON_PARTICLES, 0); | RNA_def_property_ui_icon(prop, ICON_PARTICLES, 0); | ||||
| 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); | ||||
| /* 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"); | |||||
| } | } | ||||
| /* Grease Pencil Drawing Brushes API */ | /* Grease Pencil Drawing Brushes API */ | ||||
| static void rna_def_gpencil_brushes(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_gpencil_brushes(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | static const EnumPropertyItem gpencil_source_3d_items[] = { | ||||
| "unless the active object already has Grease Pencil data (i.e. for old files)"}, | "unless the active object already has Grease Pencil data (i.e. for old files)"}, | ||||
| {GP_TOOL_SOURCE_OBJECT, "OBJECT", 0, "Object", | {GP_TOOL_SOURCE_OBJECT, "OBJECT", 0, "Object", | ||||
| "Grease Pencil data-blocks attached to the active object are used " | "Grease Pencil data-blocks attached to the active object are used " | ||||
| "(required when using pre 2.73 add-ons, e.g. BSurfaces)"}, | "(required when using pre 2.73 add-ons, e.g. BSurfaces)"}, | ||||
| {0, NULL, 0, NULL, NULL} | {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} | ||||
| }; | }; | ||||
| srna = RNA_def_struct(brna, "ToolSettings", NULL); | srna = RNA_def_struct(brna, "ToolSettings", NULL); | ||||
| RNA_def_struct_path_func(srna, "rna_ToolSettings_path"); | RNA_def_struct_path_func(srna, "rna_ToolSettings_path"); | ||||
| RNA_def_struct_ui_text(srna, "Tool Settings", ""); | RNA_def_struct_ui_text(srna, "Tool Settings", ""); | ||||
| ▲ Show 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | RNA_def_property_ui_text(prop, "Draw Strokes on Back", | ||||
| "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); | 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_bitflag_sdna(prop, NULL, "gpencil_src"); | ||||
| RNA_def_property_enum_items(prop, gpencil_source_3d_items); | RNA_def_property_enum_items(prop, gpencil_source_3d_items); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil Source", | RNA_def_property_ui_text(prop, "Grease Pencil Source", | ||||
| "Data-block where active Grease Pencil data is found from"); | "Data-block where active Grease Pencil data is found from"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS | NC_GPENCIL | ND_DATA | ND_SPACE_PROPERTIES, 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"); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil Sculpt", | RNA_def_property_ui_text(prop, "Grease Pencil Sculpt", | ||||
| "Settings for stroke sculpting tools and brushes"); | "Settings for stroke sculpting tools and brushes"); | ||||
| prop = RNA_def_property(srna, "gpencil_interpolate", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "gpencil_interpolate", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "gp_interpolate"); | RNA_def_property_pointer_sdna(prop, NULL, "gp_interpolate"); | ||||
| RNA_def_property_struct_type(prop, "GPencilInterpolateSettings"); | RNA_def_property_struct_type(prop, "GPencilInterpolateSettings"); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil Interpolate", | RNA_def_property_ui_text(prop, "Grease Pencil Interpolate", | ||||
| "Settings for Grease Pencil Interpolation tools"); | "Settings for Grease Pencil Interpolation tools"); | ||||
| /* Grease Pencil - Drawing brushes */ | /* Grease Pencil - Drawing brushes */ | ||||
| prop = RNA_def_property(srna, "gpencil_brushes", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "gpencil_brushes", PROP_COLLECTION, PROP_NONE); | ||||
| RNA_def_property_collection_sdna(prop, NULL, "gp_brushes", NULL); | RNA_def_property_collection_sdna(prop, NULL, "gp_brushes", NULL); | ||||
| RNA_def_property_struct_type(prop, "GPencilBrush"); | RNA_def_property_struct_type(prop, "GPencilBrush"); | ||||
| 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"); | ||||
| RNA_def_property_enum_items(prop, gpencil_stroke_placement_items); | RNA_def_property_enum_items(prop, gpencil_stroke_placement_items); | ||||
| RNA_def_property_ui_text(prop, "Stroke Placement (3D View)", ""); | RNA_def_property_ui_text(prop, "Stroke Placement (3D View)", ""); | ||||
| 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_gpencil_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_gpencil_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); | ||||
| Show All 17 Lines | static void rna_def_tool_settings(BlenderRNA *brna) | ||||
| /* Grease Pencil - Image Editor Stroke Placement */ | /* Grease Pencil - Image Editor Stroke Placement */ | ||||
| prop = RNA_def_property(srna, "gpencil_stroke_placement_image_editor", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "gpencil_stroke_placement_image_editor", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_ima_align"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_ima_align"); | ||||
| RNA_def_property_enum_items(prop, gpencil_stroke_placement_items); | RNA_def_property_enum_items(prop, gpencil_stroke_placement_items); | ||||
| 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_simplify_render_fill", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_RENDER_FILL); | |||||
| RNA_def_property_ui_text(prop, "Fill", "Do not fill strokes on render"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_simplify_render_modifier", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_RENDER_MODIF); | |||||
| RNA_def_property_ui_text(prop, "Fill", "Do not apply modifiers on render"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "gpencil_simplify_render_vfx", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_simplify", GP_TOOL_FLAG_SIMPLIFY_RENDER_VFX); | |||||
| RNA_def_property_ui_text(prop, "Fill", "Do not apply VFX modifiers on render"); | |||||
| 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); | ||||
| RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones"); | RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones"); | ||||
| RNA_def_property_ui_icon(prop, ICON_REC, 0); | RNA_def_property_ui_icon(prop, ICON_REC, 0); | ||||
| prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode"); | ||||
| ▲ Show 20 Lines • Show All 5,662 Lines • ▼ Show 20 Lines | void RNA_def_scene(BlenderRNA *brna) | ||||
| /* Grease Pencil */ | /* Grease Pencil */ | ||||
| prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | ||||
| RNA_def_property_struct_type(prop, "GreasePencil"); | RNA_def_property_struct_type(prop, "GreasePencil"); | ||||
| 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); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "clip"); | RNA_def_property_pointer_sdna(prop, NULL, "clip"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_struct_type(prop, "MovieClip"); | RNA_def_property_struct_type(prop, "MovieClip"); | ||||
| RNA_def_property_ui_text(prop, "Active Movie Clip", "Active movie clip used for constraints and viewport drawing"); | RNA_def_property_ui_text(prop, "Active Movie Clip", "Active movie clip used for constraints and viewport drawing"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||