Merge branch 'blender-v4.1-release'
This commit is contained in:
commit
68c5e35be1
|
@ -106,7 +106,6 @@ static void add_attributes_to_text_cache(bke::AttributeAccessor attribute_access
|
|||
|
||||
static void add_instance_attributes_to_text_cache(bke::AttributeAccessor attribute_accessor,
|
||||
const float4x4 &object_to_world,
|
||||
float3 position,
|
||||
int instance_index)
|
||||
{
|
||||
/* Data from instances are read as a single value from a given index. The data is converted back
|
||||
|
@ -114,7 +113,7 @@ static void add_instance_attributes_to_text_cache(bke::AttributeAccessor attribu
|
|||
const GVArray attribute = attribute_accessor.lookup(".viewer").varray.slice(
|
||||
IndexRange(instance_index, 1));
|
||||
|
||||
add_values_to_text_cache(attribute, {position}, object_to_world);
|
||||
add_values_to_text_cache(attribute, {float3(0, 0, 0)}, object_to_world);
|
||||
}
|
||||
|
||||
} // namespace blender::draw::overlay
|
||||
|
@ -129,10 +128,8 @@ void OVERLAY_viewer_attribute_text(const Object &object)
|
|||
if (dupli_object->preview_instance_index >= 0) {
|
||||
const bke::Instances *instances = dupli_object->preview_base_geometry->get_instances();
|
||||
if (instances->attributes().contains(".viewer")) {
|
||||
add_instance_attributes_to_text_cache(instances->attributes(),
|
||||
object_to_world,
|
||||
dupli_object->ob->loc,
|
||||
dupli_object->preview_instance_index);
|
||||
add_instance_attributes_to_text_cache(
|
||||
instances->attributes(), object_to_world, dupli_object->preview_instance_index);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2628,7 +2628,7 @@ static std::string named_attribute_tooltip(bContext * /*C*/, void *argN, const c
|
|||
std::sort(sorted_used_attribute.begin(),
|
||||
sorted_used_attribute.end(),
|
||||
[](const NameWithUsage &a, const NameWithUsage &b) {
|
||||
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) <= 0;
|
||||
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) < 0;
|
||||
});
|
||||
|
||||
for (const NameWithUsage &attribute : sorted_used_attribute) {
|
||||
|
|
|
@ -2235,7 +2235,7 @@ static void draw_named_attributes_panel(uiLayout *layout, NodesModifierData &nmd
|
|||
std::sort(sorted_used_attribute.begin(),
|
||||
sorted_used_attribute.end(),
|
||||
[](const NameWithUsage &a, const NameWithUsage &b) {
|
||||
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) <= 0;
|
||||
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) < 0;
|
||||
});
|
||||
|
||||
for (const NameWithUsage &attribute : sorted_used_attribute) {
|
||||
|
|
Loading…
Reference in New Issue