Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| if (value != 0) { | if (value != 0) { | ||||
| ts->snap_mode = value; | ts->snap_mode = value; | ||||
| } | } | ||||
| } | } | ||||
| /* Grease Pencil update cache */ | /* Grease Pencil update cache */ | ||||
| static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) | static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| ED_gpencil_tag_scene_gpencil(scene); | /* mark all grease pencil datablocks of the scene */ | ||||
| FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) { | |||||
| FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (collection, ob) { | |||||
| if (ob->type == OB_GPENCIL) { | |||||
| bGPdata *gpd = (bGPdata *)ob->data; | |||||
| gpd->flag |= GP_DATA_CACHE_IS_DIRTY; | |||||
| DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); | |||||
| } | |||||
| } | |||||
| FOREACH_COLLECTION_OBJECT_RECURSIVE_END; | |||||
| } | |||||
| FOREACH_SCENE_COLLECTION_END; | |||||
| 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"); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| RNA_def_property_struct_type(prop, "CurvePaintSettings"); | RNA_def_property_struct_type(prop, "CurvePaintSettings"); | ||||
| RNA_def_property_ui_text(prop, "Curve Paint Settings", NULL); | RNA_def_property_ui_text(prop, "Curve Paint Settings", NULL); | ||||
| /* Mesh Statistics */ | /* Mesh Statistics */ | ||||
| prop = RNA_def_property(srna, "statvis", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "statvis", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| RNA_def_property_struct_type(prop, "MeshStatVis"); | RNA_def_property_struct_type(prop, "MeshStatVis"); | ||||
| RNA_def_property_ui_text(prop, "Mesh Statistics Visualization", NULL); | RNA_def_property_ui_text(prop, "Mesh Statistics Visualization", NULL); | ||||
| /* ProfileWidget */ | |||||
| prop = RNA_def_property(srna, "prwdgt", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "prwdgt"); | |||||
| RNA_def_property_struct_type(prop, "ProfileWidget"); | |||||
| RNA_def_property_ui_text(prop, "Profile Widget", "Used for defining a profile's path"); | |||||
| } | } | ||||
| static void rna_def_unified_paint_settings(BlenderRNA *brna) | static void rna_def_unified_paint_settings(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem brush_size_unit_items[] = { | static const EnumPropertyItem brush_size_unit_items[] = { | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| RNA_def_property_ui_text(prop, "Simplify Shaders", "Do not apply shader fx"); | RNA_def_property_ui_text(prop, "Simplify Shaders", "Do not apply shader fx"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | ||||
| prop = RNA_def_property(srna, "simplify_gpencil_blend", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "simplify_gpencil_blend", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_BLEND); | RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_BLEND); | ||||
| RNA_def_property_ui_text(prop, "Layers Blending", "Do not display blend layers"); | RNA_def_property_ui_text(prop, "Layers Blending", "Do not display blend layers"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); | ||||
| prop = RNA_def_property(srna, "simplify_gpencil_tint", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_TINT); | |||||
| RNA_def_property_ui_text(prop, "Layers Tinting", "Do not display layer tint"); | |||||
| 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( | RNA_def_property_ui_text( | ||||
| prop, "Persistent Data", "Keep render data around for faster re-renders"); | 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 */ | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||