Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c102
1 files changed, 15 insertions, 87 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 0a91d5f01bc..7d7eec6f256 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2834,7 +2834,18 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- static const EnumPropertyItem annotation_stroke_placement_items[] = {
+ static const EnumPropertyItem annotation_stroke_placement_view2d_items[] = {
+ {GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR,
+ "IMAGE",
+ ICON_IMAGE_DATA,
+ "Image",
+ "Strick stroke to the image"},
+ /* Weird, GP_PROJECT_VIEWALIGN is inverted. */
+ {0, "VIEW", ICON_RESTRICT_VIEW_ON, "View", "Stick stroke to the view"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ static const EnumPropertyItem annotation_stroke_placement_view3d_items[] = {
{GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR,
"CURSOR",
ICON_PIVOT_CURSOR,
@@ -3116,6 +3127,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Snapping", "Snap to strip edges or current frame");
RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
RNA_def_property_boolean_default(prop, true);
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* Publish message-bus. */
prop = RNA_def_property(srna, "snap_elements", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "snap_mode");
@@ -3337,30 +3349,15 @@ static void rna_def_tool_settings(BlenderRNA *brna)
/* Annotations - 2D Views Stroke Placement */
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_items(prop, annotation_stroke_placement_items);
+ RNA_def_property_enum_items(prop, annotation_stroke_placement_view2d_items);
RNA_def_property_ui_text(prop, "Stroke Placement (2D View)", "");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
- /* Annotations - Sequencer Preview Stroke Placement */
- 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_items(prop, annotation_stroke_placement_items);
- RNA_def_property_ui_text(prop, "Stroke Placement (Sequencer Preview)", "");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
-
- /* Annotations - Image Editor Stroke Placement */
- 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_items(prop, annotation_stroke_placement_items);
- RNA_def_property_ui_text(prop, "Stroke Placement (Image Editor)", "");
- 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_enum_items(prop, annotation_stroke_placement_view3d_items);
RNA_def_property_enum_default(prop, GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR);
RNA_def_property_ui_text(prop,
"Annotation Stroke Placement (3D View)",
@@ -4123,41 +4120,6 @@ void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool sce
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
}
- /* layer options */
- prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
- RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values");
- if (scene) {
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
- }
- else {
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- }
-
- prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
- RNA_def_property_ui_text(
- prop,
- "Zmask Negate",
- "For Zmask, only render what is behind solid z values instead of in front");
- if (scene) {
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
- }
- else {
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- }
-
- prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
- RNA_def_property_ui_text(
- prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking");
- if (scene) {
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- }
- else {
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- }
-
prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer");
@@ -4167,29 +4129,6 @@ void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool sce
else {
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
-
- prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
- RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)");
- if (scene) {
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- }
- else {
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- }
-
- prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
- RNA_def_property_ui_text(prop,
- "Z-Transparent",
- "Render Z-transparent faces in this layer (on top of Solid and Halos)");
- if (scene) {
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- }
- else {
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- }
-
prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer");
@@ -4210,17 +4149,6 @@ void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool sce
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
- prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
- RNA_def_property_ui_text(
- prop, "Edge", "Render edge-enhance in this layer (only works for solid faces)");
- if (scene) {
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- }
- else {
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- }
-
prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer");