[Bf-blender-cvs] [152d2c5184b] lanpr-under-gp: Merge remote-tracking branch 'origin/master' into lanpr-under-gp
YimingWu
noreply at git.blender.org
Thu Jul 2 07:34:47 CEST 2020
Commit: 152d2c5184b8d615e08933a41878dd780e29ca77
Author: YimingWu
Date: Thu Jul 2 12:52:08 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB152d2c5184b8d615e08933a41878dd780e29ca77
Merge remote-tracking branch 'origin/master' into lanpr-under-gp
# Conflicts:
# source/blender/makesrna/intern/rna_object.c
===================================================================
===================================================================
diff --cc source/blender/makesrna/intern/rna_object.c
index 2b39281d8eb,089410ffd25..8bbd969d7d5
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@@ -2548,111 -2554,9 +2554,113 @@@ static void rna_def_object_display(Blen
RNA_def_property_boolean_default(prop, true);
RNA_def_property_ui_text(prop, "Shadow", "Object cast shadows in the 3d viewport");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+
+ RNA_define_lib_overridable(false);
}
+static void rna_def_object_lineart(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "ObjectLineartLineType", NULL);
+ RNA_def_struct_ui_text(srna, "Object Line Art Line Type", "Object lineart line type");
+ RNA_def_struct_sdna(srna, "ObjectLineartLineType");
+
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Use", "Use this line type");
+
+ prop = RNA_def_property(srna, "layer", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "target_layer");
+ RNA_def_property_ui_text(prop, "Layer", "Grease Pencil layer to put the results into");
+
+ prop = RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "target_material");
+ RNA_def_property_ui_text(
+ prop, "Material", "Grease Pencil material to use to generate the results");
+
+ static EnumPropertyItem prop_feature_line_usage_items[] = {
+ {OBJECT_FEATURE_LINE_INHERENT,
+ "INHEREIT",
+ 0,
+ "Inhereit",
+ "Follow settings from the parent collection"},
+ {OBJECT_FEATURE_LINE_INCLUDE,
+ "INCLUDE",
+ 0,
+ "Include",
+ "Include this object into LRT calculation"},
+ {OBJECT_FEATURE_LINE_OCCLUSION_ONLY,
+ "OCCLUSION_ONLY",
+ 0,
+ "Occlusion Only",
+ "Don't produce lines, only used as occlusion object"},
+ {OBJECT_FEATURE_LINE_EXCLUDE,
+ "EXCLUDE",
+ 0,
+ "Exclude",
+ "Don't use this object for LRT rendering"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ srna = RNA_def_struct(brna, "ObjectLineart", NULL);
+ RNA_def_struct_ui_text(srna, "Object Line Art", "Object lineart settings");
+ RNA_def_struct_sdna(srna, "ObjectLineart");
+
+ prop = RNA_def_property(srna, "usage", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_feature_line_usage_items);
+ RNA_def_property_ui_text(prop, "Usage", "How to use this object");
+
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "target");
+ RNA_def_property_ui_text(prop, "Target", "GPencil object to put the stroke result");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_GPencil_object_poll");
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
+
+ prop = RNA_def_property(srna, "replace", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_LINE_LAYER_REPLACE_STROKES);
+ RNA_def_property_ui_text(prop, "Replace", "Replace existing GP frames");
+
+ prop = RNA_def_property(srna, "target_layer", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Layer", "Grease Pencil layer to put the results into");
+
+ prop = RNA_def_property(srna, "target_material", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(
+ prop, "Material", "Grease Pencil material to use to generate the results");
+
+ prop = RNA_def_property(srna, "use_same_style", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_LINE_LAYER_USE_SAME_STYLE);
+ RNA_def_property_ui_text(prop, "Same Style", "Use same style for different line types");
+
+ prop = RNA_def_property(srna, "contour", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ObjectLineartLineType");
+ RNA_def_property_ui_text(prop, "Contour", "Contour line type");
+
+ prop = RNA_def_property(srna, "crease", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ObjectLineartLineType");
+ RNA_def_property_ui_text(prop, "Crease", "Creaseline type");
+
+ prop = RNA_def_property(srna, "edge_mark", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ObjectLineartLineType");
+ RNA_def_property_ui_text(prop, "Edge Mark", "Edge mark line type");
+
+ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ObjectLineartLineType");
+ RNA_def_property_ui_text(prop, "Material", "Material separate line type");
+
+ prop = RNA_def_property(srna, "use_multiple_levels", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_LINE_LAYER_USE_MULTIPLE_LEVELS);
+ RNA_def_property_ui_text(prop, "Multiple Levels", "Use multiple occlusion levels");
+
+ prop = RNA_def_property(srna, "level_start", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 0, 255);
+ RNA_def_property_ui_range(prop, 0, 255, 1, -1);
+ RNA_def_property_ui_text(prop, "Level Start", "Occlusion level start");
+
+ prop = RNA_def_property(srna, "level_end", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 0, 255);
+ RNA_def_property_ui_range(prop, 0, 255, 1, -1);
+ RNA_def_property_ui_text(prop, "Level End", "Occlusion level end");
+}
static void rna_def_object(BlenderRNA *brna)
{
@@@ -3412,11 -3317,14 +3421,19 @@@
RNA_def_property_pointer_funcs(prop, "rna_Object_display_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Object Display", "Object display settings for 3d viewport");
+ /* Line Art */
+ prop = RNA_def_property(srna, "lineart", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ObjectLineart");
+ RNA_def_property_ui_text(prop, "LRT", "LRT settings for the object");
+
+ RNA_define_lib_overridable(false);
+
+ /* anim */
+ rna_def_animdata_common(srna);
+
+ rna_def_animviz_common(srna);
+ rna_def_motionpath_common(srna);
+
RNA_api_object(srna);
}
More information about the Bf-blender-cvs
mailing list