Merge remote-tracking branch 'origin/blender-v4.1-release'

This commit is contained in:
Sybren A. Stüvel 2024-03-11 17:16:32 +01:00
commit c7e4365d7a
2 changed files with 10 additions and 1 deletions

View File

@ -289,6 +289,11 @@ class NLA_OT_bake(Operator):
else:
objects = context.selected_editable_objects
if bake_options.do_pose and not bake_options.do_object:
pose_object = getattr(context, 'pose_object', None)
if pose_object and pose_object not in objects:
# The active object might not be selected, but it is the one in pose mode.
# It can be assumed this pose needs baking.
objects.append(context.pose_object)
objects = [obj for obj in objects if obj.pose is not None]
object_action_pairs = (

View File

@ -114,7 +114,11 @@ void Instances::ensure_geometry_instances()
case InstanceReference::Type::Object: {
/* Create a new reference that contains the geometry set of the object. We may want to
* treat e.g. lamps and similar object types separately here. */
const Object &object = reference.object();
Object &object = reference.object();
if (ELEM(object.type, OB_LAMP, OB_CAMERA, OB_SPEAKER, OB_ARMATURE, OB_GPENCIL_LEGACY)) {
new_references.append(InstanceReference(object));
break;
}
GeometrySet object_geometry_set = object_get_evaluated_geometry_set(object);
if (object_geometry_set.has_instances()) {
object_geometry_set.get_instances_for_write()->ensure_geometry_instances();