diff options
Diffstat (limited to 'source')
5 files changed, 29 insertions, 28 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index a109c5d8d88..dcdf2f48607 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -155,7 +155,6 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id) { BLI_assert(id->session_uuid != MAIN_ID_SESSION_UUID_UNSET); - const ID_Type id_type = GS(id->name); IDNode *id_node = nullptr; ID *id_cow = nullptr; IDComponentsMask previously_visible_components_mask = 0; @@ -174,8 +173,10 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id) id_node->previously_visible_components_mask = previously_visible_components_mask; id_node->previous_eval_flags = previous_eval_flags; id_node->previous_customdata_masks = previous_customdata_masks; - /* NOTE: Zero number of components indicates that ID node was just created. */ - if (id_node->components.is_empty() && deg_copy_on_write_is_needed(id_type)) { + /* Currently all ID nodes are supposed to have copy-on-write logic. + * + * NOTE: Zero number of components indicates that ID node was just created. */ + if (id_node->components.is_empty()) { ComponentNode *comp_cow = id_node->add_component(NodeType::COPY_ON_WRITE); OperationNode *op_cow = comp_cow->add_operation( function_bind(deg_evaluate_copy_on_write, _1, id_node), diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index dff2f427f27..bdd5c96e166 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2788,13 +2788,7 @@ void DepsgraphRelationBuilder::build_nested_shapekey(ID *owner, Key *key) void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node) { ID *id_orig = id_node->id_orig; - const ID_Type id_type = GS(id_orig->name); - - if (!deg_copy_on_write_is_needed(id_type)) { - return; - } - TimeSourceKey time_source_key; OperationKey copy_on_write_key(id_orig, NodeType::COPY_ON_WRITE, OperationCode::COPY_ON_WRITE); /* XXX: This is a quick hack to make Alt-A to work. */ diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 1ef14f549e4..4f70d68f495 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -3199,6 +3199,7 @@ void ui_but_range_set_soft(uiBut *but) if (but->rnaprop) { const PropertyType type = RNA_property_type(but->rnaprop); + const PropertySubType subtype = RNA_property_subtype(but->rnaprop); double softmin, softmax /*, step, precision*/; double value_min; double value_max; @@ -3222,7 +3223,7 @@ void ui_but_range_set_soft(uiBut *but) value_max = (double)value_range[1]; } else { - value_min = value_max = (double)RNA_property_int_get(&but->rnapoin, but->rnaprop); + value_min = value_max = ui_but_value_get(but); } } else if (type == PROP_FLOAT) { @@ -3235,14 +3236,15 @@ void ui_but_range_set_soft(uiBut *but) /*step = fstep;*/ /*UNUSED*/ /*precision = fprecision;*/ /*UNUSED*/ - if (is_array) { + /* Use shared min/max for array values, except for color alpha. */ + if (is_array && !(subtype == PROP_COLOR && but->rnaindex == 3)) { float value_range[2]; RNA_property_float_get_array_range(&but->rnapoin, but->rnaprop, value_range); value_min = (double)value_range[0]; value_max = (double)value_range[1]; } else { - value_min = value_max = (double)RNA_property_float_get(&but->rnapoin, but->rnaprop); + value_min = value_max = ui_but_value_get(but); } } else { diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index a4dcc677035..a5a73d9d8ca 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -494,22 +494,6 @@ static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_no_bo {0, NULL, 0, NULL, NULL}, }; -static const EnumPropertyItem rna_node_geometry_object_info_transform_space_items[] = { - {GEO_NODE_TRANSFORM_SPACE_ORIGINAL, - "ORIGINAL", - 0, - "Original", - "Output the geometry relative to the input object transform, and the location, rotation and " - "scale relative to the world origin"}, - {GEO_NODE_TRANSFORM_SPACE_RELATIVE, - "RELATIVE", - 0, - "Relative", - "Bring the input object geometry, location, rotation and scale into the modified object, " - "maintaining the relative position between the two objects in the scene"}, - {0, NULL, 0, NULL, NULL}, -}; - #endif #undef ITEM_ATTRIBUTE @@ -8870,6 +8854,23 @@ static void def_geo_object_info(StructRNA *srna) { PropertyRNA *prop; + static const EnumPropertyItem rna_node_geometry_object_info_transform_space_items[] = { + {GEO_NODE_TRANSFORM_SPACE_ORIGINAL, + "ORIGINAL", + 0, + "Original", + "Output the geometry relative to the input object transform, and the location, rotation " + "and " + "scale relative to the world origin"}, + {GEO_NODE_TRANSFORM_SPACE_RELATIVE, + "RELATIVE", + 0, + "Relative", + "Bring the input object geometry, location, rotation and scale into the modified object, " + "maintaining the relative position between the two objects in the scene"}, + {0, NULL, 0, NULL, NULL}, + }; + RNA_def_struct_sdna_from(srna, "NodeGeometryObjectInfo", "storage"); prop = RNA_def_property(srna, "transform_space", PROP_ENUM, PROP_NONE); diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc index 7549305aedb..384094b6d8c 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc @@ -163,6 +163,9 @@ static void fill_new_attribute(Span<const GeometryComponent *> src_components, int offset = 0; for (const GeometryComponent *component : src_components) { const int domain_size = component->attribute_domain_size(domain); + if (domain_size == 0) { + continue; + } ReadAttributePtr read_attribute = component->attribute_get_for_read( attribute_name, domain, data_type, nullptr); |