From d40c39fca0fc3b87d852f672844687eb824c3d42 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 20 Jul 2020 18:43:21 +0200 Subject: Cycles: adjust Sky texture intensity to follow physical units The sky will appear brighter than before by default. To compensate for this, lower exposure in the Film panel. The default altitude was also changed from 90 to 15 degrees. Patch contributed by Marco with the help of Ryan Jones. Differential Revision: https://developer.blender.org/D8285 --- source/blender/makesrna/intern/rna_nodetree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 332108facb3..6f0192bb810 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4448,7 +4448,7 @@ static void def_sh_tex_sky(StructRNA *srna) RNA_def_property_update(prop, 0, "rna_ShaderNode_socket_update"); prop = RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_ANGLE); - RNA_def_property_ui_text(prop, "Sun Size", "Size of sun disc (angular diameter)"); + RNA_def_property_ui_text(prop, "Sun Size", "Size of sun disc"); RNA_def_property_range(prop, 0.0f, M_PI_2); RNA_def_property_float_default(prop, DEG2RADF(0.545)); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -4460,7 +4460,7 @@ static void def_sh_tex_sky(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "sun_elevation", PROP_FLOAT, PROP_ANGLE); - RNA_def_property_ui_text(prop, "Sun Elevation", "Angle between sun and horizon"); + RNA_def_property_ui_text(prop, "Sun Elevation", "Sun angle from horizon"); RNA_def_property_range(prop, -M_PI_2, M_PI_2); RNA_def_property_float_default(prop, M_PI_2); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -4471,25 +4471,25 @@ static void def_sh_tex_sky(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "altitude", PROP_FLOAT, PROP_NONE); - RNA_def_property_ui_text(prop, "Altitude", "Height from sea level in km"); + RNA_def_property_ui_text(prop, "Altitude", "Height from sea level"); RNA_def_property_range(prop, 0.0f, 60.0f); RNA_def_property_float_default(prop, 0.0f); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "air_density", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_ui_text(prop, "Air", "Density of air molecules (Rayleigh scattering)"); + RNA_def_property_ui_text(prop, "Air", "Density of air molecules"); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_float_default(prop, 1.0f); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "dust_density", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_ui_text(prop, "Dust", "Density of dust and water molecules (Mie scattering)"); + RNA_def_property_ui_text(prop, "Dust", "Density of dust molecules and water droplets"); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_float_default(prop, 1.0f); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "ozone_density", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_ui_text(prop, "Ozone", "Density of Ozone layer (Ozone absorption)"); + RNA_def_property_ui_text(prop, "Ozone", "Density of Ozone layer"); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_float_default(prop, 1.0f); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); -- cgit v1.2.3 From 634585aa6875f9e6e8a2e43e283f9d530764a094 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 23 Jul 2020 12:09:28 +0200 Subject: Simulation: add depsgraph relations for ids referenced by node tree I'll really have to refactor `ntreeUpdateTree` soon to avoid scanning all node trees multiple times. --- source/blender/makesrna/intern/rna_nodetree.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 6f0192bb810..0359b2ed959 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -38,6 +38,7 @@ #include "BKE_animsys.h" #include "BKE_image.h" #include "BKE_node.h" +#include "BKE_simulation.h" #include "BKE_texture.h" #include "RNA_access.h" @@ -2848,6 +2849,14 @@ static void rna_NodeSocketStandard_value_update(struct bContext *C, PointerRNA * } } +static void rna_NodeSocketStandard_value_and_relation_update(struct bContext *C, PointerRNA *ptr) +{ + rna_NodeSocketStandard_value_update(C, ptr); + bNodeTree *ntree = (bNodeTree *)ptr->owner_id; + Main *bmain = CTX_data_main(C); + ntreeUpdateTree(bmain, ntree); +} + /* ******** Node Types ******** */ static void rna_NodeInternalSocketTemplate_name_get(PointerRNA *ptr, char *value) @@ -8862,7 +8871,8 @@ static void rna_def_node_socket_object(BlenderRNA *brna, RNA_def_property_pointer_sdna(prop, NULL, "value"); RNA_def_property_struct_type(prop, "Object"); RNA_def_property_ui_text(prop, "Default Value", "Input value used for unconnected socket"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketStandard_value_update"); + RNA_def_property_update( + prop, NC_NODE | NA_EDITED, "rna_NodeSocketStandard_value_and_relation_update"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT | PROP_CONTEXT_UPDATE); /* socket interface */ @@ -8896,7 +8906,8 @@ static void rna_def_node_socket_image(BlenderRNA *brna, RNA_def_property_pointer_sdna(prop, NULL, "value"); RNA_def_property_struct_type(prop, "Image"); RNA_def_property_ui_text(prop, "Default Value", "Input value used for unconnected socket"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketStandard_value_update"); + RNA_def_property_update( + prop, NC_NODE | NA_EDITED, "rna_NodeSocketStandard_value_and_relation_update"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT | PROP_CONTEXT_UPDATE); /* socket interface */ -- cgit v1.2.3 From 9306037ed3d14a7afce607738f83c8b9968d478d Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Mon, 27 Jul 2020 15:03:23 +0300 Subject: Node Groups: expose the SOCK_HIDE_VALUE flag for node group inputs. This flag specifies that even when the socket is not connected, the node should not display the input field for the constant input value. This is useful for inputs like Normal, which have special handling for the missing input case and don't use a constant value. Currently there is no way to change this flag from Python, and through UI it can only be done by re-creating the socket. This patch exposes the flag through RNA and UI, makes sure it is properly updated when changed, and adds special handling to ensure that it is correctly set when creating a node group from a node set that includes reroute nodes. Differential Revision: https://developer.blender.org/D8395 --- source/blender/makesrna/intern/rna_nodetree.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 6f0192bb810..3eb2c15c053 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -8466,6 +8466,12 @@ static void rna_def_node_socket_interface(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Is Output", "True if the socket is an output, otherwise input"); + prop = RNA_def_property(srna, "hide_value", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_HIDE_VALUE); + RNA_def_property_ui_text( + prop, "Hide Value", "Hide the socket input value even when the socket is not connected"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketInterface_update"); + /* registration */ prop = RNA_def_property(srna, "bl_socket_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname"); -- cgit v1.2.3 From 91be94d465ebeebb39bd87ab48761054118ed571 Mon Sep 17 00:00:00 2001 From: Yevgeny Makarov Date: Thu, 6 Aug 2020 14:48:47 +0200 Subject: UI: Fixes and small improvements to some labels and UI messages Small tweaks to make labels and texts more correct, consistent and polished. Reviewed by: Aaron Carlisle, Julian Eisel Differential Revision: https://developer.blender.org/D8346 --- source/blender/makesrna/intern/rna_nodetree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 95ea9eced1a..af07185ab4a 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -6504,7 +6504,7 @@ static void def_cmp_channel_matte(StructRNA *srna) static const EnumPropertyItem algorithm_items[] = { {0, "SINGLE", 0, "Single", "Limit by single channel"}, - {1, "MAX", 0, "Max", "Limit by max of other channels "}, + {1, "MAX", 0, "Max", "Limit by max of other channels"}, {0, NULL, 0, NULL, NULL}, }; @@ -9927,7 +9927,7 @@ static void rna_def_composite_nodetree(BlenderRNA *brna) prop = RNA_def_property(srna, "use_viewer_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_VIEWER_BORDER); RNA_def_property_ui_text( - prop, "Viewer Border", "Use boundaries for viewer nodes and composite backdrop"); + prop, "Viewer Region", "Use boundaries for viewer nodes and composite backdrop"); RNA_def_property_update(prop, NC_NODE | ND_DISPLAY, "rna_NodeTree_update"); } -- cgit v1.2.3