Cleanup: format
This commit is contained in:
@@ -4,28 +4,30 @@ produced by the Armature modifier or constraint when assigned to the given bone
|
||||
(without Preserve Volume). The coordinates are processed in armature Pose space:
|
||||
"""
|
||||
|
||||
|
||||
def bbone_deform_matrix(pose_bone, point):
|
||||
index, blend_next = pose_bone.bbone_segment_index(point)
|
||||
index, blend_next = pose_bone.bbone_segment_index(point)
|
||||
|
||||
rest1 = pose_bone.bbone_segment_matrix(index, rest=True)
|
||||
pose1 = pose_bone.bbone_segment_matrix(index, rest=False)
|
||||
deform1 = pose1 @ rest1.inverted()
|
||||
rest1 = pose_bone.bbone_segment_matrix(index, rest=True)
|
||||
pose1 = pose_bone.bbone_segment_matrix(index, rest=False)
|
||||
deform1 = pose1 @ rest1.inverted()
|
||||
|
||||
# bbone_segment_index ensures that index + 1 is always valid
|
||||
rest2 = pose_bone.bbone_segment_matrix(index + 1, rest=True)
|
||||
pose2 = pose_bone.bbone_segment_matrix(index + 1, rest=False)
|
||||
deform2 = pose2 @ rest2.inverted()
|
||||
# bbone_segment_index ensures that index + 1 is always valid
|
||||
rest2 = pose_bone.bbone_segment_matrix(index + 1, rest=True)
|
||||
pose2 = pose_bone.bbone_segment_matrix(index + 1, rest=False)
|
||||
deform2 = pose2 @ rest2.inverted()
|
||||
|
||||
deform = deform1 * (1 - blend_next) + deform2 * blend_next
|
||||
deform = deform1 * (1 - blend_next) + deform2 * blend_next
|
||||
|
||||
return pose_bone.matrix @ deform @ pose_bone.bone.matrix_local.inverted()
|
||||
|
||||
return pose_bone.matrix @ deform @ pose_bone.bone.matrix_local.inverted()
|
||||
|
||||
# Armature modifier deforming vertices:
|
||||
mesh = bpy.data.objects["Mesh"]
|
||||
pose_bone = bpy.data.objects["Armature"].pose.bones["Bone"]
|
||||
|
||||
for vertex in mesh.data.vertices:
|
||||
vertex.co = bbone_deform_matrix(pose_bone, vertex.co) @ vertex.co
|
||||
vertex.co = bbone_deform_matrix(pose_bone, vertex.co) @ vertex.co
|
||||
|
||||
# Armature constraint modifying an object transform:
|
||||
empty = bpy.data.objects["Empty"]
|
||||
|
||||
@@ -548,7 +548,7 @@ class EeveeRaytracingDenoisePanel(RenderButtonsPanel, Panel):
|
||||
|
||||
|
||||
class RENDER_PT_eevee_next_raytracing_reflection(EeveeRaytracingOptionsPanel):
|
||||
#NOTE: Label is drawn by draw_header
|
||||
# NOTE: Label is drawn by draw_header
|
||||
bl_label = ""
|
||||
bl_parent_id = "RENDER_PT_eevee_next_raytracing"
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ void main()
|
||||
}
|
||||
else {
|
||||
/* Grid sample is invalid. Dilate adjacent samples inside the search region. */
|
||||
/* NOTE: Still load the center sample and give it low weight in case there is not valid sample in the neighborhood. */
|
||||
/* NOTE: Still load the center sample and give it low weight in case there is not valid sample
|
||||
* in the neighborhood. */
|
||||
float weight_accum = 1e-8;
|
||||
sh = spherical_harmonics_mul(irradiance_load(input_coord), weight_accum);
|
||||
int radius = int(dilation_radius);
|
||||
|
||||
@@ -142,7 +142,7 @@ struct TransData {
|
||||
enum {
|
||||
TD_SELECTED = 1 << 0,
|
||||
TD_USEQUAT = 1 << 1,
|
||||
/* TD_NOTCONNECTED = 1 << 2, */
|
||||
/* TD_NOTCONNECTED = 1 << 2, */
|
||||
/** Used for scaling of #MetaElem.rad */
|
||||
TD_SINGLESIZE = 1 << 3,
|
||||
/** Scale relative to individual element center. */
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <fcntl.h>
|
||||
#include <webp/decode.h>
|
||||
#include <webp/encode.h>
|
||||
|
||||
|
||||
@@ -593,8 +593,7 @@ static void rna_UserDef_subdivision_update(Main *bmain, Scene *scene, PointerRNA
|
||||
Object *ob;
|
||||
|
||||
for (ob = static_cast<Object *>(bmain->objects.first); ob;
|
||||
ob = static_cast<Object *>(ob->id.next))
|
||||
{
|
||||
ob = static_cast<Object *>(ob->id.next)) {
|
||||
if (BKE_object_get_last_subsurf_modifier(ob) != nullptr) {
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
@@ -633,8 +632,7 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN
|
||||
Object *ob;
|
||||
|
||||
for (ob = static_cast<Object *>(bmain->objects.first); ob;
|
||||
ob = static_cast<Object *>(ob->id.next))
|
||||
{
|
||||
ob = static_cast<Object *>(ob->id.next)) {
|
||||
if (ob->mode & OB_MODE_WEIGHT_PAINT) {
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user