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 706 Lines • ▼ Show 20 Lines | static void rna_ToolSettings_snap_mode_set(struct PointerRNA *ptr, int value) | ||||
| 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)) | ||||
| { | { | ||||
| /* mark all grease pencil datablocks of the scene */ | ED_gpencil_tag_scene_gpencil(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 5,599 Lines • ▼ Show 20 Lines | # endif | ||||
| 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 1,328 Lines • Show Last 20 Lines | |||||