fix scene_info

This commit is contained in:
2024-11-07 19:26:03 +08:00
parent 0ba46d4402
commit 378fd76f9f
4 changed files with 25 additions and 14 deletions

View File

@@ -394,8 +394,8 @@ class BlenderUtils:
and obj.name != BlenderUtils.DISPLAY_TABLE_NAME
):
obj_info = {
"location": list(obj.location),
"rotation_euler": list(obj.rotation_euler),
"location": list(obj.matrix_world.translation),
"rotation_euler": list(obj.matrix_world.to_euler()),
"scale": list(obj.scale),
}
scene_info[obj.name] = obj_info

View File

@@ -131,7 +131,7 @@ class ViewSampleUtil:
dot_product = np.dot(forward_vector, up_vector)
angle = np.degrees(np.arccos(dot_product))
right_vector = np.cross(up_vector, forward_vector)
print(angle)
if angle > 90 - min_cam_table_included_degree:
max_angle = 90 - min_cam_table_included_degree
min_angle = max(90 - min_cam_table_included_degree*2, 30)