Compare commits
27 Commits
temp-gpu-p
...
temp-geome
Author | SHA1 | Date | |
---|---|---|---|
c8698e6657 | |||
b517b9f646 | |||
379f116a2a | |||
2b343c74d5 | |||
1e468f57b1 | |||
2ee7d5282d | |||
d9c3a223cc | |||
2f9dbe9e7c | |||
45f32b43fc | |||
12bf0af064 | |||
9c393bab47 | |||
3ec74ee230 | |||
539095ca40 | |||
21ac9d9cff | |||
4aae988163 | |||
bd75d9f44c | |||
4602874a04 | |||
3a8c57afd5 | |||
5b8cd24863 | |||
91ecc53994 | |||
64fc0e34e6 | |||
83dab8bf98 | |||
4cc8f09843 | |||
3e2e8f437c | |||
7e5df11cac | |||
0d756bd4be | |||
dedf834884 |
@@ -51,12 +51,12 @@ CCL_NAMESPACE_BEGIN
|
||||
/* XML reading state */
|
||||
|
||||
struct XMLReadState : public XMLReader {
|
||||
Scene *scene; /* Scene pointer. */
|
||||
Transform tfm; /* Current transform state. */
|
||||
bool smooth; /* Smooth normal state. */
|
||||
Shader *shader; /* Current shader. */
|
||||
string base; /* Base path to current file. */
|
||||
float dicing_rate; /* Current dicing rate. */
|
||||
Scene *scene; /* scene pointer */
|
||||
Transform tfm; /* current transform state */
|
||||
bool smooth; /* smooth normal state */
|
||||
Shader *shader; /* current shader */
|
||||
string base; /* base path to current file*/
|
||||
float dicing_rate; /* current dicing rate */
|
||||
|
||||
XMLReadState() : scene(NULL), smooth(false), shader(NULL), dicing_rate(1.0f)
|
||||
{
|
||||
@@ -385,7 +385,7 @@ static Mesh *xml_add_mesh(Scene *scene, const Transform &tfm)
|
||||
Mesh *mesh = new Mesh();
|
||||
scene->geometry.push_back(mesh);
|
||||
|
||||
/* Create object. */
|
||||
/* create object*/
|
||||
Object *object = new Object();
|
||||
object->set_geometry(mesh);
|
||||
object->set_tfm(tfm);
|
||||
|
@@ -1254,19 +1254,12 @@ class CyclesObjectSettings(bpy.types.PropertyGroup):
|
||||
)
|
||||
|
||||
shadow_terminator_offset: FloatProperty(
|
||||
name="Shadow Terminator Shading Offset",
|
||||
name="Shadow Terminator Offset",
|
||||
description="Push the shadow terminator towards the light to hide artifacts on low poly geometry",
|
||||
min=0.0, max=1.0,
|
||||
default=0.0,
|
||||
)
|
||||
|
||||
shadow_terminator_geometry_offset: FloatProperty(
|
||||
name="Shadow Terminator Geometry Offset",
|
||||
description="Offset rays from the surface to reduce shadow terminator artifact on low poly geometry. Only affects triangles at grazing angles to light",
|
||||
min=0.0, max=1.0,
|
||||
default=0.1,
|
||||
)
|
||||
|
||||
is_shadow_catcher: BoolProperty(
|
||||
name="Shadow Catcher",
|
||||
description="Only render shadows on this object, for compositing renders into real footage",
|
||||
|
@@ -821,11 +821,6 @@ class CYCLES_RENDER_PT_filter(CyclesButtonsPanel, Panel):
|
||||
col.prop(view_layer, "use_strand", text="Hair")
|
||||
col.prop(view_layer, "use_volumes", text="Volumes")
|
||||
|
||||
col = layout.column(heading="Use")
|
||||
sub = col.row()
|
||||
sub.prop(view_layer, "use_motion_blur", text="Motion Blur")
|
||||
sub.active = rd.use_motion_blur
|
||||
|
||||
|
||||
class CYCLES_RENDER_PT_override(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Override"
|
||||
@@ -1223,31 +1218,20 @@ class CYCLES_OBJECT_PT_shading(CyclesButtonsPanel, Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if not CyclesButtonsPanel.poll(context):
|
||||
return False
|
||||
|
||||
ob = context.object
|
||||
return ob and has_geometry_visibility(ob)
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
|
||||
|
||||
class CYCLES_OBJECT_PT_shading_shadow_terminator(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Shadow Terminator"
|
||||
bl_parent_id = "CYCLES_OBJECT_PT_shading"
|
||||
bl_context = "object"
|
||||
return CyclesButtonsPanel.poll(context) and (context.object)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
|
||||
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
|
||||
|
||||
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
||||
layout = self.layout
|
||||
ob = context.object
|
||||
cob = ob.cycles
|
||||
flow.prop(cob, "shadow_terminator_geometry_offset", text="Geometry Offset")
|
||||
flow.prop(cob, "shadow_terminator_offset", text="Shading Offset")
|
||||
|
||||
if has_geometry_visibility(ob):
|
||||
col = flow.column()
|
||||
col.prop(cob, "shadow_terminator_offset")
|
||||
|
||||
|
||||
class CYCLES_OBJECT_PT_visibility(CyclesButtonsPanel, Panel):
|
||||
@@ -2327,7 +2311,6 @@ classes = (
|
||||
CYCLES_PT_context_material,
|
||||
CYCLES_OBJECT_PT_motion_blur,
|
||||
CYCLES_OBJECT_PT_shading,
|
||||
CYCLES_OBJECT_PT_shading_shadow_terminator,
|
||||
CYCLES_OBJECT_PT_visibility,
|
||||
CYCLES_OBJECT_PT_visibility_ray_visibility,
|
||||
CYCLES_OBJECT_PT_visibility_culling,
|
||||
|
@@ -533,7 +533,7 @@ void BlenderSync::sync_particle_hair(
|
||||
return;
|
||||
}
|
||||
|
||||
/* Extract particle hair data - should be combined with connecting to mesh later. */
|
||||
/* extract particle hair data - should be combined with connecting to mesh later*/
|
||||
|
||||
ParticleCurveData CData;
|
||||
|
||||
|
@@ -290,12 +290,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
bool is_shadow_catcher = get_boolean(cobject, "is_shadow_catcher");
|
||||
object->set_is_shadow_catcher(is_shadow_catcher);
|
||||
|
||||
float shadow_terminator_shading_offset = get_float(cobject, "shadow_terminator_offset");
|
||||
object->set_shadow_terminator_shading_offset(shadow_terminator_shading_offset);
|
||||
|
||||
float shadow_terminator_geometry_offset = get_float(cobject,
|
||||
"shadow_terminator_geometry_offset");
|
||||
object->set_shadow_terminator_geometry_offset(shadow_terminator_geometry_offset);
|
||||
float shadow_terminator_offset = get_float(cobject, "shadow_terminator_offset");
|
||||
object->set_shadow_terminator_offset(shadow_terminator_offset);
|
||||
|
||||
/* sync the asset name for Cryptomatte */
|
||||
BL::Object parent = b_ob.parent();
|
||||
|
@@ -281,6 +281,7 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
|
||||
|
||||
void BlenderSync::sync_integrator()
|
||||
{
|
||||
BL::RenderSettings r = b_scene.render();
|
||||
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
||||
|
||||
experimental = (get_enum(cscene, "feature_set") != 0);
|
||||
@@ -324,7 +325,7 @@ void BlenderSync::sync_integrator()
|
||||
integrator->set_sample_clamp_direct(get_float(cscene, "sample_clamp_direct"));
|
||||
integrator->set_sample_clamp_indirect(get_float(cscene, "sample_clamp_indirect"));
|
||||
if (!preview) {
|
||||
integrator->set_motion_blur(view_layer.use_motion_blur);
|
||||
integrator->set_motion_blur(r.use_motion_blur());
|
||||
}
|
||||
|
||||
integrator->set_method((Integrator::Method)get_enum(
|
||||
@@ -455,8 +456,6 @@ void BlenderSync::sync_view_layer(BL::ViewLayer &b_view_layer)
|
||||
view_layer.use_surfaces = b_view_layer.use_solid() || scene->bake_manager->get_baking();
|
||||
view_layer.use_hair = b_view_layer.use_strand();
|
||||
view_layer.use_volumes = b_view_layer.use_volumes();
|
||||
view_layer.use_motion_blur = b_view_layer.use_motion_blur() &&
|
||||
b_scene.render().use_motion_blur();
|
||||
|
||||
/* Material override. */
|
||||
view_layer.material_override = b_view_layer.material_override();
|
||||
@@ -603,10 +602,8 @@ vector<Pass> BlenderSync::sync_render_passes(BL::Scene &b_scene,
|
||||
for (BL::RenderPass &b_pass : b_rlay.passes) {
|
||||
PassType pass_type = get_pass_type(b_pass);
|
||||
|
||||
if (pass_type == PASS_MOTION &&
|
||||
(b_view_layer.use_motion_blur() && b_scene.render().use_motion_blur())) {
|
||||
if (pass_type == PASS_MOTION && b_scene.render().use_motion_blur())
|
||||
continue;
|
||||
}
|
||||
if (pass_type != PASS_NONE)
|
||||
Pass::add(pass_type, passes, b_pass.name().c_str());
|
||||
}
|
||||
|
@@ -246,7 +246,6 @@ class BlenderSync {
|
||||
use_surfaces(true),
|
||||
use_hair(true),
|
||||
use_volumes(true),
|
||||
use_motion_blur(true),
|
||||
samples(0),
|
||||
bound_samples(false)
|
||||
{
|
||||
@@ -259,7 +258,6 @@ class BlenderSync {
|
||||
bool use_surfaces;
|
||||
bool use_hair;
|
||||
bool use_volumes;
|
||||
bool use_motion_blur;
|
||||
int samples;
|
||||
bool bound_samples;
|
||||
} view_layer;
|
||||
|
@@ -179,7 +179,7 @@ class InnerNode : public BVHNode {
|
||||
}
|
||||
|
||||
/* NOTE: This function is only used during binary BVH builder, and it
|
||||
* supposed to be configured to have 2 children which will be filled-in in a
|
||||
* supposed to be configured to have 2 children which will be filled in in a
|
||||
* bit. But this is important to have children reset to NULL. */
|
||||
explicit InnerNode(const BoundBox &bounds) : BVHNode(bounds), num_children_(0)
|
||||
{
|
||||
|
@@ -388,7 +388,7 @@ void BVHSpatialSplit::split_curve_primitive(const Hair *hair,
|
||||
BoundBox &left_bounds,
|
||||
BoundBox &right_bounds)
|
||||
{
|
||||
/* curve split: NOTE - Currently ignores curve width and needs to be fixed. */
|
||||
/* curve split: NOTE - Currently ignores curve width and needs to be fixed.*/
|
||||
Hair::Curve curve = hair->get_curve(prim_index);
|
||||
const int k0 = curve.first_key + segment_index;
|
||||
const int k1 = k0 + 1;
|
||||
|
@@ -1186,7 +1186,7 @@ bool OpenCLInfo::get_device_extensions(cl_device_id device_id,
|
||||
{
|
||||
size_t extension_length = 0;
|
||||
cl_int err;
|
||||
/* Determine the size of the extension string. */
|
||||
/* Determine the size of the extension string*/
|
||||
if ((err = clGetDeviceInfo(device_id, CL_DEVICE_EXTENSIONS, 0, 0, &extension_length)) !=
|
||||
CL_SUCCESS) {
|
||||
if (error != NULL) {
|
||||
|
@@ -71,87 +71,6 @@ ccl_device_inline float3 ray_offset(float3 P, float3 Ng)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This function should be used to compute a modified ray start position for
|
||||
* rays leaving from a surface. The algorithm slightly distorts flat surface
|
||||
* of a triangle. Surface is lifted by amount h along normal n in the incident
|
||||
* point. */
|
||||
|
||||
ccl_device_inline float3 smooth_surface_offset(KernelGlobals *kg, ShaderData *sd, float3 Ng)
|
||||
{
|
||||
float3 V[3], N[3];
|
||||
triangle_vertices_and_normals(kg, sd->prim, V, N);
|
||||
|
||||
const float u = sd->u, v = sd->v;
|
||||
const float w = 1 - u - v;
|
||||
float3 P = V[0] * u + V[1] * v + V[2] * w; /* Local space */
|
||||
float3 n = N[0] * u + N[1] * v + N[2] * w; /* We get away without normalization */
|
||||
|
||||
n = normalize(
|
||||
transform_direction_transposed_auto(&sd->ob_itfm, n)); /* Normal x scale, world space */
|
||||
|
||||
/* Parabolic approximation */
|
||||
float a = dot(N[2] - N[0], V[0] - V[2]);
|
||||
float b = dot(N[2] - N[1], V[1] - V[2]);
|
||||
float c = dot(N[1] - N[0], V[1] - V[0]);
|
||||
float h = a * u * (u - 1) + (a + b + c) * u * v + b * v * (v - 1);
|
||||
|
||||
/* Check flipped normals */
|
||||
if (dot(n, Ng) > 0) {
|
||||
/* Local linear envelope */
|
||||
float h0 = max(max(dot(V[1] - V[0], N[0]), dot(V[2] - V[0], N[0])), 0.0f);
|
||||
float h1 = max(max(dot(V[0] - V[1], N[1]), dot(V[2] - V[1], N[1])), 0.0f);
|
||||
float h2 = max(max(dot(V[0] - V[2], N[2]), dot(V[1] - V[2], N[2])), 0.0f);
|
||||
h0 = max(dot(V[0] - P, N[0]) + h0, 0.0f);
|
||||
h1 = max(dot(V[1] - P, N[1]) + h1, 0.0f);
|
||||
h2 = max(dot(V[2] - P, N[2]) + h2, 0.0f);
|
||||
h = max(min(min(h0, h1), h2), h * 0.5f);
|
||||
}
|
||||
else {
|
||||
float h0 = max(max(dot(V[0] - V[1], N[0]), dot(V[0] - V[2], N[0])), 0.0f);
|
||||
float h1 = max(max(dot(V[1] - V[0], N[1]), dot(V[1] - V[2], N[1])), 0.0f);
|
||||
float h2 = max(max(dot(V[2] - V[0], N[2]), dot(V[2] - V[1], N[2])), 0.0f);
|
||||
h0 = max(dot(P - V[0], N[0]) + h0, 0.0f);
|
||||
h1 = max(dot(P - V[1], N[1]) + h1, 0.0f);
|
||||
h2 = max(dot(P - V[2], N[2]) + h2, 0.0f);
|
||||
h = min(-min(min(h0, h1), h2), h * 0.5f);
|
||||
}
|
||||
|
||||
return n * h;
|
||||
}
|
||||
|
||||
/* Ray offset to avoid shadow terminator artifact. */
|
||||
|
||||
ccl_device_inline float3 ray_offset_shadow(KernelGlobals *kg, ShaderData *sd, float3 L)
|
||||
{
|
||||
float NL = dot(sd->N, L);
|
||||
bool transmit = (NL < 0.0f);
|
||||
float3 Ng = (transmit ? -sd->Ng : sd->Ng);
|
||||
float3 P = ray_offset(sd->P, Ng);
|
||||
|
||||
if ((sd->type & PRIMITIVE_ALL_TRIANGLE) && (sd->shader & SHADER_SMOOTH_NORMAL)) {
|
||||
const float offset_cutoff =
|
||||
kernel_tex_fetch(__objects, sd->object).shadow_terminator_geometry_offset;
|
||||
/* Do ray offset (heavy stuff) only for close to be terminated triangles:
|
||||
* offset_cutoff = 0.1f means that 10-20% of rays will be affected. Also
|
||||
* make a smooth transition near the threshold. */
|
||||
if (offset_cutoff > 0.0f) {
|
||||
float NgL = dot(Ng, L);
|
||||
float offset_amount = 0.0f;
|
||||
if (NL < offset_cutoff) {
|
||||
offset_amount = clamp(2.0f - (NgL + NL) / offset_cutoff, 0.0f, 1.0f);
|
||||
}
|
||||
else {
|
||||
offset_amount = clamp(1.0f - NgL / offset_cutoff, 0.0f, 1.0f);
|
||||
}
|
||||
if (offset_amount > 0.0f) {
|
||||
P += smooth_surface_offset(kg, sd, Ng) * offset_amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return P;
|
||||
}
|
||||
|
||||
#if defined(__VOLUME_RECORD_ALL__) || (defined(__SHADOW_RECORD_ALL__) && defined(__KERNEL_CPU__))
|
||||
/* ToDo: Move to another file? */
|
||||
ccl_device int intersections_compare(const void *a, const void *b)
|
||||
|
@@ -462,7 +462,7 @@ ccl_device_inline int bsdf_sample(KernelGlobals *kg,
|
||||
else {
|
||||
/* Shadow terminator offset. */
|
||||
const float frequency_multiplier =
|
||||
kernel_tex_fetch(__objects, sd->object).shadow_terminator_shading_offset;
|
||||
kernel_tex_fetch(__objects, sd->object).shadow_terminator_offset;
|
||||
if (frequency_multiplier > 1.0f) {
|
||||
*eval *= shift_cos_in(dot(*omega_in, sc->N), frequency_multiplier);
|
||||
}
|
||||
@@ -488,9 +488,12 @@ ccl_device_inline
|
||||
const float3 omega_in,
|
||||
float *pdf)
|
||||
{
|
||||
/* For curves use the smooth normal, particularly for ribbons the geometric
|
||||
* normal gives too much darkening otherwise. */
|
||||
const float3 Ng = (sd->type & PRIMITIVE_ALL_CURVE) ? sd->N : sd->Ng;
|
||||
float3 eval;
|
||||
|
||||
if (dot(sd->N, omega_in) >= 0.0f) {
|
||||
if (dot(Ng, omega_in) >= 0.0f) {
|
||||
switch (sc->type) {
|
||||
case CLOSURE_BSDF_DIFFUSE_ID:
|
||||
case CLOSURE_BSDF_BSSRDF_ID:
|
||||
@@ -586,7 +589,7 @@ ccl_device_inline
|
||||
}
|
||||
/* Shadow terminator offset. */
|
||||
const float frequency_multiplier =
|
||||
kernel_tex_fetch(__objects, sd->object).shadow_terminator_shading_offset;
|
||||
kernel_tex_fetch(__objects, sd->object).shadow_terminator_offset;
|
||||
if (frequency_multiplier > 1.0f) {
|
||||
eval *= shift_cos_in(dot(omega_in, sc->N), frequency_multiplier);
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ ccl_device_noinline void motion_triangle_shader_setup(
|
||||
sd->P = motion_triangle_refine_local(kg, sd, isect, ray, verts);
|
||||
}
|
||||
else
|
||||
#endif /* __BVH_LOCAL__*/
|
||||
#endif /* __BVH_LOCAL__*/
|
||||
{
|
||||
sd->P = motion_triangle_refine(kg, sd, isect, ray, verts);
|
||||
}
|
||||
|
@@ -138,7 +138,7 @@ ccl_device_inline float4 primitive_surface_attribute_float4(KernelGlobals *kg,
|
||||
ccl_device_inline bool primitive_is_volume_attribute(const ShaderData *sd,
|
||||
const AttributeDescriptor desc)
|
||||
{
|
||||
return sd->type == PRIMITIVE_VOLUME;
|
||||
return (sd->object != OBJECT_NONE && desc.element == ATTR_ELEMENT_VOXEL);
|
||||
}
|
||||
|
||||
ccl_device_inline float primitive_volume_attribute_float(KernelGlobals *kg,
|
||||
|
@@ -75,22 +75,6 @@ ccl_device_inline void triangle_vertices(KernelGlobals *kg, int prim, float3 P[3
|
||||
P[2] = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 2));
|
||||
}
|
||||
|
||||
/* Triangle vertex locations and vertex normals */
|
||||
|
||||
ccl_device_inline void triangle_vertices_and_normals(KernelGlobals *kg,
|
||||
int prim,
|
||||
float3 P[3],
|
||||
float3 N[3])
|
||||
{
|
||||
const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, prim);
|
||||
P[0] = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 0));
|
||||
P[1] = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 1));
|
||||
P[2] = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 2));
|
||||
N[0] = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.x));
|
||||
N[1] = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.y));
|
||||
N[2] = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.z));
|
||||
}
|
||||
|
||||
/* Interpolate smooth vertex normal from vertices */
|
||||
|
||||
ccl_device_inline float3
|
||||
|
@@ -72,22 +72,14 @@ ccl_device float4 volume_attribute_float4(KernelGlobals *kg,
|
||||
const ShaderData *sd,
|
||||
const AttributeDescriptor desc)
|
||||
{
|
||||
if (desc.element & (ATTR_ELEMENT_OBJECT | ATTR_ELEMENT_MESH)) {
|
||||
return kernel_tex_fetch(__attributes_float3, desc.offset);
|
||||
}
|
||||
else if (desc.element == ATTR_ELEMENT_VOXEL) {
|
||||
/* todo: optimize this so we don't have to transform both here and in
|
||||
* kernel_tex_image_interp_3d when possible. Also could optimize for the
|
||||
* common case where transform is translation/scale only. */
|
||||
float3 P = sd->P;
|
||||
object_inverse_position_transform(kg, sd, &P);
|
||||
InterpolationType interp = (sd->flag & SD_VOLUME_CUBIC) ? INTERPOLATION_CUBIC :
|
||||
INTERPOLATION_NONE;
|
||||
return kernel_tex_image_interp_3d(kg, desc.offset, P, interp);
|
||||
}
|
||||
else {
|
||||
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
/* todo: optimize this so we don't have to transform both here and in
|
||||
* kernel_tex_image_interp_3d when possible. Also could optimize for the
|
||||
* common case where transform is translation/scale only. */
|
||||
float3 P = sd->P;
|
||||
object_inverse_position_transform(kg, sd, &P);
|
||||
InterpolationType interp = (sd->flag & SD_VOLUME_CUBIC) ? INTERPOLATION_CUBIC :
|
||||
INTERPOLATION_NONE;
|
||||
return kernel_tex_image_interp_3d(kg, desc.offset, P, interp);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -176,7 +176,8 @@ ccl_device_noinline_cpu bool direct_emission(KernelGlobals *kg,
|
||||
|
||||
if (ls->shader & SHADER_CAST_SHADOW) {
|
||||
/* setup ray */
|
||||
ray->P = ray_offset_shadow(kg, sd, ls->D);
|
||||
bool transmit = (dot(sd->Ng, ls->D) < 0.0f);
|
||||
ray->P = ray_offset(sd->P, (transmit) ? -sd->Ng : sd->Ng);
|
||||
|
||||
if (ls->t == FLT_MAX) {
|
||||
/* distant light */
|
||||
|
@@ -274,7 +274,7 @@ ccl_device_inline void shader_setup_from_sample(KernelGlobals *kg,
|
||||
/* primitive */
|
||||
sd->object = object;
|
||||
sd->lamp = LAMP_NONE;
|
||||
/* Currently no access to bvh prim index for strand sd->prim. */
|
||||
/* currently no access to bvh prim index for strand sd->prim*/
|
||||
sd->prim = prim;
|
||||
sd->u = u;
|
||||
sd->v = v;
|
||||
@@ -1268,7 +1268,6 @@ ccl_device_inline void shader_eval_volume(KernelGlobals *kg,
|
||||
sd->num_closure_left = max_closures;
|
||||
sd->flag = 0;
|
||||
sd->object_flag = 0;
|
||||
sd->type = PRIMITIVE_VOLUME;
|
||||
|
||||
for (int i = 0; stack[i].shader != SHADER_NONE; i++) {
|
||||
/* setup shaderdata from stack. it's mostly setup already in
|
||||
|
@@ -409,7 +409,7 @@ ccl_device void subsurface_random_walk_coefficients(const ShaderClosure *sc,
|
||||
|
||||
ccl_device_forceinline float eval_phase_dwivedi(float v, float phase_log, float cos_theta)
|
||||
{
|
||||
/* Eq. 9 from [2] using precomputed log((v + 1) / (v - 1)) */
|
||||
/* Eq. 9 from [2] using precomputed log((v + 1) / (v - 1))*/
|
||||
return 1.0f / ((v - cos_theta) * phase_log);
|
||||
}
|
||||
|
||||
|
@@ -689,24 +689,22 @@ typedef enum PrimitiveType {
|
||||
PRIMITIVE_MOTION_CURVE_THICK = (1 << 3),
|
||||
PRIMITIVE_CURVE_RIBBON = (1 << 4),
|
||||
PRIMITIVE_MOTION_CURVE_RIBBON = (1 << 5),
|
||||
PRIMITIVE_VOLUME = (1 << 6),
|
||||
/* Lamp primitive is not included below on purpose,
|
||||
* since it is no real traceable primitive.
|
||||
*/
|
||||
PRIMITIVE_LAMP = (1 << 7),
|
||||
PRIMITIVE_LAMP = (1 << 6),
|
||||
|
||||
PRIMITIVE_ALL_TRIANGLE = (PRIMITIVE_TRIANGLE | PRIMITIVE_MOTION_TRIANGLE),
|
||||
PRIMITIVE_ALL_CURVE = (PRIMITIVE_CURVE_THICK | PRIMITIVE_MOTION_CURVE_THICK |
|
||||
PRIMITIVE_CURVE_RIBBON | PRIMITIVE_MOTION_CURVE_RIBBON),
|
||||
PRIMITIVE_ALL_VOLUME = (PRIMITIVE_VOLUME),
|
||||
PRIMITIVE_ALL_MOTION = (PRIMITIVE_MOTION_TRIANGLE | PRIMITIVE_MOTION_CURVE_THICK |
|
||||
PRIMITIVE_MOTION_CURVE_RIBBON),
|
||||
PRIMITIVE_ALL = (PRIMITIVE_ALL_TRIANGLE | PRIMITIVE_ALL_CURVE | PRIMITIVE_ALL_VOLUME),
|
||||
PRIMITIVE_ALL = (PRIMITIVE_ALL_TRIANGLE | PRIMITIVE_ALL_CURVE),
|
||||
|
||||
/* Total number of different traceable primitives.
|
||||
* NOTE: This is an actual value, not a bitflag.
|
||||
*/
|
||||
PRIMITIVE_NUM_TOTAL = 7,
|
||||
PRIMITIVE_NUM_TOTAL = 6,
|
||||
} PrimitiveType;
|
||||
|
||||
#define PRIMITIVE_PACK_SEGMENT(type, segment) ((segment << PRIMITIVE_NUM_TOTAL) | (type))
|
||||
@@ -1481,8 +1479,7 @@ typedef struct KernelObject {
|
||||
float cryptomatte_object;
|
||||
float cryptomatte_asset;
|
||||
|
||||
float shadow_terminator_shading_offset;
|
||||
float shadow_terminator_geometry_offset;
|
||||
float shadow_terminator_offset;
|
||||
float pad1, pad2, pad3;
|
||||
} KernelObject;
|
||||
static_assert_align(KernelObject, 16);
|
||||
|
@@ -49,7 +49,7 @@ void OSLShader::thread_init(KernelGlobals *kg,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Per thread kernel data init. */
|
||||
/* per thread kernel data init*/
|
||||
kg->osl = osl_globals;
|
||||
|
||||
OSL::ShadingSystem *ss = kg->osl->ss;
|
||||
|
@@ -68,7 +68,7 @@ typedef ccl_global struct SplitBranchedState {
|
||||
|
||||
uint lcg_state;
|
||||
LocalIntersection ss_isect;
|
||||
# endif /* __SUBSURFACE__ */
|
||||
# endif /*__SUBSURFACE__ */
|
||||
|
||||
int shared_sample_count; /* number of branched samples shared with other threads */
|
||||
int original_ray; /* index of original ray when sharing branched samples */
|
||||
|
@@ -182,7 +182,7 @@ ccl_device void svm_node_tex_image_box(KernelGlobals *kg, ShaderData *sd, float
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Desperate mode, no valid choice anyway, fallback to one side. */
|
||||
/* Desperate mode, no valid choice anyway, fallback to one side.*/
|
||||
weight.x = 1.0f;
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,6 @@ void ConstantFolder::make_constant(float value) const
|
||||
|
||||
foreach (ShaderInput *sock, output->links) {
|
||||
sock->set(value);
|
||||
sock->constant_folded_in = true;
|
||||
}
|
||||
|
||||
graph->disconnect(output);
|
||||
@@ -60,7 +59,6 @@ void ConstantFolder::make_constant(float3 value) const
|
||||
|
||||
foreach (ShaderInput *sock, output->links) {
|
||||
sock->set(value);
|
||||
sock->constant_folded_in = true;
|
||||
}
|
||||
|
||||
graph->disconnect(output);
|
||||
|
@@ -676,8 +676,8 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom,
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
if (mesh->subdivision_type == Mesh::SUBDIVISION_CATMULL_CLARK &&
|
||||
desc.flags & ATTR_SUBDIVIDED) {
|
||||
/* Indices for subdivided attributes are retrieved
|
||||
* from patch table so no need for correction here. */
|
||||
/* indices for subdivided attributes are retrieved
|
||||
* from patch table so no need for correction here*/
|
||||
}
|
||||
else if (element == ATTR_ELEMENT_VERTEX)
|
||||
offset -= mesh->vert_offset;
|
||||
|
@@ -79,11 +79,7 @@ enum ShaderNodeSpecialType {
|
||||
class ShaderInput {
|
||||
public:
|
||||
ShaderInput(const SocketType &socket_type_, ShaderNode *parent_)
|
||||
: socket_type(socket_type_),
|
||||
parent(parent_),
|
||||
link(NULL),
|
||||
stack_offset(SVM_STACK_INVALID),
|
||||
constant_folded_in(false)
|
||||
: socket_type(socket_type_), parent(parent_), link(NULL), stack_offset(SVM_STACK_INVALID)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -115,10 +111,6 @@ class ShaderInput {
|
||||
ShaderNode *parent;
|
||||
ShaderOutput *link;
|
||||
int stack_offset; /* for SVM compiler */
|
||||
|
||||
/* Keeps track of whether a constant was folded in this socket, to avoid over-optimizing when the
|
||||
* link is null. */
|
||||
bool constant_folded_in;
|
||||
};
|
||||
|
||||
/* Output
|
||||
|
@@ -4374,7 +4374,7 @@ NODE_DEFINE(HairInfoNode)
|
||||
SOCKET_OUT_FLOAT(intercept, "Intercept");
|
||||
SOCKET_OUT_FLOAT(thickness, "Thickness");
|
||||
SOCKET_OUT_NORMAL(tangent_normal, "Tangent Normal");
|
||||
#if 0 /* Output for minimum hair width transparency - deactivated. */
|
||||
#if 0 /*output for minimum hair width transparency - deactivated */
|
||||
SOCKET_OUT_FLOAT(fade, "Fade");
|
||||
#endif
|
||||
SOCKET_OUT_FLOAT(index, "Random");
|
||||
|
@@ -93,8 +93,7 @@ NODE_DEFINE(Object)
|
||||
SOCKET_POINT(dupli_generated, "Dupli Generated", zero_float3());
|
||||
SOCKET_POINT2(dupli_uv, "Dupli UV", zero_float2());
|
||||
SOCKET_TRANSFORM_ARRAY(motion, "Motion", array<Transform>());
|
||||
SOCKET_FLOAT(shadow_terminator_shading_offset, "Shadow Terminator Shading Offset", 0.0f);
|
||||
SOCKET_FLOAT(shadow_terminator_geometry_offset, "Shadow Terminator Geometry Offset", 0.1f);
|
||||
SOCKET_FLOAT(shadow_terminator_offset, "Terminator Offset", 0.0f);
|
||||
SOCKET_STRING(asset_name, "Asset Name", ustring());
|
||||
|
||||
SOCKET_BOOLEAN(is_shadow_catcher, "Shadow Catcher", false);
|
||||
@@ -508,9 +507,7 @@ void ObjectManager::device_update_object_transform(UpdateObjectTransformState *s
|
||||
kobject.cryptomatte_asset = util_hash_to_float(hash_asset);
|
||||
}
|
||||
|
||||
kobject.shadow_terminator_shading_offset = 1.0f /
|
||||
(1.0f - 0.5f * ob->shadow_terminator_shading_offset);
|
||||
kobject.shadow_terminator_geometry_offset = ob->shadow_terminator_geometry_offset;
|
||||
kobject.shadow_terminator_offset = 1.0f / (1.0f - 0.5f * ob->shadow_terminator_offset);
|
||||
|
||||
/* Object flag. */
|
||||
if (ob->use_holdout) {
|
||||
|
@@ -64,8 +64,7 @@ class Object : public Node {
|
||||
NODE_SOCKET_API(bool, hide_on_missing_motion)
|
||||
NODE_SOCKET_API(bool, use_holdout)
|
||||
NODE_SOCKET_API(bool, is_shadow_catcher)
|
||||
NODE_SOCKET_API(float, shadow_terminator_shading_offset)
|
||||
NODE_SOCKET_API(float, shadow_terminator_geometry_offset)
|
||||
NODE_SOCKET_API(float, shadow_terminator_offset)
|
||||
|
||||
NODE_SOCKET_API(float3, dupli_generated)
|
||||
NODE_SOCKET_API(float2, dupli_uv)
|
||||
|
@@ -304,7 +304,7 @@ int SVMCompiler::stack_assign(ShaderOutput *output)
|
||||
|
||||
int SVMCompiler::stack_assign_if_linked(ShaderInput *input)
|
||||
{
|
||||
if (input->link || input->constant_folded_in)
|
||||
if (input->link)
|
||||
return stack_assign(input);
|
||||
|
||||
return SVM_STACK_INVALID;
|
||||
|
@@ -243,7 +243,7 @@ ccl_device float fast_sinpif(float x)
|
||||
const float P = 3.584135056f; /* P = 16-4*Q */
|
||||
return y * (Q + P * fabsf(y));
|
||||
|
||||
/* The original article used inferior constants for Q and P and
|
||||
/* The original article used used inferior constants for Q and P and
|
||||
* so had max error 1.091e-3.
|
||||
*
|
||||
* The optimal value for Q was determined by exhaustive search, minimizing
|
||||
|
@@ -68,7 +68,7 @@ class TaskPool {
|
||||
|
||||
/* ** Statistics ** */
|
||||
|
||||
/* Time stamp of first task pushed. */
|
||||
/* Time time stamp of first task pushed. */
|
||||
double start_time;
|
||||
|
||||
/* Number of all tasks pushed to the pool. Cleared after wait_work() and cancel(). */
|
||||
|
@@ -95,7 +95,7 @@ class GHOST_ISystemPaths {
|
||||
virtual void addToSystemRecentFiles(const char *filename) const = 0;
|
||||
|
||||
private:
|
||||
/** The one and only system paths. */
|
||||
/** The one and only system paths*/
|
||||
static GHOST_ISystemPaths *m_systemPaths;
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
|
@@ -328,8 +328,8 @@ class GHOST_System : public GHOST_ISystem {
|
||||
*/
|
||||
virtual GHOST_TSuccess showMessageBox(const char * /*title*/,
|
||||
const char * /*message*/,
|
||||
const char * /*help_label*/,
|
||||
const char * /*continue_label*/,
|
||||
const char * /*help_label */,
|
||||
const char * /*continue_label */,
|
||||
const char * /*link*/,
|
||||
GHOST_DialogOptions /*dialog_options*/) const
|
||||
{
|
||||
|
@@ -86,8 +86,7 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
|
||||
{
|
||||
// printf("\nrecvchar %c 0x%x",recvChar,recvChar);
|
||||
switch (rawCode) {
|
||||
/* Physical key-codes: (not used due to map changes in int'l keyboards). */
|
||||
#if 0
|
||||
/*Physical keycodes not used due to map changes in int'l keyboards
|
||||
case kVK_ANSI_A: return GHOST_kKeyA;
|
||||
case kVK_ANSI_B: return GHOST_kKeyB;
|
||||
case kVK_ANSI_C: return GHOST_kKeyC;
|
||||
@@ -113,9 +112,9 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
|
||||
case kVK_ANSI_W: return GHOST_kKeyW;
|
||||
case kVK_ANSI_X: return GHOST_kKeyX;
|
||||
case kVK_ANSI_Y: return GHOST_kKeyY;
|
||||
case kVK_ANSI_Z: return GHOST_kKeyZ;
|
||||
#endif
|
||||
/* Numbers keys: mapped to handle some int'l keyboard (e.g. French). */
|
||||
case kVK_ANSI_Z: return GHOST_kKeyZ;*/
|
||||
|
||||
/* Numbers keys mapped to handle some int'l keyboard (e.g. French)*/
|
||||
case kVK_ISO_Section:
|
||||
return GHOST_kKeyUnknown;
|
||||
case kVK_ANSI_1:
|
||||
@@ -245,8 +244,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
|
||||
return GHOST_kKeyUpPage;
|
||||
case kVK_PageDown:
|
||||
return GHOST_kKeyDownPage;
|
||||
#if 0 /* TODO: why are these commented? */
|
||||
case kVK_ANSI_Minus: return GHOST_kKeyMinus;
|
||||
|
||||
/*case kVK_ANSI_Minus: return GHOST_kKeyMinus;
|
||||
case kVK_ANSI_Equal: return GHOST_kKeyEqual;
|
||||
case kVK_ANSI_Comma: return GHOST_kKeyComma;
|
||||
case kVK_ANSI_Period: return GHOST_kKeyPeriod;
|
||||
@@ -256,15 +255,15 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
|
||||
case kVK_ANSI_Backslash: return GHOST_kKeyBackslash;
|
||||
case kVK_ANSI_LeftBracket: return GHOST_kKeyLeftBracket;
|
||||
case kVK_ANSI_RightBracket: return GHOST_kKeyRightBracket;
|
||||
case kVK_ANSI_Grave: return GHOST_kKeyAccentGrave;
|
||||
#endif
|
||||
case kVK_ANSI_Grave: return GHOST_kKeyAccentGrave;*/
|
||||
|
||||
case kVK_VolumeUp:
|
||||
case kVK_VolumeDown:
|
||||
case kVK_Mute:
|
||||
return GHOST_kKeyUnknown;
|
||||
|
||||
default: {
|
||||
/* Alphanumerical or punctuation key that is remappable in int'l keyboards. */
|
||||
/* alphanumerical or punctuation key that is remappable in int'l keyboards */
|
||||
if ((recvChar >= 'A') && (recvChar <= 'Z')) {
|
||||
return (GHOST_TKey)(recvChar - 'A' + GHOST_kKeyA);
|
||||
}
|
||||
@@ -272,8 +271,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
|
||||
return (GHOST_TKey)(recvChar - 'a' + GHOST_kKeyA);
|
||||
}
|
||||
else {
|
||||
/* Leopard and Snow Leopard 64bit compatible API. */
|
||||
CFDataRef uchrHandle; /* The keyboard layout. */
|
||||
/* Leopard and Snow Leopard 64bit compatible API*/
|
||||
CFDataRef uchrHandle; /*the keyboard layout*/
|
||||
TISInputSourceRef kbdTISHandle;
|
||||
|
||||
kbdTISHandle = TISCopyCurrentKeyboardLayoutInputSource();
|
||||
@@ -281,9 +280,9 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
|
||||
kTISPropertyUnicodeKeyLayoutData);
|
||||
CFRelease(kbdTISHandle);
|
||||
|
||||
/* Get actual character value of the "remappable" keys in int'l keyboards,
|
||||
* if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger),
|
||||
* then fallback on using the received #charactersIgnoringModifiers. */
|
||||
/*get actual character value of the "remappable" keys in int'l keyboards,
|
||||
if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger),
|
||||
then fallback on using the received charactersIgnoringModifiers */
|
||||
if (uchrHandle) {
|
||||
UInt32 deadKeyState = 0;
|
||||
UniCharCount actualStrLength = 0;
|
||||
@@ -434,10 +433,8 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
|
||||
// So WM_exit needs to be called directly, as the event loop will never run before termination
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification
|
||||
{
|
||||
#if 0
|
||||
G.is_break = false; /* Let Cocoa perform the termination at the end. */
|
||||
WM_exit(C);
|
||||
#endif
|
||||
/*G.is_break = FALSE; //Let Cocoa perform the termination at the end
|
||||
WM_exit(C);*/
|
||||
}
|
||||
|
||||
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
|
||||
@@ -1218,7 +1215,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
/* Get the bitmap of the image. */
|
||||
/*Get the bitmap of the image*/
|
||||
enumerator = [[droppedImg representations] objectEnumerator];
|
||||
while ((representation = [enumerator nextObject])) {
|
||||
if ([representation isKindOfClass:[NSBitmapImageRep class]]) {
|
||||
@@ -1231,7 +1228,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
|
||||
if (([bitmapImage bitsPerPixel] == 32) && (([bitmapImage bitmapFormat] & 0x5) == 0) &&
|
||||
![bitmapImage isPlanar]) {
|
||||
/* Try a fast copy if the image is a meshed RGBA 32bit bitmap. */
|
||||
/* Try a fast copy if the image is a meshed RGBA 32bit bitmap*/
|
||||
toIBuf = (GHOST_TUns8 *)ibuf->rect;
|
||||
rasterRGB = (GHOST_TUns8 *)[bitmapImage bitmapData];
|
||||
for (y = 0; y < imgSize.height; y++) {
|
||||
@@ -1261,7 +1258,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
colorSpaceName:NSDeviceRGBColorSpace
|
||||
bitmapFormat:(NSBitmapFormat)0
|
||||
bytesPerRow:4 * imgSize.width
|
||||
bitsPerPixel:32 /* RGB format padded to 32bits. */];
|
||||
bitsPerPixel:32 /*RGB format padded to 32bits*/];
|
||||
|
||||
[NSGraphicsContext saveGraphicsState];
|
||||
[NSGraphicsContext
|
||||
@@ -1308,7 +1305,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
/* Copy the image to ibuf, flipping it vertically. */
|
||||
/*Copy the image to ibuf, flipping it vertically*/
|
||||
toIBuf = (GHOST_TUns8 *)ibuf->rect;
|
||||
for (y = 0; y < imgSize.height; y++) {
|
||||
for (x = 0; x < imgSize.width; x++) {
|
||||
|
@@ -1012,8 +1012,8 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
|
||||
void GHOST_SystemWin32::processPointerEvent(
|
||||
UINT type, GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam, bool &eventHandled)
|
||||
{
|
||||
/* Pointer events might fire when changing windows for a device which is set to use Wintab,
|
||||
* even when Wintab is left enabled but set to the bottom of Wintab overlap order. */
|
||||
/* Pointer events might fire when changing windows for a device which is set to use Wintab, even
|
||||
* when when Wintab is left enabled but set to the bottom of Wintab overlap order. */
|
||||
if (!window->usingTabletAPI(GHOST_kTabletWinPointer)) {
|
||||
return;
|
||||
}
|
||||
@@ -1503,7 +1503,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
case WM_SYSKEYDOWN:
|
||||
case WM_KEYUP:
|
||||
case WM_SYSKEYUP:
|
||||
/* These functions were replaced by #WM_INPUT. */
|
||||
/* These functions were replaced by WM_INPUT*/
|
||||
case WM_CHAR:
|
||||
/* The WM_CHAR message is posted to the window with the keyboard focus when
|
||||
* a WM_KEYDOWN message is translated by the TranslateMessage function. WM_CHAR
|
||||
@@ -1634,7 +1634,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
}
|
||||
|
||||
/* Reset pointer pen info if pen device has left tracking range. */
|
||||
if (pointerInfo.pointerType == PT_PEN) {
|
||||
if (pointerInfo.pointerType == PT_PEN && !IS_POINTER_INRANGE_WPARAM(wParam)) {
|
||||
window->resetPointerPenInfo();
|
||||
eventHandled = true;
|
||||
}
|
||||
@@ -1851,7 +1851,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
* to perform any move or size change processing during the WM_WINDOWPOSCHANGED
|
||||
* message without calling DefWindowProc.
|
||||
*/
|
||||
/* See #WM_SIZE comment. */
|
||||
/* see WM_SIZE comment*/
|
||||
if (window->m_inLiveResize) {
|
||||
system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window));
|
||||
system->dispatchEvents();
|
||||
|
@@ -89,7 +89,7 @@
|
||||
/* see T34039 Fix Alt key glitch on Unity desktop */
|
||||
#define USE_UNITY_WORKAROUND
|
||||
|
||||
/* Fix 'shortcut' part of keyboard reading code only ever using first defined key-map
|
||||
/* Fix 'shortcut' part of keyboard reading code only ever using first defined keymap
|
||||
* instead of active one. See T47228 and D1746 */
|
||||
#define USE_NON_LATIN_KB_WORKAROUND
|
||||
|
||||
|
@@ -365,7 +365,7 @@ class GHOST_Window : public GHOST_IWindow {
|
||||
/** The current grabbed state of the cursor */
|
||||
GHOST_TGrabCursorMode m_cursorGrab;
|
||||
|
||||
/** Grab cursor axis. */
|
||||
/** Grab cursor axis.*/
|
||||
GHOST_TAxisFlag m_cursorGrabAxis;
|
||||
|
||||
/** Initial grab location. */
|
||||
|
@@ -38,7 +38,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <shellscalingapi.h>
|
||||
#include <string.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
@@ -81,10 +80,13 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
||||
m_wintab(NULL),
|
||||
m_lastPointerTabletData(GHOST_TABLET_DATA_NONE),
|
||||
m_normal_state(GHOST_kWindowStateNormal),
|
||||
m_user32(::LoadLibrary("user32.dll")),
|
||||
m_user32(NULL),
|
||||
m_parentWindowHwnd(parentwindow ? parentwindow->m_hWnd : HWND_DESKTOP),
|
||||
m_debug_context(is_debug)
|
||||
{
|
||||
wchar_t *title_16 = alloc_utf16_from_8((char *)title, 0);
|
||||
RECT win_rect = {left, top, (long)(left + width), (long)(top + height)};
|
||||
|
||||
DWORD style = parentwindow ?
|
||||
WS_POPUPWINDOW | WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX :
|
||||
WS_OVERLAPPEDWINDOW;
|
||||
@@ -103,10 +105,27 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
||||
*/
|
||||
}
|
||||
|
||||
RECT win_rect = {left, top, (long)(left + width), (long)(top + height)};
|
||||
adjustWindowRectForClosestMonitor(&win_rect, style, extended_style);
|
||||
/* Monitor details. */
|
||||
MONITORINFOEX monitor;
|
||||
monitor.cbSize = sizeof(MONITORINFOEX);
|
||||
monitor.dwFlags = 0;
|
||||
GetMonitorInfo(MonitorFromRect(&win_rect, MONITOR_DEFAULTTONEAREST), &monitor);
|
||||
|
||||
/* Constrain requested size and position to fit within this monitor. */
|
||||
width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect.right - win_rect.left);
|
||||
height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect.bottom - win_rect.top);
|
||||
win_rect.left = min(max(monitor.rcWork.left, win_rect.left), monitor.rcWork.right - width);
|
||||
win_rect.right = win_rect.left + width;
|
||||
win_rect.top = min(max(monitor.rcWork.top, win_rect.top), monitor.rcWork.bottom - height);
|
||||
win_rect.bottom = win_rect.top + height;
|
||||
|
||||
/* Adjust to allow for caption, borders, shadows, scaling, etc. Resulting values can be
|
||||
* correctly outside of monitor bounds. Note: You cannot specify WS_OVERLAPPED when calling. */
|
||||
AdjustWindowRectEx(&win_rect, style & ~WS_OVERLAPPED, FALSE, extended_style);
|
||||
|
||||
/* But never allow a top position that can hide part of the title bar. */
|
||||
win_rect.top = max(monitor.rcWork.top, win_rect.top);
|
||||
|
||||
wchar_t *title_16 = alloc_utf16_from_8((char *)title, 0);
|
||||
m_hWnd = ::CreateWindowExW(extended_style, // window extended style
|
||||
s_windowClassName, // pointer to registered class name
|
||||
title_16, // pointer to window name
|
||||
@@ -121,78 +140,81 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
||||
0); // pointer to window-creation data
|
||||
free(title_16);
|
||||
|
||||
if (m_hWnd == NULL) {
|
||||
return;
|
||||
}
|
||||
m_user32 = ::LoadLibrary("user32.dll");
|
||||
|
||||
/* Store the device context. */
|
||||
m_hDC = ::GetDC(m_hWnd);
|
||||
if (m_hWnd) {
|
||||
RegisterTouchWindow(m_hWnd, 0);
|
||||
|
||||
if (!setDrawingContextType(type)) {
|
||||
::DestroyWindow(m_hWnd);
|
||||
m_hWnd = NULL;
|
||||
return;
|
||||
}
|
||||
// Register this window as a droptarget. Requires m_hWnd to be valid.
|
||||
// Note that OleInitialize(0) has to be called prior to this. Done in GHOST_SystemWin32.
|
||||
m_dropTarget = new GHOST_DropTargetWin32(this, m_system);
|
||||
if (m_dropTarget) {
|
||||
::RegisterDragDrop(m_hWnd, m_dropTarget);
|
||||
}
|
||||
|
||||
RegisterTouchWindow(m_hWnd, 0);
|
||||
// Store a pointer to this class in the window structure
|
||||
::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR)this);
|
||||
|
||||
/* Register as droptarget. OleInitialize(0) required first, done in GHOST_SystemWin32. */
|
||||
m_dropTarget = new GHOST_DropTargetWin32(this, m_system);
|
||||
::RegisterDragDrop(m_hWnd, m_dropTarget);
|
||||
if (!m_system->m_windowFocus) {
|
||||
// Lower to bottom and don't activate if we don't want focus
|
||||
::SetWindowPos(m_hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
/* Store a pointer to this class in the window structure. */
|
||||
::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR)this);
|
||||
// Store the device context
|
||||
m_hDC = ::GetDC(m_hWnd);
|
||||
|
||||
if (!m_system->m_windowFocus) {
|
||||
/* If we don't want focus then lower to bottom. */
|
||||
::SetWindowPos(m_hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||
}
|
||||
GHOST_TSuccess success = setDrawingContextType(type);
|
||||
|
||||
/* Show the window. */
|
||||
int nCmdShow;
|
||||
switch (state) {
|
||||
case GHOST_kWindowStateMaximized:
|
||||
nCmdShow = SW_SHOWMAXIMIZED;
|
||||
break;
|
||||
case GHOST_kWindowStateMinimized:
|
||||
nCmdShow = (m_system->m_windowFocus) ? SW_SHOWMINIMIZED : SW_SHOWMINNOACTIVE;
|
||||
break;
|
||||
case GHOST_kWindowStateNormal:
|
||||
default:
|
||||
nCmdShow = (m_system->m_windowFocus) ? SW_SHOWNORMAL : SW_SHOWNOACTIVATE;
|
||||
break;
|
||||
}
|
||||
|
||||
::ShowWindow(m_hWnd, nCmdShow);
|
||||
if (success) {
|
||||
// Show the window
|
||||
int nCmdShow;
|
||||
switch (state) {
|
||||
case GHOST_kWindowStateMaximized:
|
||||
nCmdShow = SW_SHOWMAXIMIZED;
|
||||
break;
|
||||
case GHOST_kWindowStateMinimized:
|
||||
nCmdShow = (m_system->m_windowFocus) ? SW_SHOWMINIMIZED : SW_SHOWMINNOACTIVE;
|
||||
break;
|
||||
case GHOST_kWindowStateNormal:
|
||||
default:
|
||||
nCmdShow = (m_system->m_windowFocus) ? SW_SHOWNORMAL : SW_SHOWNOACTIVATE;
|
||||
break;
|
||||
}
|
||||
|
||||
::ShowWindow(m_hWnd, nCmdShow);
|
||||
#ifdef WIN32_COMPOSITING
|
||||
if (alphaBackground && parentwindowhwnd == 0) {
|
||||
if (alphaBackground && parentwindowhwnd == 0) {
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
/* Create and populate the Blur Behind structure. */
|
||||
DWM_BLURBEHIND bb = {0};
|
||||
// Create and populate the Blur Behind structure
|
||||
DWM_BLURBEHIND bb = {0};
|
||||
|
||||
/* Enable Blur Behind and apply to the entire client area. */
|
||||
bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
|
||||
bb.fEnable = true;
|
||||
bb.hRgnBlur = CreateRectRgn(0, 0, -1, -1);
|
||||
// Enable Blur Behind and apply to the entire client area
|
||||
bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
|
||||
bb.fEnable = true;
|
||||
bb.hRgnBlur = CreateRectRgn(0, 0, -1, -1);
|
||||
|
||||
/* Apply Blur Behind. */
|
||||
hr = DwmEnableBlurBehindWindow(m_hWnd, &bb);
|
||||
DeleteObject(bb.hRgnBlur);
|
||||
}
|
||||
// Apply Blur Behind
|
||||
hr = DwmEnableBlurBehindWindow(m_hWnd, &bb);
|
||||
DeleteObject(bb.hRgnBlur);
|
||||
}
|
||||
#endif
|
||||
// Force an initial paint of the window
|
||||
::UpdateWindow(m_hWnd);
|
||||
}
|
||||
else {
|
||||
// invalidate the window
|
||||
::DestroyWindow(m_hWnd);
|
||||
m_hWnd = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Force an initial paint of the window. */
|
||||
::UpdateWindow(m_hWnd);
|
||||
|
||||
/* Initialize Wintab. */
|
||||
// Initialize Wintab
|
||||
if (system->getTabletAPI() != GHOST_kTabletWinPointer) {
|
||||
loadWintab(GHOST_kWindowStateMinimized != state);
|
||||
}
|
||||
|
||||
/* Allow the showing of a progress bar on the taskbar. */
|
||||
CoCreateInstance(
|
||||
CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (LPVOID *)&m_Bar);
|
||||
}
|
||||
@@ -246,47 +268,6 @@ GHOST_WindowWin32::~GHOST_WindowWin32()
|
||||
}
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::adjustWindowRectForClosestMonitor(LPRECT win_rect,
|
||||
DWORD dwStyle,
|
||||
DWORD dwExStyle)
|
||||
{
|
||||
/* Get Details of the closest monitor. */
|
||||
HMONITOR hmonitor = MonitorFromRect(win_rect, MONITOR_DEFAULTTONEAREST);
|
||||
MONITORINFOEX monitor;
|
||||
monitor.cbSize = sizeof(MONITORINFOEX);
|
||||
monitor.dwFlags = 0;
|
||||
GetMonitorInfo(hmonitor, &monitor);
|
||||
|
||||
/* Constrain requested size and position to fit within this monitor. */
|
||||
LONG width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect->right - win_rect->left);
|
||||
LONG height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect->bottom - win_rect->top);
|
||||
win_rect->left = min(max(monitor.rcWork.left, win_rect->left), monitor.rcWork.right - width);
|
||||
win_rect->right = win_rect->left + width;
|
||||
win_rect->top = min(max(monitor.rcWork.top, win_rect->top), monitor.rcWork.bottom - height);
|
||||
win_rect->bottom = win_rect->top + height;
|
||||
|
||||
/* With Windows 10 and newer we can adjust for chrome that differs with DPI and scale. */
|
||||
GHOST_WIN32_AdjustWindowRectExForDpi fpAdjustWindowRectExForDpi = nullptr;
|
||||
if (m_user32) {
|
||||
fpAdjustWindowRectExForDpi = (GHOST_WIN32_AdjustWindowRectExForDpi)::GetProcAddress(
|
||||
m_user32, "AdjustWindowRectExForDpi");
|
||||
}
|
||||
|
||||
/* Adjust to allow for caption, borders, shadows, scaling, etc. Resulting values can be
|
||||
* correctly outside of monitor bounds. Note: You cannot specify WS_OVERLAPPED when calling. */
|
||||
if (fpAdjustWindowRectExForDpi) {
|
||||
UINT dpiX, dpiY;
|
||||
GetDpiForMonitor(hmonitor, MDT_EFFECTIVE_DPI, &dpiX, &dpiY);
|
||||
fpAdjustWindowRectExForDpi(win_rect, dwStyle & ~WS_OVERLAPPED, FALSE, dwExStyle, dpiX);
|
||||
}
|
||||
else {
|
||||
AdjustWindowRectEx(win_rect, dwStyle & ~WS_OVERLAPPED, FALSE, dwExStyle);
|
||||
}
|
||||
|
||||
/* But never allow a top position that can hide part of the title bar. */
|
||||
win_rect->top = max(monitor.rcWork.top, win_rect->top);
|
||||
}
|
||||
|
||||
bool GHOST_WindowWin32::getValid() const
|
||||
{
|
||||
return GHOST_Window::getValid() && m_hWnd != 0 && m_hDC != 0;
|
||||
@@ -306,7 +287,7 @@ void GHOST_WindowWin32::setTitle(const char *title)
|
||||
|
||||
std::string GHOST_WindowWin32::getTitle() const
|
||||
{
|
||||
char buf[s_maxTitleLength]; /* CHANGE + never used yet. */
|
||||
char buf[s_maxTitleLength]; /*CHANGE + never used yet*/
|
||||
::GetWindowText(m_hWnd, buf, s_maxTitleLength);
|
||||
return std::string(buf);
|
||||
}
|
||||
|
@@ -43,9 +43,6 @@ class GHOST_DropTargetWin32;
|
||||
// typedefs for user32 functions to allow dynamic loading of Windows 10 DPI scaling functions
|
||||
typedef UINT(API *GHOST_WIN32_GetDpiForWindow)(HWND);
|
||||
|
||||
typedef BOOL(API *GHOST_WIN32_AdjustWindowRectExForDpi)(
|
||||
LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle, UINT dpi);
|
||||
|
||||
struct GHOST_PointerInfoWin32 {
|
||||
GHOST_TInt32 pointerId;
|
||||
GHOST_TInt32 isPrimary;
|
||||
@@ -101,14 +98,6 @@ class GHOST_WindowWin32 : public GHOST_Window {
|
||||
*/
|
||||
~GHOST_WindowWin32();
|
||||
|
||||
/**
|
||||
* Adjusts a requested window rect to fit and position correctly in monitor.
|
||||
* \param win_rect: pointer to rectangle that will be modified.
|
||||
* \param dwStyle: The Window Style of the window whose required size is to be calculated.
|
||||
* \param dwExStyle: The Extended Window Style of the window.
|
||||
*/
|
||||
void adjustWindowRectForClosestMonitor(LPRECT win_rect, DWORD dwStyle, DWORD dwExStyle);
|
||||
|
||||
/**
|
||||
* Returns indication as to whether the window is valid.
|
||||
* \return The validity of the window.
|
||||
|
@@ -1241,7 +1241,7 @@ GHOST_WindowX11::~GHOST_WindowX11()
|
||||
if (m_valid_setup) {
|
||||
static Atom Primary_atom, Clipboard_atom;
|
||||
Window p_owner, c_owner;
|
||||
/* Change the owner of the Atoms to None if we are the owner. */
|
||||
/*Change the owner of the Atoms to None if we are the owner*/
|
||||
Primary_atom = XInternAtom(m_display, "PRIMARY", False);
|
||||
Clipboard_atom = XInternAtom(m_display, "CLIPBOARD", False);
|
||||
|
||||
|
@@ -60,7 +60,7 @@
|
||||
#include "GPU_init_exit.h"
|
||||
|
||||
extern int datatoc_bfont_ttf_size;
|
||||
extern char const datatoc_bfont_ttf[];
|
||||
extern char datatoc_bfont_ttf[];
|
||||
|
||||
typedef struct _LoggerWindow LoggerWindow;
|
||||
typedef struct _MultiTestApp MultiTestApp;
|
||||
|
@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
|
||||
p[i] = MEM_callocN(blocksize, strdup(tagstring));
|
||||
}
|
||||
|
||||
/* Now corrupt a few blocks. */
|
||||
/* now corrupt a few blocks...*/
|
||||
ip = (int *)p[5] - 50;
|
||||
for (i = 0; i < 1000; i++, ip++)
|
||||
*ip = i + 1;
|
||||
|
@@ -867,7 +867,7 @@ IMETHOD void Vector2::Set3DYZ(const Vector& v)
|
||||
data[1]=v(2);
|
||||
}
|
||||
IMETHOD void Vector2::Set3DZX(const Vector& v)
|
||||
// projects v in its XY plane, and sets *this to these values
|
||||
// projects v in its XY plane, and and sets *this to these values
|
||||
{
|
||||
data[0]=v(2);
|
||||
data[1]=v(0);
|
||||
|
@@ -323,7 +323,7 @@ static void get_rgba(
|
||||
float *r, float *g, float *b, float *a, int total_cells, float *data, int sequential)
|
||||
{
|
||||
int i;
|
||||
/* Use offsets to map RGB grids to correct location in data grid. */
|
||||
/* Use offsets to map RGB grids to to correct location in data grid. */
|
||||
int m = 4, i_g = 1, i_b = 2, i_a = 3;
|
||||
if (sequential) {
|
||||
m = 1;
|
||||
|
@@ -85,7 +85,7 @@ struct OpenVDBRemeshData {
|
||||
int out_tottris;
|
||||
int filter_type;
|
||||
enum OpenVDBLevelSet_FilterType filter_bias;
|
||||
enum OpenVDBLevelSet_FilterBias filter_width; /* Parameter for gaussian, median, mean. */
|
||||
enum OpenVDBLevelSet_FilterBias filter_width; /* Parameter for gaussian, median, mean*/
|
||||
|
||||
float voxel_size;
|
||||
float isovalue;
|
||||
|
Submodule release/datafiles/locale updated: 78591466c3...4833954c0a
@@ -1041,11 +1041,6 @@ const bTheme U_theme_default = {
|
||||
.active_object = RGBA(0xffaf29ff),
|
||||
.edited_object = RGBA(0x00806266),
|
||||
.row_alternate = RGBA(0xffffff07),
|
||||
.list = RGBA(0x424242ff),
|
||||
.list_title = RGBA(0xc3c3c3ff),
|
||||
.list_text = RGBA(0xc3c3c3ff),
|
||||
.list_text_hi = RGBA(0xffffff),
|
||||
.hilite = RGBA(0x80808080),
|
||||
},
|
||||
.tarm = {
|
||||
{
|
||||
|
@@ -83,7 +83,5 @@ Exec=blender %f
|
||||
Icon=blender
|
||||
Terminal=false
|
||||
Type=Application
|
||||
PrefersNonDefaultGPU=true
|
||||
X-KDE-RunOnDiscreteGpu=true
|
||||
Categories=Graphics;3DGraphics;
|
||||
MimeType=application/x-blender;
|
||||
|
Submodule release/scripts/addons updated: c84f831539...f86f25e622
Submodule release/scripts/addons_contrib updated: fd1bed98c9...5a82baad9f
@@ -187,7 +187,7 @@ def _template_items_context_panel(menu, key_args_primary):
|
||||
]
|
||||
|
||||
|
||||
def _template_space_region_type_toggle(*, toolbar_key=None, sidebar_key=None, channels_key=None):
|
||||
def _template_space_region_type_toggle(*, toolbar_key=None, sidebar_key=None):
|
||||
items = []
|
||||
if toolbar_key is not None:
|
||||
items.append(
|
||||
@@ -199,12 +199,6 @@ def _template_space_region_type_toggle(*, toolbar_key=None, sidebar_key=None, ch
|
||||
("wm.context_toggle", sidebar_key,
|
||||
{"properties": [("data_path", 'space_data.show_region_ui')]}),
|
||||
)
|
||||
if channels_key is not None:
|
||||
items.append(
|
||||
("wm.context_toggle", channels_key,
|
||||
{"properties": [("data_path", 'space_data.show_region_channels')]}),
|
||||
)
|
||||
|
||||
return items
|
||||
|
||||
|
||||
@@ -3027,7 +3021,6 @@ def km_spreadsheet_generic(_params):
|
||||
items.extend([
|
||||
*_template_space_region_type_toggle(
|
||||
sidebar_key={"type": 'N', "value": 'PRESS'},
|
||||
channels_key={"type": 'T', "value": 'PRESS'},
|
||||
),
|
||||
])
|
||||
|
||||
|
@@ -2143,21 +2143,6 @@ def km_clip_dopesheet_editor(_params):
|
||||
|
||||
return keymap
|
||||
|
||||
def km_spreadsheet_generic(_params):
|
||||
items = []
|
||||
keymap = (
|
||||
"Spreadsheet Generic",
|
||||
{"space_type": 'SPREADSHEET', "region_type": 'WINDOW'},
|
||||
{"items": items},
|
||||
)
|
||||
|
||||
items.extend([
|
||||
*_template_space_region_type_toggle(
|
||||
channels_key={"type": 'T', "value": 'PRESS'},
|
||||
),
|
||||
])
|
||||
|
||||
return keymap
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Animation
|
||||
|
@@ -25,10 +25,6 @@ class CollectionButtonsPanel:
|
||||
bl_region_type = 'WINDOW'
|
||||
bl_context = "collection"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.collection != context.scene.collection
|
||||
|
||||
|
||||
def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from):
|
||||
col.prop(line_type, "use", text=text_disp)
|
||||
@@ -42,6 +38,12 @@ def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from)
|
||||
class COLLECTION_PT_collection_flags(CollectionButtonsPanel, Panel):
|
||||
bl_label = "Restrictions"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
vl = context.view_layer
|
||||
vlc = vl.active_layer_collection
|
||||
return (vlc.name != 'Master Collection')
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
@@ -86,13 +88,6 @@ class COLLECTION_PT_lineart_collection(CollectionButtonsPanel, Panel):
|
||||
row = layout.row()
|
||||
row.prop(collection, "lineart_usage")
|
||||
|
||||
layout.prop(collection, "lineart_use_intersection_mask")
|
||||
|
||||
row = layout.row(align=True, heading="Masks")
|
||||
row.active = collection.lineart_use_intersection_mask
|
||||
for i in range(0,8):
|
||||
row.prop(collection, "lineart_intersection_mask", index=i, text=str(i), toggle=True)
|
||||
|
||||
|
||||
classes = (
|
||||
COLLECTION_PT_collection_flags,
|
||||
|
@@ -20,7 +20,6 @@
|
||||
import bpy
|
||||
from bpy.types import Menu, Panel, UIList
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
class MESH_MT_vertex_group_context_menu(Menu):
|
||||
@@ -118,7 +117,7 @@ class MESH_UL_shape_keys(UIList):
|
||||
split = layout.split(factor=0.66, align=False)
|
||||
split.prop(key_block, "name", text="", emboss=False, icon_value=icon)
|
||||
row = split.row(align=True)
|
||||
row.emboss = 'NONE_OR_STATUS'
|
||||
row.emboss = 'UI_EMBOSS_NONE_OR_STATUS'
|
||||
if key_block.mute or (obj.mode == 'EDIT' and not (obj.use_shape_key_edit_mode and obj.type == 'MESH')):
|
||||
row.active = False
|
||||
if not item.id_data.use_relative:
|
||||
@@ -567,89 +566,6 @@ class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel):
|
||||
_property_type = bpy.types.Mesh
|
||||
|
||||
|
||||
class MESH_UL_attributes(UIList):
|
||||
display_domain_names = {
|
||||
'POINT': "Vertex",
|
||||
'EDGE': "Edge",
|
||||
'FACE': "Face",
|
||||
'CORNER': "Face Corner",
|
||||
}
|
||||
|
||||
def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index):
|
||||
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
|
||||
|
||||
domain_name = self.display_domain_names.get(attribute.domain, "")
|
||||
|
||||
split = layout.split(factor=0.50)
|
||||
split.emboss = 'NONE'
|
||||
split.prop(attribute, "name", text="")
|
||||
sub = split.row()
|
||||
sub.alignment = 'RIGHT'
|
||||
sub.active = False
|
||||
sub.label(text="%s ▶ %s" % (domain_name, data_type.name))
|
||||
|
||||
|
||||
class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel):
|
||||
bl_label = "Attributes"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
def draw(self, context):
|
||||
mesh = context.mesh
|
||||
|
||||
layout = self.layout
|
||||
row = layout.row()
|
||||
|
||||
col = row.column()
|
||||
col.template_list(
|
||||
"MESH_UL_attributes",
|
||||
"attributes",
|
||||
mesh,
|
||||
"attributes",
|
||||
mesh.attributes,
|
||||
"active_index",
|
||||
rows=3,
|
||||
)
|
||||
|
||||
col = row.column(align=True)
|
||||
col.operator("geometry.attribute_add", icon='ADD', text="")
|
||||
col.operator("geometry.attribute_remove", icon='REMOVE', text="")
|
||||
|
||||
self.draw_attribute_warnings(context, layout)
|
||||
|
||||
def draw_attribute_warnings(self, context, layout):
|
||||
attributes_by_name = defaultdict(list)
|
||||
|
||||
ob = context.object
|
||||
mesh = ob.data
|
||||
|
||||
builtin_attribute = object()
|
||||
|
||||
def add_builtin(name):
|
||||
attributes_by_name[name].append(builtin_attribute)
|
||||
|
||||
def add_attributes(layers):
|
||||
for layer in layers:
|
||||
attributes_by_name[layer.name].append(layer)
|
||||
|
||||
add_builtin("position")
|
||||
add_builtin("material_index")
|
||||
add_builtin("shade_smooth")
|
||||
add_builtin("normal")
|
||||
add_builtin("crease")
|
||||
|
||||
add_attributes(mesh.attributes)
|
||||
add_attributes(mesh.uv_layers)
|
||||
add_attributes(mesh.vertex_colors)
|
||||
add_attributes(ob.vertex_groups)
|
||||
|
||||
colliding_names = [name for name, layers in attributes_by_name.items() if len(layers) >= 2]
|
||||
if len(colliding_names) == 0:
|
||||
return
|
||||
|
||||
layout.label(text="Name Collisions: {}".format(", ".join(colliding_names)), icon='INFO')
|
||||
|
||||
|
||||
classes = (
|
||||
MESH_MT_vertex_group_context_menu,
|
||||
MESH_MT_shape_key_context_menu,
|
||||
@@ -658,7 +574,6 @@ classes = (
|
||||
MESH_UL_shape_keys,
|
||||
MESH_UL_uvmaps,
|
||||
MESH_UL_vcols,
|
||||
MESH_UL_attributes,
|
||||
DATA_PT_context_mesh,
|
||||
DATA_PT_vertex_groups,
|
||||
DATA_PT_shape_keys,
|
||||
@@ -666,7 +581,6 @@ classes = (
|
||||
DATA_PT_vertex_colors,
|
||||
DATA_PT_sculpt_vertex_colors,
|
||||
DATA_PT_face_maps,
|
||||
DATA_PT_mesh_attributes,
|
||||
DATA_PT_normals,
|
||||
DATA_PT_texture_space,
|
||||
DATA_PT_remesh,
|
||||
|
@@ -291,18 +291,12 @@ class MATERIAL_PT_lineart(MaterialButtonsPanel, Panel):
|
||||
mat = context.material
|
||||
lineart = mat.lineart
|
||||
|
||||
layout.prop(lineart, "use_material_mask")
|
||||
layout.prop(lineart, "use_transparency")
|
||||
|
||||
row = layout.row(align=True, heading="Masks")
|
||||
row.active = lineart.use_material_mask
|
||||
row.active = lineart.use_transparency
|
||||
for i in range(8):
|
||||
row.prop(lineart, "use_material_mask_bits", text=str(i), index=i, toggle=True)
|
||||
|
||||
row = layout.row(align=True, heading="Custom Occlusion")
|
||||
row.prop(lineart, "use_mat_occlusion", text="")
|
||||
sub = row.row(align=False)
|
||||
sub.active = lineart.use_mat_occlusion
|
||||
sub.prop(lineart, "mat_occlusion", slider=True, text="Levels")
|
||||
row.prop(lineart, "use_transparency_mask", text=str(i), index=i, toggle=True)
|
||||
|
||||
|
||||
classes = (
|
||||
|
@@ -369,10 +369,6 @@ class OUTLINER_PT_filter(Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
|
||||
row = col.row()
|
||||
row.label(icon='RENDERLAYERS')
|
||||
row.prop(space, "use_filter_view_layers", text="All View Layers")
|
||||
|
||||
row = col.row()
|
||||
row.label(icon='OUTLINER_COLLECTION')
|
||||
row.prop(space, "use_filter_collection", text="Collections")
|
||||
|
@@ -162,14 +162,6 @@ class SEQUENCER_HT_header(Header):
|
||||
if tool_settings.use_proportional_edit:
|
||||
row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||
|
||||
if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
|
||||
tool_settings = context.tool_settings
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_snap_sequencer", text="")
|
||||
sub = row.row(align=True)
|
||||
sub.popover(panel="SEQUENCER_PT_snapping")
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(st, "show_strip_overlay", text="", icon='OVERLAY')
|
||||
sub = row.row(align=True)
|
||||
@@ -2272,30 +2264,6 @@ class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
|
||||
bl_category = "Strip"
|
||||
|
||||
|
||||
class SEQUENCER_PT_snapping(Panel):
|
||||
bl_space_type = 'SEQUENCE_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = ""
|
||||
|
||||
def draw(self, context):
|
||||
tool_settings = context.tool_settings
|
||||
sequencer_tool_settings = tool_settings.sequencer_tool_settings
|
||||
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
col = layout.column(heading="Snap to", align=True)
|
||||
col.prop(sequencer_tool_settings, "snap_seq_element", expand=True)
|
||||
|
||||
col = layout.column(heading="Ignore", align=True)
|
||||
col.prop(sequencer_tool_settings, "snap_ignore_muted", text="Muted Strips")
|
||||
col.prop(sequencer_tool_settings, "snap_ignore_sound",text="Sound Strips")
|
||||
|
||||
col = layout.column()
|
||||
col.prop(sequencer_tool_settings, "snap_distance", slider=True, text="Distance")
|
||||
|
||||
|
||||
classes = (
|
||||
SEQUENCER_MT_change,
|
||||
SEQUENCER_HT_tool_header,
|
||||
@@ -2365,8 +2333,6 @@ classes = (
|
||||
|
||||
SEQUENCER_PT_annotation,
|
||||
SEQUENCER_PT_annotation_onion,
|
||||
|
||||
SEQUENCER_PT_snapping,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
@@ -41,6 +41,10 @@ class SPREADSHEET_HT_header(bpy.types.Header):
|
||||
return
|
||||
|
||||
layout.prop(space, "object_eval_state", text="")
|
||||
if space.object_eval_state != 'ORIGINAL':
|
||||
layout.prop(space, "geometry_component_type", text="")
|
||||
if space.geometry_component_type != 'INSTANCES':
|
||||
layout.prop(space, "attribute_domain", text="")
|
||||
|
||||
context_path = space.context_path
|
||||
if space.object_eval_state == 'ORIGINAL':
|
||||
|
@@ -504,17 +504,12 @@ geometry_node_categories = [
|
||||
NodeItem("GeometryNodeCurveSubdivide"),
|
||||
NodeItem("GeometryNodeCurveToMesh"),
|
||||
NodeItem("GeometryNodeCurveResample"),
|
||||
NodeItem("GeometryNodeCurveDeform"),
|
||||
NodeItem("GeometryNodeMeshToCurve"),
|
||||
NodeItem("GeometryNodeCurveToPoints"),
|
||||
NodeItem("GeometryNodeCurveLength"),
|
||||
NodeItem("GeometryNodeCurveReverse"),
|
||||
]),
|
||||
GeometryNodeCategory("GEO_PRIMITIVES_CURVE", "Curve Primitives", items=[
|
||||
NodeItem("GeometryNodeCurveStar"),
|
||||
NodeItem("GeometryNodeCurveSpiral"),
|
||||
NodeItem("GeometryNodeCurveQuadraticBezier"),
|
||||
NodeItem("GeometryNodeCurvePrimitiveBezierSegment"),
|
||||
]),
|
||||
GeometryNodeCategory("GEO_GEOMETRY", "Geometry", items=[
|
||||
NodeItem("GeometryNodeBoundBox"),
|
||||
NodeItem("GeometryNodeConvexHull"),
|
||||
@@ -546,7 +541,7 @@ geometry_node_categories = [
|
||||
NodeItem("GeometryNodeSubdivisionSurface"),
|
||||
NodeItem("GeometryNodeSubdivide"),
|
||||
]),
|
||||
GeometryNodeCategory("GEO_PRIMITIVES_MESH", "Mesh Primitives", items=[
|
||||
GeometryNodeCategory("GEO_PRIMITIVES", "Mesh Primitives", items=[
|
||||
NodeItem("GeometryNodeMeshCircle"),
|
||||
NodeItem("GeometryNodeMeshCone"),
|
||||
NodeItem("GeometryNodeMeshCube"),
|
||||
|
@@ -206,7 +206,7 @@ int BLF_load_mem(const char *name, const unsigned char *mem, int mem_size)
|
||||
{
|
||||
int i = blf_search(name);
|
||||
if (i >= 0) {
|
||||
// font = global_font[i]; /* UNUSED */
|
||||
/*font = global_font[i];*/ /*UNUSED*/
|
||||
return i;
|
||||
}
|
||||
return BLF_load_mem_unique(name, mem, mem_size);
|
||||
|
@@ -329,7 +329,7 @@ void DM_copy_vert_data(struct DerivedMesh *source,
|
||||
int dest_index,
|
||||
int count);
|
||||
|
||||
/* Sets up mpolys for a DM based on face iterators in source. */
|
||||
/*sets up mpolys for a DM based on face iterators in source*/
|
||||
void DM_DupPolys(DerivedMesh *source, DerivedMesh *target);
|
||||
|
||||
void DM_ensure_normals(DerivedMesh *dm);
|
||||
|
@@ -49,30 +49,24 @@ typedef struct EditBone {
|
||||
struct EditBone *next, *prev;
|
||||
/** User-Defined Properties on this Bone */
|
||||
struct IDProperty *prop;
|
||||
/**
|
||||
* Editbones have a one-way link (i.e. children refer
|
||||
/** Editbones have a one-way link (i.e. children refer
|
||||
* to parents. This is converted to a two-way link for
|
||||
* normal bones when leaving editmode.
|
||||
*/
|
||||
* normal bones when leaving editmode. */
|
||||
struct EditBone *parent;
|
||||
/** (64 == MAXBONENAME) */
|
||||
char name[64];
|
||||
/**
|
||||
* Roll along axis. We'll ultimately use the axis/angle method
|
||||
/** Roll along axis. We'll ultimately use the axis/angle method
|
||||
* for determining the transformation matrix of the bone. The axis
|
||||
* is tail-head while roll provides the angle. Refer to Graphics
|
||||
* Gems 1 p. 466 (section IX.6) if it's not already in here somewhere.
|
||||
*/
|
||||
* Gems 1 p. 466 (section IX.6) if it's not already in here somewhere*/
|
||||
float roll;
|
||||
|
||||
/** Orientation and length is implicit during editing */
|
||||
float head[3];
|
||||
float tail[3];
|
||||
/**
|
||||
* All joints are considered to have zero rotation with respect to
|
||||
/** All joints are considered to have zero rotation with respect to
|
||||
* their parents. Therefore any rotations specified during the
|
||||
* animation are automatically relative to the bones' rest positions.
|
||||
*/
|
||||
* animation are automatically relative to the bones' rest positions*/
|
||||
int flag;
|
||||
int layer;
|
||||
char inherit_scale_mode;
|
||||
@@ -151,7 +145,7 @@ typedef struct PoseTree {
|
||||
|
||||
struct bArmature *BKE_armature_add(struct Main *bmain, const char *name);
|
||||
struct bArmature *BKE_armature_from_object(struct Object *ob);
|
||||
int BKE_armature_bonelist_count(const struct ListBase *lb);
|
||||
int BKE_armature_bonelist_count(struct ListBase *lb);
|
||||
void BKE_armature_bonelist_free(struct ListBase *lb, const bool do_id_user);
|
||||
void BKE_armature_editbonelist_free(struct ListBase *lb, const bool do_id_user);
|
||||
|
||||
|
@@ -38,16 +38,12 @@ struct ID;
|
||||
struct ReportList;
|
||||
|
||||
/* Attribute.domain */
|
||||
/**
|
||||
* \warning: Careful when changing existing items. Arrays may be initialized from this (e.g.
|
||||
* #DATASET_layout_hierarchy).
|
||||
*/
|
||||
typedef enum AttributeDomain {
|
||||
ATTR_DOMAIN_AUTO = -1, /* Use for nodes to choose automatically based on other data. */
|
||||
ATTR_DOMAIN_POINT = 0, /* Mesh, Hair or PointCloud Point */
|
||||
ATTR_DOMAIN_EDGE = 1, /* Mesh Edge */
|
||||
ATTR_DOMAIN_FACE = 2, /* Mesh Face */
|
||||
ATTR_DOMAIN_CORNER = 3, /* Mesh Corner */
|
||||
ATTR_DOMAIN_CORNER = 2, /* Mesh Corner */
|
||||
ATTR_DOMAIN_FACE = 3, /* Mesh Face */
|
||||
ATTR_DOMAIN_CURVE = 4, /* Hair Curve */
|
||||
|
||||
ATTR_DOMAIN_NUM
|
||||
|
@@ -39,7 +39,7 @@ extern "C" {
|
||||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 7
|
||||
#define BLENDER_FILE_SUBVERSION 4
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and show a warning if the file
|
||||
|
@@ -107,7 +107,7 @@ typedef struct ClothVertex {
|
||||
float v[3]; /* The velocity of the point. */
|
||||
float xconst[3]; /* constrained position */
|
||||
float x[3]; /* The current position of this vertex. */
|
||||
float xold[3]; /* The previous position of this vertex. */
|
||||
float xold[3]; /* The previous position of this vertex.*/
|
||||
float tx[3]; /* temporary position */
|
||||
float txold[3]; /* temporary old position */
|
||||
float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */
|
||||
@@ -194,7 +194,7 @@ typedef struct ClothSpring {
|
||||
} \
|
||||
((void)0)
|
||||
|
||||
/* Spring types as defined in the paper. */
|
||||
/* Spring types as defined in the paper.*/
|
||||
typedef enum {
|
||||
CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1),
|
||||
CLOTH_SPRING_TYPE_SHEAR = (1 << 2),
|
||||
|
@@ -164,8 +164,7 @@ bool BKE_collection_move(struct Main *bmain,
|
||||
bool BKE_collection_cycle_find(struct Collection *new_ancestor, struct Collection *collection);
|
||||
bool BKE_collection_cycles_fix(struct Main *bmain, struct Collection *collection);
|
||||
|
||||
bool BKE_collection_has_collection(const struct Collection *parent,
|
||||
const struct Collection *collection);
|
||||
bool BKE_collection_has_collection(struct Collection *parent, struct Collection *collection);
|
||||
|
||||
void BKE_collection_parent_relations_rebuild(struct Collection *collection);
|
||||
void BKE_main_collections_parent_relations_rebuild(struct Main *bmain);
|
||||
|
@@ -63,7 +63,7 @@ typedef struct CollPair {
|
||||
float time; /* collision time, from 0 up to 1 */
|
||||
|
||||
/* mesh-mesh collision */
|
||||
#ifdef WITH_ELTOPO /* Either ap* or bp* can be set, but not both. */
|
||||
#ifdef WITH_ELTOPO /*either ap* or bp* can be set, but not both*/
|
||||
float bary[3];
|
||||
int ap1, ap2, ap3, collp, bp1, bp2, bp3;
|
||||
int collface;
|
||||
|
@@ -121,7 +121,6 @@ void BKE_curve_material_remap(struct Curve *cu, const unsigned int *remap, unsig
|
||||
void BKE_curve_smooth_flag_set(struct Curve *cu, const bool use_smooth);
|
||||
|
||||
ListBase *BKE_curve_nurbs_get(struct Curve *cu);
|
||||
const ListBase *BKE_curve_nurbs_get_for_read(const struct Curve *cu);
|
||||
|
||||
int BKE_curve_nurb_vert_index_get(const struct Nurb *nu, const void *vert);
|
||||
void BKE_curve_nurb_active_set(struct Curve *cu, const struct Nurb *nu);
|
||||
@@ -154,10 +153,9 @@ void BKE_curve_editNurb_keyIndex_delCV(struct GHash *keyindex, const void *cv);
|
||||
void BKE_curve_editNurb_keyIndex_free(struct GHash **keyindex);
|
||||
void BKE_curve_editNurb_free(struct Curve *cu);
|
||||
struct ListBase *BKE_curve_editNurbs_get(struct Curve *cu);
|
||||
const struct ListBase *BKE_curve_editNurbs_get_for_read(const struct Curve *cu);
|
||||
|
||||
void BKE_curve_bevelList_free(struct ListBase *bev);
|
||||
void BKE_curve_bevelList_make(struct Object *ob, const struct ListBase *nurbs, bool for_render);
|
||||
void BKE_curve_bevelList_make(struct Object *ob, struct ListBase *nurbs, bool for_render);
|
||||
ListBase BKE_curve_bevel_make(const struct Curve *curve);
|
||||
|
||||
void BKE_curve_forward_diff_bezier(
|
||||
|
@@ -41,7 +41,7 @@ struct CustomData_MeshMasks;
|
||||
struct ID;
|
||||
typedef uint64_t CustomDataMask;
|
||||
|
||||
/* A data type large enough to hold 1 element from any custom-data layer type. */
|
||||
/*a data type large enough to hold 1 element from any customdata layer type*/
|
||||
typedef struct {
|
||||
unsigned char data[64];
|
||||
} CDBlockBytes;
|
||||
@@ -109,9 +109,9 @@ bool CustomData_bmesh_has_free(const struct CustomData *data);
|
||||
*/
|
||||
bool CustomData_has_referenced(const struct CustomData *data);
|
||||
|
||||
/* Copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to
|
||||
/* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to
|
||||
* another, while not overwriting anything else (e.g. flags). probably only
|
||||
* implemented for mloopuv/mloopcol, for now. */
|
||||
* implemented for mloopuv/mloopcol, for now.*/
|
||||
void CustomData_data_copy_value(int type, const void *source, void *dest);
|
||||
|
||||
/* Same as above, but doing advanced mixing.
|
||||
@@ -121,7 +121,7 @@ void CustomData_data_mix_value(
|
||||
|
||||
/* compares if data1 is equal to data2. type is a valid CustomData type
|
||||
* enum (e.g. CD_MLOOPUV). the layer type's equal function is used to compare
|
||||
* the data, if it exists, otherwise memcmp is used. */
|
||||
* the data, if it exists, otherwise memcmp is used.*/
|
||||
bool CustomData_data_equals(int type, const void *data1, const void *data2);
|
||||
void CustomData_data_initminmax(int type, void *min, void *max);
|
||||
void CustomData_data_dominmax(int type, const void *data, void *min, void *max);
|
||||
@@ -158,7 +158,7 @@ void CustomData_realloc(struct CustomData *data, int totelem);
|
||||
|
||||
/* bmesh version of CustomData_merge; merges the layouts of source and dest,
|
||||
* then goes through the mesh and makes sure all the customdata blocks are
|
||||
* consistent with the new layout. */
|
||||
* consistent with the new layout.*/
|
||||
bool CustomData_bmesh_merge(const struct CustomData *source,
|
||||
struct CustomData *dest,
|
||||
CustomDataMask mask,
|
||||
@@ -186,7 +186,7 @@ void CustomData_free_temporary(struct CustomData *data, int totelem);
|
||||
*/
|
||||
void *CustomData_add_layer(
|
||||
struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem);
|
||||
/* Same as above but accepts a name. */
|
||||
/*same as above but accepts a name */
|
||||
void *CustomData_add_layer_named(struct CustomData *data,
|
||||
int type,
|
||||
eCDAllocType alloctype,
|
||||
@@ -233,9 +233,6 @@ void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
|
||||
const int totelem);
|
||||
bool CustomData_is_referenced_layer(struct CustomData *data, int type);
|
||||
|
||||
/* Duplicate all the layers with flag NOFREE, and remove the flag from duplicated layers. */
|
||||
void CustomData_duplicate_referenced_layers(CustomData *data, int totelem);
|
||||
|
||||
/* set the CD_FLAG_NOCOPY flag in custom data layers where the mask is
|
||||
* zero for the layer type, so only layer types specified by the mask
|
||||
* will be copied
|
||||
@@ -446,7 +443,7 @@ void CustomData_validate_layer_name(const struct CustomData *data,
|
||||
* only after this test passes, layer->data should be assigned */
|
||||
bool CustomData_verify_versions(struct CustomData *data, int index);
|
||||
|
||||
/* BMesh specific custom-data stuff. */
|
||||
/*BMesh specific customdata stuff*/
|
||||
void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *ldata, int totloop);
|
||||
void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *ldata, int total);
|
||||
void CustomData_bmesh_update_active_layers(struct CustomData *fdata, struct CustomData *ldata);
|
||||
@@ -539,7 +536,7 @@ enum {
|
||||
CDT_MIX_ADD = 17,
|
||||
CDT_MIX_SUB = 18,
|
||||
CDT_MIX_MUL = 19,
|
||||
/* Etc. */
|
||||
/* etc. etc. */
|
||||
};
|
||||
|
||||
typedef struct CustomDataTransferLayerMap {
|
||||
|
@@ -87,11 +87,13 @@ bool BKE_displist_has_faces(const struct ListBase *lb);
|
||||
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph,
|
||||
const struct Scene *scene,
|
||||
struct Object *ob,
|
||||
const bool for_render);
|
||||
const bool for_render,
|
||||
const bool for_orco);
|
||||
void BKE_displist_make_curveTypes_forRender(struct Depsgraph *depsgraph,
|
||||
const struct Scene *scene,
|
||||
struct Object *ob,
|
||||
struct ListBase *dispbase,
|
||||
const bool for_orco,
|
||||
struct Mesh **r_final);
|
||||
void BKE_displist_make_mball(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
|
||||
void BKE_displist_make_mball_forRender(struct Depsgraph *depsgraph,
|
||||
|
@@ -53,12 +53,12 @@ struct Scene;
|
||||
typedef struct BMEditMesh {
|
||||
struct BMesh *bm;
|
||||
|
||||
/* This is for undoing failed operations. */
|
||||
/*this is for undoing failed operations*/
|
||||
struct BMEditMesh *emcopy;
|
||||
int emcopyusers;
|
||||
|
||||
/* we store tessellations as triplets of three loops,
|
||||
* which each define a triangle. */
|
||||
* which each define a triangle.*/
|
||||
struct BMLoop *(*looptris)[3];
|
||||
int tottri;
|
||||
|
||||
@@ -67,14 +67,14 @@ typedef struct BMEditMesh {
|
||||
/** Cached cage bounding box for selection. */
|
||||
struct BoundBox *bb_cage;
|
||||
|
||||
/** Evaluated mesh data-mask. */
|
||||
/*derivedmesh stuff*/
|
||||
CustomData_MeshMasks lastDataMask;
|
||||
|
||||
/* Selection mode. */
|
||||
/*selection mode*/
|
||||
short selectmode;
|
||||
short mat_nr;
|
||||
|
||||
/* Temp variables for x-mirror editing. */
|
||||
/*temp variables for x-mirror editing*/
|
||||
int mirror_cdlayer; /* -1 is invalid */
|
||||
|
||||
/**
|
||||
|
@@ -179,7 +179,7 @@ unsigned int BKE_sim_debug_data_hash(int i);
|
||||
unsigned int BKE_sim_debug_data_hash_combine(unsigned int kx, unsigned int ky);
|
||||
|
||||
/* _VA_SIM_DEBUG_HASH#(i, ...): combined hash value of multiple integers */
|
||||
/* Internal helpers. */
|
||||
/* internal helpers*/
|
||||
#define _VA_SIM_DEBUG_HASH1(a) (BKE_sim_debug_data_hash(a))
|
||||
#define _VA_SIM_DEBUG_HASH2(a, b) \
|
||||
(BKE_sim_debug_data_hash_combine(BKE_sim_debug_data_hash(a), _VA_SIM_DEBUG_HASH1(b)))
|
||||
|
@@ -227,9 +227,9 @@ struct FCurve *BKE_fcurve_find_by_rna_context_ui(struct bContext *C,
|
||||
/* Binary search algorithm for finding where to 'insert' BezTriple with given frame number.
|
||||
* Returns the index to insert at (data already at that index will be offset if replace is 0)
|
||||
*/
|
||||
int BKE_fcurve_bezt_binarysearch_index(const struct BezTriple array[],
|
||||
const float frame,
|
||||
const int arraylen,
|
||||
int BKE_fcurve_bezt_binarysearch_index(struct BezTriple array[],
|
||||
float frame,
|
||||
int arraylen,
|
||||
bool *r_replace);
|
||||
|
||||
/* fcurve_cache.c */
|
||||
|
@@ -66,8 +66,8 @@ typedef struct EditFont {
|
||||
|
||||
} EditFont;
|
||||
|
||||
bool BKE_vfont_is_builtin(const struct VFont *vfont);
|
||||
void BKE_vfont_builtin_register(const void *mem, int size);
|
||||
bool BKE_vfont_is_builtin(struct VFont *vfont);
|
||||
void BKE_vfont_builtin_register(void *mem, int size);
|
||||
|
||||
void BKE_vfont_free_data(struct VFont *vfont);
|
||||
struct VFont *BKE_vfont_builtin_get(void);
|
||||
|
@@ -280,6 +280,8 @@ struct GeometrySet {
|
||||
void compute_boundbox_without_instances(blender::float3 *r_min, blender::float3 *r_max) const;
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &stream, const GeometrySet &geometry_set);
|
||||
friend bool operator==(const GeometrySet &a, const GeometrySet &b);
|
||||
uint64_t hash() const;
|
||||
|
||||
void clear();
|
||||
|
||||
|
@@ -149,7 +149,7 @@ enum {
|
||||
G_DEBUG_DEPSGRAPH_TIME | G_DEBUG_DEPSGRAPH_UUID),
|
||||
G_DEBUG_SIMDATA = (1 << 15), /* sim debug data display */
|
||||
G_DEBUG_GPU = (1 << 16), /* gpu debug */
|
||||
G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...). */
|
||||
G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...)*/
|
||||
G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* force gpu workarounds bypassing detections. */
|
||||
G_DEBUG_XR = (1 << 19), /* XR/OpenXR messages */
|
||||
G_DEBUG_XR_TIME = (1 << 20), /* XR/OpenXR timing messages */
|
||||
|
@@ -214,10 +214,6 @@ void BKE_gpencil_layer_mask_remove_ref(struct bGPdata *gpd, const char *name);
|
||||
struct bGPDlayer_Mask *BKE_gpencil_layer_mask_named_get(struct bGPDlayer *gpl, const char *name);
|
||||
void BKE_gpencil_layer_mask_sort(struct bGPdata *gpd, struct bGPDlayer *gpl);
|
||||
void BKE_gpencil_layer_mask_sort_all(struct bGPdata *gpd);
|
||||
void BKE_gpencil_layer_mask_copy(const struct bGPDlayer *gpl_src, struct bGPDlayer *gpl_dst);
|
||||
void BKE_gpencil_layer_mask_cleanup(struct bGPdata *gpd, struct bGPDlayer *gpl);
|
||||
void BKE_gpencil_layer_mask_cleanup_all_layers(struct bGPdata *gpd);
|
||||
|
||||
void BKE_gpencil_layer_frames_sort(struct bGPDlayer *gpl, bool *r_has_duplicate_frames);
|
||||
|
||||
struct bGPDlayer *BKE_gpencil_layer_get_by_name(struct bGPdata *gpd,
|
||||
|
@@ -90,7 +90,7 @@ typedef struct GPencilPointCoordinates {
|
||||
float pressure;
|
||||
} GPencilPointCoordinates;
|
||||
|
||||
int BKE_gpencil_stroke_point_count(const struct bGPdata *gpd);
|
||||
int BKE_gpencil_stroke_point_count(struct bGPdata *gpd);
|
||||
void BKE_gpencil_point_coords_get(struct bGPdata *gpd, GPencilPointCoordinates *elem_data);
|
||||
void BKE_gpencil_point_coords_apply(struct bGPdata *gpd, const GPencilPointCoordinates *elem_data);
|
||||
void BKE_gpencil_point_coords_apply_with_mat4(struct bGPdata *gpd,
|
||||
|
@@ -67,7 +67,7 @@ void IDP_AppendArray(struct IDProperty *prop, struct IDProperty *item);
|
||||
void IDP_ResizeIDPArray(struct IDProperty *prop, int len);
|
||||
|
||||
/* ----------- Numeric Array Type ----------- */
|
||||
/* This function works for strings too! */
|
||||
/*this function works for strings too!*/
|
||||
void IDP_ResizeArray(struct IDProperty *prop, int newlen);
|
||||
void IDP_FreeArray(struct IDProperty *prop);
|
||||
|
||||
|
@@ -82,8 +82,8 @@ typedef void (*IDTypeMakeLocalFunction)(struct Main *bmain, struct ID *id, const
|
||||
typedef void (*IDTypeForeachIDFunction)(struct ID *id, struct LibraryForeachIDData *data);
|
||||
|
||||
typedef enum eIDTypeInfoCacheCallbackFlags {
|
||||
/** Indicates to the callback that cache may be stored in the .blend file,
|
||||
* so its pointer should not be cleared at read-time. */
|
||||
/** Indicates to the callback that that cache may be stored in the .blend file, so its pointer
|
||||
* should not be cleared at read-time. */
|
||||
IDTYPE_CACHE_CB_FLAGS_PERSISTENT = 1 << 0,
|
||||
} eIDTypeInfoCacheCallbackFlags;
|
||||
typedef void (*IDTypeForeachCacheFunctionCallback)(struct ID *id,
|
||||
|
@@ -76,7 +76,7 @@ void BKE_keyblock_update_from_lattice(struct Lattice *lt, struct KeyBlock *kb);
|
||||
void BKE_keyblock_convert_from_lattice(struct Lattice *lt, struct KeyBlock *kb);
|
||||
void BKE_keyblock_convert_to_lattice(struct KeyBlock *kb, struct Lattice *lt);
|
||||
|
||||
int BKE_keyblock_curve_element_count(const struct ListBase *nurb);
|
||||
int BKE_keyblock_curve_element_count(struct ListBase *nurb);
|
||||
void BKE_keyblock_curve_data_transform(const struct ListBase *nurb,
|
||||
const float mat[4][4],
|
||||
const void *src,
|
||||
|
@@ -92,7 +92,7 @@ bool BKE_layer_collection_activate(struct ViewLayer *view_layer, struct LayerCol
|
||||
struct LayerCollection *BKE_layer_collection_activate_parent(struct ViewLayer *view_layer,
|
||||
struct LayerCollection *lc);
|
||||
|
||||
int BKE_layer_collection_count(const struct ViewLayer *view_layer);
|
||||
int BKE_layer_collection_count(struct ViewLayer *view_layer);
|
||||
|
||||
struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *view_layer,
|
||||
const int index);
|
||||
@@ -107,8 +107,8 @@ void BKE_layer_collection_local_sync_all(const struct Main *bmain);
|
||||
void BKE_main_collection_sync_remap(const struct Main *bmain);
|
||||
|
||||
struct LayerCollection *BKE_layer_collection_first_from_scene_collection(
|
||||
const struct ViewLayer *view_layer, const struct Collection *collection);
|
||||
bool BKE_view_layer_has_collection(const struct ViewLayer *view_layer,
|
||||
struct ViewLayer *view_layer, const struct Collection *collection);
|
||||
bool BKE_view_layer_has_collection(struct ViewLayer *view_layer,
|
||||
const struct Collection *collection);
|
||||
bool BKE_scene_has_object(struct Scene *scene, struct Object *ob);
|
||||
|
||||
@@ -367,7 +367,7 @@ void BKE_view_layer_visible_bases_iterator_end(BLI_Iterator *iter);
|
||||
struct ObjectsInViewLayerParams {
|
||||
uint no_dup_data : 1;
|
||||
|
||||
bool (*filter_fn)(const struct Object *ob, void *user_data);
|
||||
bool (*filter_fn)(struct Object *ob, void *user_data);
|
||||
void *filter_userdata;
|
||||
};
|
||||
|
||||
@@ -388,7 +388,7 @@ struct ObjectsInModeParams {
|
||||
int object_mode;
|
||||
uint no_dup_data : 1;
|
||||
|
||||
bool (*filter_fn)(const struct Object *ob, void *user_data);
|
||||
bool (*filter_fn)(struct Object *ob, void *user_data);
|
||||
void *filter_userdata;
|
||||
};
|
||||
|
||||
@@ -412,8 +412,8 @@ struct Object **BKE_view_layer_array_from_objects_in_mode_params(
|
||||
BKE_view_layer_array_from_bases_in_mode_params( \
|
||||
view_layer, v3d, r_len, &(const struct ObjectsInModeParams)__VA_ARGS__)
|
||||
|
||||
bool BKE_view_layer_filter_edit_mesh_has_uvs(const struct Object *ob, void *user_data);
|
||||
bool BKE_view_layer_filter_edit_mesh_has_edges(const struct Object *ob, void *user_data);
|
||||
bool BKE_view_layer_filter_edit_mesh_has_uvs(struct Object *ob, void *user_data);
|
||||
bool BKE_view_layer_filter_edit_mesh_has_edges(struct Object *ob, void *user_data);
|
||||
|
||||
/* Utility macros that wrap common args (add more as needed). */
|
||||
|
||||
|
@@ -99,8 +99,6 @@ void BKE_lib_override_library_main_resync(struct Main *bmain,
|
||||
|
||||
void BKE_lib_override_library_delete(struct Main *bmain, struct ID *id_root);
|
||||
|
||||
void BKE_lib_override_library_make_local(struct ID *id);
|
||||
|
||||
struct IDOverrideLibraryProperty *BKE_lib_override_library_property_find(
|
||||
struct IDOverrideLibrary *override, const char *rna_path);
|
||||
struct IDOverrideLibraryProperty *BKE_lib_override_library_property_get(
|
||||
|
@@ -128,8 +128,7 @@ struct Mesh *BKE_mesh_copy_for_eval(struct Mesh *source, bool reference);
|
||||
/* These functions construct a new Mesh,
|
||||
* contrary to BKE_mesh_from_nurbs which modifies ob itself. */
|
||||
struct Mesh *BKE_mesh_new_nomain_from_curve(struct Object *ob);
|
||||
struct Mesh *BKE_mesh_new_nomain_from_curve_displist(const struct Object *ob,
|
||||
const struct ListBase *dispbase);
|
||||
struct Mesh *BKE_mesh_new_nomain_from_curve_displist(struct Object *ob, struct ListBase *dispbase);
|
||||
|
||||
bool BKE_mesh_ensure_facemap_customdata(struct Mesh *me);
|
||||
bool BKE_mesh_clear_facemap_customdata(struct Mesh *me);
|
||||
@@ -152,7 +151,7 @@ int BKE_mesh_nurbs_to_mdata(struct Object *ob,
|
||||
struct MPoly **r_allpoly,
|
||||
int *r_totloop,
|
||||
int *r_totpoly);
|
||||
int BKE_mesh_nurbs_displist_to_mdata(const struct Object *ob,
|
||||
int BKE_mesh_nurbs_displist_to_mdata(struct Object *ob,
|
||||
const struct ListBase *dispbase,
|
||||
struct MVert **r_allvert,
|
||||
int *r_totvert,
|
||||
|
@@ -36,7 +36,7 @@ typedef struct MeshPairRemapItem {
|
||||
int sources_num;
|
||||
int *indices_src; /* NULL if no source found. */
|
||||
float *weights_src; /* NULL if no source found, else, always normalized! */
|
||||
/* UNUSED (at the moment). */
|
||||
/* UNUSED (at the moment)*/
|
||||
// float hit_dist; /* FLT_MAX if irrelevant or no source found. */
|
||||
int island; /* For loops only. */
|
||||
} MeshPairRemapItem;
|
||||
|
@@ -1439,10 +1439,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree,
|
||||
#define GEO_NODE_SEPARATE_COMPONENTS 1059
|
||||
#define GEO_NODE_CURVE_SUBDIVIDE 1060
|
||||
#define GEO_NODE_RAYCAST 1061
|
||||
#define GEO_NODE_CURVE_PRIMITIVE_STAR 1062
|
||||
#define GEO_NODE_CURVE_PRIMITIVE_SPIRAL 1063
|
||||
#define GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER 1064
|
||||
#define GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT 1065
|
||||
#define GEO_NODE_CURVE_DEFORM 1062
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@@ -382,13 +382,14 @@ void BKE_object_data_batch_cache_dirty_tag(struct ID *object_data);
|
||||
/* this function returns a superset of the scenes selection based on relationships */
|
||||
|
||||
typedef enum eObRelationTypes {
|
||||
OB_REL_NONE = 0, /* Just the selection as is. */
|
||||
OB_REL_PARENT = (1 << 0), /* Immediate parent. */
|
||||
OB_REL_PARENT_RECURSIVE = (1 << 1), /* Parents up to root of selection tree. */
|
||||
OB_REL_CHILDREN = (1 << 2), /* Immediate children. */
|
||||
OB_REL_CHILDREN_RECURSIVE = (1 << 3), /* All children. */
|
||||
OB_REL_MOD_ARMATURE = (1 << 4), /* Armatures related to the selected objects. */
|
||||
// OB_REL_SCENE_CAMERA = (1 << 5), /* You might want the scene camera too even if unselected? */
|
||||
OB_REL_NONE = 0, /* just the selection as is */
|
||||
OB_REL_PARENT = (1 << 0), /* immediate parent */
|
||||
OB_REL_PARENT_RECURSIVE = (1 << 1), /* parents up to root of selection tree*/
|
||||
OB_REL_CHILDREN = (1 << 2), /* immediate children */
|
||||
OB_REL_CHILDREN_RECURSIVE = (1 << 3), /* All children */
|
||||
OB_REL_MOD_ARMATURE = (1 << 4), /* Armatures related to the selected objects */
|
||||
/* OB_REL_SCENE_CAMERA = (1 << 5), */ /* you might want the scene camera too even if unselected?
|
||||
*/
|
||||
} eObRelationTypes;
|
||||
|
||||
typedef enum eObjectSet {
|
||||
|
@@ -78,7 +78,7 @@ struct Scene;
|
||||
for (p = 0; p < psys->totpart; p++) \
|
||||
if ((pa = psys->particles + p)->state.time > 0.0f)
|
||||
|
||||
/* Fast but sure way to get the modifier. */
|
||||
/* fast but sure way to get the modifier*/
|
||||
#define PARTICLE_PSMD \
|
||||
ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
|
||||
|
||||
@@ -190,7 +190,7 @@ typedef struct ParticleCollisionElement {
|
||||
/* pointers to original data */
|
||||
float *x[3], *v[3];
|
||||
|
||||
/* Values interpolated from original data. */
|
||||
/* values interpolated from original data*/
|
||||
float x0[3], x1[3], x2[3], p[3];
|
||||
|
||||
/* results for found intersection point */
|
||||
|
@@ -474,7 +474,7 @@ bool BKE_pbvh_node_vert_update_check_any(PBVH *pbvh, PBVHNode *node);
|
||||
// void BKE_pbvh_node_BB_reset(PBVHNode *node);
|
||||
// void BKE_pbvh_node_BB_expand(PBVHNode *node, float co[3]);
|
||||
|
||||
bool pbvh_has_mask(const PBVH *pbvh);
|
||||
bool pbvh_has_mask(PBVH *pbvh);
|
||||
void pbvh_show_mask_set(PBVH *pbvh, bool show_mask);
|
||||
|
||||
bool pbvh_has_face_sets(PBVH *pbvh);
|
||||
|
@@ -172,7 +172,7 @@ void BKE_shaderfx_copydata_ex(struct ShaderFxData *fx,
|
||||
void BKE_shaderfx_copy(struct ListBase *dst, const struct ListBase *src);
|
||||
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *userData);
|
||||
|
||||
bool BKE_shaderfx_has_gpencil(const struct Object *ob);
|
||||
bool BKE_shaderfx_has_gpencil(struct Object *ob);
|
||||
|
||||
void BKE_shaderfx_blend_write(struct BlendWriter *writer, struct ListBase *fxbase);
|
||||
void BKE_shaderfx_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb);
|
||||
|
@@ -32,7 +32,6 @@
|
||||
#include "BKE_attribute_math.hh"
|
||||
|
||||
struct Curve;
|
||||
struct ListBase;
|
||||
|
||||
class Spline;
|
||||
using SplinePtr = std::unique_ptr<Spline>;
|
||||
@@ -56,6 +55,8 @@ using SplinePtr = std::unique_ptr<Spline>;
|
||||
* along the length of a curve.
|
||||
* 3. #sample_uniform_index_factors returns an array that stores uniform-length samples
|
||||
* along the spline which can be used to interpolate data from method 1.
|
||||
* 4. #sample_length_parameters_to_index_factors does the same, but uses arbitrary parameter
|
||||
* inputs, instead of sampling uniformly.
|
||||
*
|
||||
* Commonly used evaluated data is stored in caches on the spline itself so that operations on
|
||||
* splines don't need to worry about taking ownership of evaluated data when they don't need to.
|
||||
@@ -168,8 +169,11 @@ class Spline {
|
||||
};
|
||||
LookupResult lookup_evaluated_factor(const float factor) const;
|
||||
LookupResult lookup_evaluated_length(const float length) const;
|
||||
LookupResult lookup_evaluated_length_cyclic(const float length) const;
|
||||
|
||||
blender::Array<float> sample_uniform_index_factors(const int samples_size) const;
|
||||
void sample_length_parameters_to_index_factors(blender::MutableSpan<float> parameters) const;
|
||||
|
||||
LookupResult lookup_data_from_index_factor(const float index_factor) const;
|
||||
|
||||
void sample_with_index_factors(const blender::fn::GVArray &src,
|
||||
@@ -547,6 +551,4 @@ struct CurveEval {
|
||||
void assert_valid_point_attributes() const;
|
||||
};
|
||||
|
||||
std::unique_ptr<CurveEval> curve_eval_from_dna_curve(const Curve &curve,
|
||||
const ListBase &nurbs_list);
|
||||
std::unique_ptr<CurveEval> curve_eval_from_dna_curve(const Curve &dna_curve);
|
||||
std::unique_ptr<CurveEval> curve_eval_from_dna_curve(const Curve &curve);
|
||||
|
@@ -48,7 +48,7 @@ char *txt_to_buf(struct Text *text, int *r_buf_strlen);
|
||||
void txt_clean_text(struct Text *text);
|
||||
void txt_order_cursors(struct Text *text, const bool reverse);
|
||||
int txt_find_string(struct Text *text, const char *findstr, int wrap, int match_case);
|
||||
bool txt_has_sel(const struct Text *text);
|
||||
bool txt_has_sel(struct Text *text);
|
||||
int txt_get_span(struct TextLine *from, struct TextLine *to);
|
||||
void txt_move_up(struct Text *text, const bool sel);
|
||||
void txt_move_down(struct Text *text, const bool sel);
|
||||
@@ -85,8 +85,8 @@ bool txt_uncomment(struct Text *text);
|
||||
void txt_move_lines(struct Text *text, const int direction);
|
||||
void txt_duplicate_line(struct Text *text);
|
||||
int txt_setcurr_tab_spaces(struct Text *text, int space);
|
||||
bool txt_cursor_is_line_start(const struct Text *text);
|
||||
bool txt_cursor_is_line_end(const struct Text *text);
|
||||
bool txt_cursor_is_line_start(struct Text *text);
|
||||
bool txt_cursor_is_line_end(struct Text *text);
|
||||
|
||||
int txt_calc_tab_left(struct TextLine *tl, int ch);
|
||||
int txt_calc_tab_right(struct TextLine *tl, int ch);
|
||||
|
@@ -178,7 +178,7 @@ UndoStack *BKE_undosys_stack_create(void);
|
||||
void BKE_undosys_stack_destroy(UndoStack *ustack);
|
||||
void BKE_undosys_stack_clear(UndoStack *ustack);
|
||||
void BKE_undosys_stack_clear_active(UndoStack *ustack);
|
||||
bool BKE_undosys_stack_has_undo(const UndoStack *ustack, const char *name);
|
||||
bool BKE_undosys_stack_has_undo(UndoStack *ustack, const char *name);
|
||||
void BKE_undosys_stack_init_from_main(UndoStack *ustack, struct Main *bmain);
|
||||
void BKE_undosys_stack_init_from_context(UndoStack *ustack, struct bContext *C);
|
||||
UndoStep *BKE_undosys_stack_active_with_type(UndoStack *ustack, const UndoType *ut);
|
||||
|
@@ -486,7 +486,8 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
|
||||
|
||||
/* If grp is NULL, that means we fell through, and this F-Curve should be added as the new
|
||||
* first since group is (effectively) the first group. Thus, the existing first F-Curve becomes
|
||||
* the second in the chain, etc. */
|
||||
* the second in the chain, etc. etc.
|
||||
*/
|
||||
if (grp == NULL) {
|
||||
BLI_insertlinkbefore(&act->curves, act->curves.first, fcurve);
|
||||
}
|
||||
@@ -1855,7 +1856,7 @@ void BKE_pose_blend_write(BlendWriter *writer, bPose *pose, bArmature *arm)
|
||||
/* Write channels */
|
||||
LISTBASE_FOREACH (bPoseChannel *, chan, &pose->chanbase) {
|
||||
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
|
||||
* of library blocks that implement this. */
|
||||
* of library blocks that implement this.*/
|
||||
if (chan->prop) {
|
||||
IDP_BlendWrite(writer, chan->prop);
|
||||
}
|
||||
|
@@ -343,7 +343,7 @@ static void action_flip_pchan(Object *ob_arm,
|
||||
} \
|
||||
((void)0)
|
||||
|
||||
/* Write the values back the F-curves. */
|
||||
/* Write the values back the the F-curves. */
|
||||
WRITE_ARRAY_FLT(loc);
|
||||
WRITE_ARRAY_FLT(eul);
|
||||
WRITE_ARRAY_FLT(quat);
|
||||
|
@@ -200,7 +200,7 @@ bool BKE_appdir_folder_documents(char *dir)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Ghost couldn't give us a documents path, let's try if we can find it ourselves. */
|
||||
/* Ghost couldn't give us a documents path, let's try if we can find it ourselves.*/
|
||||
|
||||
const char *home_path = BKE_appdir_folder_home();
|
||||
if (!home_path || !BLI_is_dir(home_path)) {
|
||||
|
@@ -198,7 +198,7 @@ static void write_bone(BlendWriter *writer, Bone *bone)
|
||||
BLO_write_struct(writer, Bone, bone);
|
||||
|
||||
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
|
||||
* of library blocks that implement this. */
|
||||
* of library blocks that implement this.*/
|
||||
if (bone->prop) {
|
||||
IDP_BlendWrite(writer, bone->prop);
|
||||
}
|
||||
@@ -358,7 +358,7 @@ bArmature *BKE_armature_from_object(Object *ob)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int BKE_armature_bonelist_count(const ListBase *lb)
|
||||
int BKE_armature_bonelist_count(ListBase *lb)
|
||||
{
|
||||
int i = 0;
|
||||
LISTBASE_FOREACH (Bone *, bone, lb) {
|
||||
|
@@ -1197,7 +1197,7 @@ static blender::bke::OutputAttribute create_output_attribute(
|
||||
cpp_type->size() * domain_size, cpp_type->alignment(), __func__);
|
||||
if (ignore_old_values) {
|
||||
/* This does nothing for trivially constructible types, but is necessary for correctness. */
|
||||
cpp_type->default_construct_n(data, domain);
|
||||
cpp_type->construct_default_n(data, domain);
|
||||
}
|
||||
else {
|
||||
/* Fill the temporary array with values from the existing attribute. */
|
||||
|
@@ -272,7 +272,7 @@ static void setup_app_data(bContext *C,
|
||||
|
||||
/* We need to tag this here because events may be handled immediately after.
|
||||
* only the current screen is important because we won't have to handle
|
||||
* events from multiple screens at once. */
|
||||
* events from multiple screens at once.*/
|
||||
if (curscreen) {
|
||||
BKE_screen_gizmo_tag_refresh(curscreen);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user