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 45 Lines • ▼ Show 20 Lines | |||||
| #include "BLI_string_utils.h" | #include "BLI_string_utils.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #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" | ||||
| #include "DRW_engine.h" | #include "DRW_engine.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| ▲ Show 20 Lines • Show All 463 Lines • ▼ Show 20 Lines | |||||
| #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 *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | |||||
| { | |||||
| DEG_id_type_tag(bmain, ID_GD); | |||||
| 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) | ||||
| { | { | ||||
| GP_Interpolate_Settings *settings = (GP_Interpolate_Settings *)ptr->data; | GP_Interpolate_Settings *settings = (GP_Interpolate_Settings *)ptr->data; | ||||
| /* NOTE: This cast should be fine, as we have a small + finite set of values (eGP_Interpolate_Type) | /* NOTE: This cast should be fine, as we have a small + finite set of values (eGP_Interpolate_Type) | ||||
| * that should fit well within a char | * that should fit well within a char | ||||
| */ | */ | ||||
| settings->type = (char)value; | settings->type = (char)value; | ||||
| /* init custom interpolation curve here now the first time it's used */ | /* init custom interpolation curve here now the first time it's used */ | ||||
| if ((settings->type == GP_IPO_CURVEMAP) && | if ((settings->type == GP_IPO_CURVEMAP) && | ||||
| (settings->custom_ipo == NULL)) | (settings->custom_ipo == NULL)) | ||||
| { | { | ||||
| settings->custom_ipo = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | settings->custom_ipo = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | ||||
| } | } | ||||
| } | |||||
| /* Grease pencil Drawing Brushes */ | |||||
| static bGPDbrush *rna_GPencil_brush_new(ToolSettings *ts, const char *name, bool setactive) | |||||
| { | |||||
| bGPDbrush *brush = BKE_gpencil_brush_addnew(ts, name, setactive != 0); | |||||
| WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | |||||
| return brush; | |||||
| } | |||||
| static void rna_GPencil_brush_remove(ToolSettings *ts, ReportList *reports, PointerRNA *brush_ptr) | |||||
| { | |||||
| bGPDbrush *brush = brush_ptr->data; | |||||
| if (BLI_findindex(&ts->gp_brushes, brush) == -1) { | |||||
| BKE_report(reports, RPT_ERROR, "Brush not found in grease pencil data"); | |||||
| return; | |||||
| } | |||||
| BKE_gpencil_brush_delete(ts, brush); | |||||
| RNA_POINTER_INVALIDATE(brush_ptr); | |||||
| WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | |||||
| } | |||||
| static PointerRNA rna_GPencilBrushes_active_get(PointerRNA *ptr) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *) ptr->data; | |||||
| bGPDbrush *brush; | |||||
| for (brush = ts->gp_brushes.first; brush; brush = brush->next) { | |||||
| if (brush->flag & GP_BRUSH_ACTIVE) { | |||||
| break; | |||||
| } | |||||
| } | |||||
| if (brush) { | |||||
| return rna_pointer_inherit_refine(ptr, &RNA_GPencilBrush, brush); | |||||
| } | |||||
| return rna_pointer_inherit_refine(ptr, NULL, NULL); | |||||
| } | |||||
| static void rna_GPencilBrushes_active_set(PointerRNA *ptr, PointerRNA value) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *) ptr->data; | |||||
| bGPDbrush *brush; | |||||
| for (brush = ts->gp_brushes.first; brush; brush = brush->next) { | |||||
| if (brush == value.data) { | |||||
| brush->flag |= GP_BRUSH_ACTIVE; | |||||
| } | |||||
| else { | |||||
| brush->flag &= ~GP_BRUSH_ACTIVE; | |||||
| } | } | ||||
| } | |||||
| WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); | |||||
| } | |||||
| static int rna_GPencilBrushes_index_get(PointerRNA *ptr) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *) ptr->data; | |||||
| bGPDbrush *brush = BKE_gpencil_brush_getactive(ts); | |||||
| return BLI_findindex(&ts->gp_brushes, brush); | |||||
| } | |||||
| static void rna_GPencilBrushes_index_set(PointerRNA *ptr, int value) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *) ptr->data; | |||||
| bGPDbrush *brush = BLI_findlink(&ts->gp_brushes, value); | |||||
| BKE_gpencil_brush_setactive(ts, brush); | |||||
| WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | |||||
| } | |||||
| static void rna_GPencilBrushes_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *) ptr->data; | |||||
| *min = 0; | |||||
| *max = max_ii(0, BLI_listbase_count(&ts->gp_brushes) - 1); | |||||
| *softmin = *min; | |||||
| *softmax = *max; | |||||
| } | |||||
| static void rna_GPencilBrush_name_set(PointerRNA *ptr, const char *value) | |||||
| { | |||||
| ToolSettings *ts = ((Scene *) ptr->id.data)->toolsettings; | |||||
| bGPDbrush *brush = ptr->data; | |||||
| /* copy the new name into the name slot */ | |||||
| BLI_strncpy_utf8(brush->info, value, sizeof(brush->info)); | |||||
| BLI_uniquename(&ts->gp_brushes, brush, DATA_("GP_Brush"), '.', offsetof(bGPDbrush, info), sizeof(brush->info)); | |||||
| } | |||||
| /* ----------------- end of Grease pencil drawing brushes ------------*/ | |||||
| static void rna_ToolSettings_gizmo_flag_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) | static void rna_ToolSettings_gizmo_flag_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| ToolSettings *ts = scene->toolsettings; | ToolSettings *ts = scene->toolsettings; | ||||
| if ((ts->gizmo_flag & (SCE_MANIP_TRANSLATE | SCE_MANIP_ROTATE | SCE_MANIP_SCALE)) == 0) { | if ((ts->gizmo_flag & (SCE_MANIP_TRANSLATE | SCE_MANIP_ROTATE | SCE_MANIP_SCALE)) == 0) { | ||||
| ts->gizmo_flag |= SCE_MANIP_TRANSLATE; | ts->gizmo_flag |= SCE_MANIP_TRANSLATE; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,519 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_interpolate(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "interpolation_curve", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "interpolation_curve", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "custom_ipo"); | RNA_def_property_pointer_sdna(prop, NULL, "custom_ipo"); | ||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | RNA_def_property_struct_type(prop, "CurveMapping"); | ||||
| RNA_def_property_ui_text(prop, "Interpolation Curve", | RNA_def_property_ui_text(prop, "Interpolation Curve", | ||||
| "Custom curve to control 'sequence' interpolation between Grease Pencil frames"); | "Custom curve to control 'sequence' interpolation between Grease Pencil frames"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); | ||||
| } | } | ||||
| /* Grease Pencil Drawing Brushes */ | |||||
| static void rna_def_gpencil_brush(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "GPencilBrush", NULL); | |||||
| RNA_def_struct_sdna(srna, "bGPDbrush"); | |||||
| RNA_def_struct_ui_text(srna, "Grease Pencil Brush", | |||||
| "Collection of brushes being used to control the line style of new strokes"); | |||||
| RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA); | |||||
| /* Name */ | |||||
| prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | |||||
| RNA_def_property_string_sdna(prop, NULL, "info"); | |||||
| RNA_def_property_ui_text(prop, "Name", "Brush name"); | |||||
| RNA_def_property_string_funcs(prop, NULL, NULL, "rna_GPencilBrush_name_set"); | |||||
| RNA_def_struct_name_property(srna, prop); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Line Thickness */ | |||||
| prop = RNA_def_property(srna, "line_width", PROP_INT, PROP_PIXEL); | |||||
| RNA_def_property_int_sdna(prop, NULL, "thickness"); | |||||
| RNA_def_property_range(prop, 1, 300); | |||||
| RNA_def_property_ui_range(prop, 1, 10, 1, 0); | |||||
| RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Sensitivity factor for new strokes */ | |||||
| prop = RNA_def_property(srna, "pen_sensitivity_factor", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_sensitivity"); | |||||
| 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_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Strength factor for new strokes */ | |||||
| prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_strength"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Strength", "Color strength for new strokes (affect alpha factor of color)"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Jitter factor for new strokes */ | |||||
| prop = RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_jitter"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Jitter", "Jitter factor for new strokes"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Randomnes factor for sensitivity and strength */ | |||||
| prop = RNA_def_property(srna, "random_press", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_random_press"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Randomness", "Randomness factor for pressure and strength in new strokes"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Randomnes factor for subdivision */ | |||||
| prop = RNA_def_property(srna, "random_subdiv", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_random_sub"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Random Subdivision", "Randomness factor for new strokes after subdivision"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Angle when brush is full size */ | |||||
| prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_angle"); | |||||
| RNA_def_property_range(prop, -M_PI_2, M_PI_2); | |||||
| RNA_def_property_ui_text(prop, "Angle", | |||||
| "Direction of the stroke at which brush gives maximal thickness " | |||||
| "(0° for horizontal)"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Factor to change brush size depending of angle */ | |||||
| prop = RNA_def_property(srna, "angle_factor", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_angle_factor"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Angle Factor", | |||||
| "Reduce brush thickness by this factor when stroke is perpendicular to 'Angle' direction"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Smoothing factor for new strokes */ | |||||
| prop = RNA_def_property(srna, "pen_smooth_factor", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "draw_smoothfac"); | |||||
| RNA_def_property_range(prop, 0.0, 2.0f); | |||||
| RNA_def_property_ui_text(prop, "Smooth", | |||||
| "Amount of smoothing to apply to newly created strokes, to reduce jitter/noise"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Iterations of the Smoothing factor */ | |||||
| prop = RNA_def_property(srna, "pen_smooth_steps", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "draw_smoothlvl"); | |||||
| RNA_def_property_range(prop, 1, 3); | |||||
| RNA_def_property_ui_text(prop, "Iterations", | |||||
| "Number of times to smooth newly created strokes"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Subdivision level for new strokes */ | |||||
| prop = RNA_def_property(srna, "pen_subdivision_steps", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "sublevel"); | |||||
| RNA_def_property_range(prop, 0, 3); | |||||
| RNA_def_property_ui_text(prop, "Subdivision Steps", | |||||
| "Number of times to subdivide newly created strokes, for less jagged strokes"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Curves for pressure */ | |||||
| prop = RNA_def_property(srna, "curve_sensitivity", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "cur_sensitivity"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Curve Sensitivity", "Curve used for the sensitivity"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "curve_strength", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "cur_strength"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Curve Strength", "Curve used for the strength"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "curve_jitter", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "cur_jitter"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Curve Jitter", "Curve used for the jitter effect"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Flags */ | |||||
| 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_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use tablet pressure"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_STENGTH_PRESSURE); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure Strength", "Use tablet pressure for color strength"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_JITTER_PRESSURE); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure Jitter", "Use tablet pressure for jitter"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_random_pressure", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_RANDOM_PRESSURE); | |||||
| RNA_def_property_ui_icon(prop, ICON_PARTICLES, 0); | |||||
| RNA_def_property_ui_text(prop, "Random Pressure", "Use random value for pressure"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| 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_ui_icon(prop, ICON_PARTICLES, 0); | |||||
| RNA_def_property_ui_text(prop, "Random Strength", "Use random value for strength"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| } | |||||
| /* Grease Pencil Drawing Brushes API */ | |||||
| static void rna_def_gpencil_brushes(BlenderRNA *brna, PropertyRNA *cprop) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| FunctionRNA *func; | |||||
| PropertyRNA *parm; | |||||
| RNA_def_property_srna(cprop, "GreasePencilBrushes"); | |||||
| srna = RNA_def_struct(brna, "GreasePencilBrushes", NULL); | |||||
| RNA_def_struct_sdna(srna, "ToolSettings"); | |||||
| RNA_def_struct_ui_text(srna, "Grease Pencil Brushes", "Collection of grease pencil brushes"); | |||||
| func = RNA_def_function(srna, "new", "rna_GPencil_brush_new"); | |||||
| RNA_def_function_ui_description(func, "Add a new grease pencil brush"); | |||||
| parm = RNA_def_string(func, "name", "GPencilBrush", MAX_NAME, "Name", "Name of the brush"); | |||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | |||||
| RNA_def_boolean(func, "set_active", 0, "Set Active", "Set the newly created brush to the active brush"); | |||||
| parm = RNA_def_pointer(func, "palette", "GPencilBrush", "", "The newly created brush"); | |||||
| RNA_def_function_return(func, parm); | |||||
| func = RNA_def_function(srna, "remove", "rna_GPencil_brush_remove"); | |||||
| RNA_def_function_ui_description(func, "Remove a grease pencil brush"); | |||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | |||||
| parm = RNA_def_pointer(func, "brush", "GPencilBrush", "", "The brush to remove"); | |||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | |||||
| RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | |||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_struct_type(prop, "GPencilBrush"); | |||||
| RNA_def_property_pointer_funcs(prop, "rna_GPencilBrushes_active_get", "rna_GPencilBrushes_active_set", NULL, NULL); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_ui_text(prop, "Active Brush", "Current active brush"); | |||||
| prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); | |||||
| RNA_def_property_int_funcs(prop, | |||||
| "rna_GPencilBrushes_index_get", | |||||
| "rna_GPencilBrushes_index_set", | |||||
| "rna_GPencilBrushes_index_range"); | |||||
| RNA_def_property_ui_text(prop, "Active Brush Index", "Index of active brush"); | |||||
| } | |||||
| static void rna_def_transform_orientation(BlenderRNA *brna) | static void rna_def_transform_orientation(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "TransformOrientation", NULL); | srna = RNA_def_struct(brna, "TransformOrientation", NULL); | ||||
| prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX); | prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX); | ||||
| ▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | static void rna_def_tool_settings(BlenderRNA *brna) | ||||
| static const EnumPropertyItem vertex_group_select_items[] = { | static const EnumPropertyItem vertex_group_select_items[] = { | ||||
| {WT_VGROUP_ALL, "ALL", 0, "All", "All Vertex Groups"}, | {WT_VGROUP_ALL, "ALL", 0, "All", "All Vertex Groups"}, | ||||
| {WT_VGROUP_BONE_DEFORM, "BONE_DEFORM", 0, "Deform", "Vertex Groups assigned to Deform Bones"}, | {WT_VGROUP_BONE_DEFORM, "BONE_DEFORM", 0, "Deform", "Vertex Groups assigned to Deform Bones"}, | ||||
| {WT_VGROUP_BONE_DEFORM_OFF, "OTHER_DEFORM", 0, "Other", "Vertex Groups assigned to non Deform Bones"}, | {WT_VGROUP_BONE_DEFORM_OFF, "OTHER_DEFORM", 0, "Other", "Vertex Groups assigned to non Deform Bones"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem gpencil_source_3d_items[] = { | static const EnumPropertyItem gpencil_stroke_placement_items[] = { | ||||
| {GP_TOOL_SOURCE_SCENE, "SCENE", 0, "Scene", | {GP_PROJECT_VIEWSPACE, "ORIGIN", ICON_OBJECT_ORIGIN, "Origin", "Draw stroke at Object origin"}, | ||||
| "Grease Pencil data attached to the current scene is used, " | {GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Draw stroke at 3D cursor location" }, | ||||
| "unless the active object already has Grease Pencil data (i.e. for old files)"}, | // {0, "VIEW", ICON_VISIBLE_IPO_ON, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */ | ||||
| {GP_TOOL_SOURCE_OBJECT, "OBJECT", 0, "Object", | {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", ICON_FACESEL, "Surface", "Stick stroke to surfaces"}, | ||||
| "Grease Pencil data-blocks attached to the active object are used " | //{GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_STROKE, "STROKE", ICON_GREASEPENCIL, "Stroke", "Stick stroke to other strokes"}, | ||||
| "(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 annotation_stroke_placement_items[] = { | ||||
| {GP_PROJECT_VIEWSPACE, "CURSOR", 0, "Cursor", "Draw stroke at the 3D cursor"}, | {GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Draw stroke at 3D cursor location" }, | ||||
| {0, "VIEW", 0, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */ | {0, "VIEW", ICON_VISIBLE_IPO_ON, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */ | ||||
| {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", 0, "Surface", "Stick stroke to surfaces"}, | {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", ICON_FACESEL, "Surface", "Stick stroke to surfaces"}, | ||||
| {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_STROKE, "STROKE", 0, "Stroke", "Stick stroke to other strokes"}, | {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 All 27 Lines | static void rna_def_tool_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "vertex_group_subset", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_subset", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); | RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "vgroupsubset"); | RNA_def_property_enum_sdna(prop, NULL, "vgroupsubset"); | ||||
| RNA_def_property_enum_items(prop, vertex_group_select_items); | RNA_def_property_enum_items(prop, vertex_group_select_items); | ||||
| RNA_def_property_ui_text(prop, "Subset", "Filter Vertex groups for Display"); | RNA_def_property_ui_text(prop, "Subset", "Filter Vertex groups for Display"); | ||||
| RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data"); | RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data"); | ||||
| prop = RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "vpaint"); RNA_def_property_ui_text(prop, "Vertex Paint", ""); | RNA_def_property_pointer_sdna(prop, NULL, "vpaint"); | ||||
| RNA_def_property_ui_text(prop, "Vertex Paint", ""); | |||||
| prop = RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "wpaint"); | RNA_def_property_pointer_sdna(prop, NULL, "wpaint"); | ||||
| RNA_def_property_ui_text(prop, "Weight Paint", ""); | RNA_def_property_ui_text(prop, "Weight Paint", ""); | ||||
| prop = RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "imapaint"); | RNA_def_property_pointer_sdna(prop, NULL, "imapaint"); | ||||
| RNA_def_property_ui_text(prop, "Image Paint", ""); | RNA_def_property_ui_text(prop, "Image Paint", ""); | ||||
| prop = RNA_def_property(srna, "uv_sculpt", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "uv_sculpt", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "uvsculpt"); | RNA_def_property_pointer_sdna(prop, NULL, "uvsculpt"); | ||||
| RNA_def_property_ui_text(prop, "UV Sculpt", ""); | RNA_def_property_ui_text(prop, "UV Sculpt", ""); | ||||
| prop = RNA_def_property(srna, "gpencil_paint", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "gp_paint"); | |||||
| RNA_def_property_ui_text(prop, "Grease Pencil Paint", ""); | |||||
| prop = RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "particle"); | RNA_def_property_pointer_sdna(prop, NULL, "particle"); | ||||
| RNA_def_property_ui_text(prop, "Particle Edit", ""); | RNA_def_property_ui_text(prop, "Particle Edit", ""); | ||||
| prop = RNA_def_property(srna, "use_uv_sculpt", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_uv_sculpt", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "use_uv_sculpt", 1); | RNA_def_property_boolean_sdna(prop, NULL, "use_uv_sculpt", 1); | ||||
| RNA_def_property_ui_text(prop, "UV Sculpt", "Enable brush for UV sculpting"); | RNA_def_property_ui_text(prop, "UV Sculpt", "Enable brush for UV sculpting"); | ||||
| RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0); | RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0); | ||||
| ▲ Show 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | static void rna_def_tool_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "use_gizmo_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "use_gizmo_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "gizmo_flag"); | RNA_def_property_enum_sdna(prop, NULL, "gizmo_flag"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_gizmo_items); | RNA_def_property_enum_items(prop, rna_enum_gizmo_items); | ||||
| RNA_def_property_flag(prop, PROP_ENUM_FLAG); | RNA_def_property_flag(prop, PROP_ENUM_FLAG); | ||||
| RNA_def_property_ui_text(prop, "Gizmo Mode", ""); | RNA_def_property_ui_text(prop, "Gizmo Mode", ""); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_ToolSettings_gizmo_flag_update"); | RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_ToolSettings_gizmo_flag_update"); | ||||
| /* Grease Pencil */ | /* Grease Pencil */ | ||||
| prop = RNA_def_property(srna, "use_gpencil_continuous_drawing", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON); | |||||
| RNA_def_property_ui_text(prop, "Use Continuous Drawing", | |||||
| "Allow drawing multiple strokes at a time with Grease Pencil"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* xxx: need toolbar to be redrawn... */ | |||||
| prop = RNA_def_property(srna, "use_gpencil_additive_drawing", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_gpencil_additive_drawing", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_RETAIN_LAST); | RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_RETAIN_LAST); | ||||
| RNA_def_property_ui_text(prop, "Use Additive Drawing", | RNA_def_property_ui_text(prop, "Use Additive Drawing", | ||||
| "When creating new frames, the strokes from the previous/active frame " | "When creating new frames, the strokes from the previous/active frame " | ||||
| "are included as the basis for the new one"); | "are included as the basis for the new one"); | ||||
| 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, "use_gpencil_draw_onback", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_gpencil_draw_onback", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINT_ONBACK); | RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINT_ONBACK); | ||||
| RNA_def_property_ui_text(prop, "Draw Strokes on Back", | 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, "use_gpencil_thumbnail_list", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_src"); | RNA_def_property_boolean_negative_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_THUMBNAIL_LIST); | ||||
| RNA_def_property_enum_items(prop, gpencil_source_3d_items); | RNA_def_property_ui_text(prop, "Compact List", | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil Source", | "Show compact list of color instead of thumbnails"); | ||||
| "Data-block where active Grease Pencil data is found from"); | RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); | ||||
| 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"); | ||||
| 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 */ | |||||
| prop = RNA_def_property(srna, "gpencil_brushes", PROP_COLLECTION, PROP_NONE); | |||||
| RNA_def_property_collection_sdna(prop, NULL, "gp_brushes", NULL); | |||||
| RNA_def_property_struct_type(prop, "GPencilBrush"); | |||||
| RNA_def_property_ui_text(prop, "Grease Pencil Brushes", "Grease Pencil drawing brushes"); | |||||
| rna_def_gpencil_brushes(brna, prop); | |||||
| /* 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); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "gpencil_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS); | RNA_def_property_boolean_sdna(prop, NULL, "gpencil_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS); | ||||
| RNA_def_property_ui_text(prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping"); | RNA_def_property_ui_text(prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Grease Pencil - 2D Views Stroke Placement */ | /* Annotations - 2D Views Stroke Placement */ | ||||
| prop = RNA_def_property(srna, "gpencil_stroke_placement_view2d", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "annotation_stroke_placement_view2d", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v2d_align"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v2d_align"); | ||||
| RNA_def_property_enum_items(prop, gpencil_stroke_placement_items); | RNA_def_property_enum_items(prop, annotation_stroke_placement_items); | ||||
| RNA_def_property_ui_text(prop, "Stroke Placement (2D View)", ""); | RNA_def_property_ui_text(prop, "Stroke Placement (2D View)", ""); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Grease Pencil - Sequencer Preview Stroke Placement */ | /* Annotations - Sequencer Preview Stroke Placement */ | ||||
| prop = RNA_def_property(srna, "gpencil_stroke_placement_sequencer_preview", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "annotation_stroke_placement_sequencer_preview", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_seq_align"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_seq_align"); | ||||
| RNA_def_property_enum_items(prop, gpencil_stroke_placement_items); | RNA_def_property_enum_items(prop, annotation_stroke_placement_items); | ||||
| RNA_def_property_ui_text(prop, "Stroke Placement (Sequencer Preview)", ""); | RNA_def_property_ui_text(prop, "Stroke Placement (Sequencer Preview)", ""); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Grease Pencil - Image Editor Stroke Placement */ | /* Annotations - Image Editor Stroke Placement */ | ||||
| prop = RNA_def_property(srna, "gpencil_stroke_placement_image_editor", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "annotation_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, annotation_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); | ||||
| /* Annotations - 3D View Stroke Placement */ | |||||
| /* XXX: Do we need to decouple the stroke_endpoints setting too? */ | |||||
| prop = RNA_def_property(srna, "annotation_stroke_placement_view3d", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "annotate_v3d_align"); | |||||
| RNA_def_property_enum_items(prop, annotation_stroke_placement_items); | |||||
| RNA_def_property_ui_text(prop, "Annotation Stroke Placement (3D View)", "How annotation strokes are orientated in 3D space"); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* Annotations - Stroke Thickness */ | |||||
| prop = RNA_def_property(srna, "annotation_thickness", PROP_INT, PROP_PIXEL); | |||||
| RNA_def_property_int_sdna(prop, NULL, "annotate_thickness"); | |||||
| RNA_def_property_range(prop, 1, 10); | |||||
| RNA_def_property_ui_text(prop, "Annotation Stroke Thickness", "Thickness of annotation strokes"); | |||||
| 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); | ||||
| ▲ Show 20 Lines • Show All 2,685 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level during rendering"); | RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level during rendering"); | ||||
| RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | ||||
| prop = RNA_def_property(srna, "simplify_child_particles_render", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "simplify_child_particles_render", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "simplify_particles_render"); | RNA_def_property_float_sdna(prop, NULL, "simplify_particles_render"); | ||||
| RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage during rendering"); | RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage during rendering"); | ||||
| RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | ||||
| /* Grease Pencil - Simplify Options */ | |||||
| prop = RNA_def_property(srna, "simplify_gpencil", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_ENABLE); | |||||
| 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, "simplify_gpencil_onplay", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_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, "simplify_gpencil_view_fill", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_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, "simplify_gpencil_remove_lines", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_REMOVE_FILL_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, "simplify_gpencil_view_modifier", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_MODIFIER); | |||||
| 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"); | |||||
| /* persistent data */ | /* persistent data */ | ||||
| prop = RNA_def_property(srna, "use_persistent_data", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_persistent_data", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PERSISTENT_DATA); | RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PERSISTENT_DATA); | ||||
| RNA_def_property_ui_text(prop, "Persistent Data", "Keep render data around for faster re-renders"); | RNA_def_property_ui_text(prop, "Persistent Data", "Keep render data around for faster re-renders"); | ||||
| RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update"); | RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update"); | ||||
| /* Freestyle line thickness options */ | /* Freestyle line thickness options */ | ||||
| prop = RNA_def_property(srna, "line_thickness_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "line_thickness_mode", PROP_ENUM, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 1,060 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| parm = RNA_def_string(func, "statistics", NULL, 0, "Statistics", ""); | parm = RNA_def_string(func, "statistics", NULL, 0, "Statistics", ""); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* 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_pointer_funcs(prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll"); | |||||
| 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, "Annotations", "Grease Pencil data-block used for annotations in the 3D view"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA | 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"); | ||||
| Show All 38 Lines | #endif | ||||
| prop = RNA_def_property(srna, "eevee", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "eevee", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "SceneEEVEE"); | RNA_def_property_struct_type(prop, "SceneEEVEE"); | ||||
| RNA_def_property_ui_text(prop, "EEVEE", "EEVEE settings for the scene"); | RNA_def_property_ui_text(prop, "EEVEE", "EEVEE settings for the scene"); | ||||
| /* Nestled Data */ | /* Nestled Data */ | ||||
| /* *** Non-Animated *** */ | /* *** Non-Animated *** */ | ||||
| RNA_define_animate_sdna(false); | RNA_define_animate_sdna(false); | ||||
| rna_def_tool_settings(brna); | rna_def_tool_settings(brna); | ||||
| rna_def_gpencil_brush(brna); | |||||
| rna_def_gpencil_interpolate(brna); | rna_def_gpencil_interpolate(brna); | ||||
| rna_def_unified_paint_settings(brna); | rna_def_unified_paint_settings(brna); | ||||
| rna_def_curve_paint_settings(brna); | rna_def_curve_paint_settings(brna); | ||||
| rna_def_statvis(brna); | rna_def_statvis(brna); | ||||
| rna_def_unit_settings(brna); | rna_def_unit_settings(brna); | ||||
| rna_def_scene_image_format_data(brna); | rna_def_scene_image_format_data(brna); | ||||
| rna_def_transform_orientation(brna); | rna_def_transform_orientation(brna); | ||||
| rna_def_selected_uv_element(brna); | rna_def_selected_uv_element(brna); | ||||
| Show All 14 Lines | |||||