Merge branch 'master' into sculpt-dev
This commit is contained in:
commit
e09d9c86b6
|
@ -684,6 +684,8 @@ class ShaderImageTextureWrapper():
|
|||
self.owner_shader._grid_to_location(-1, 0 + self.grid_row_diff, dst_node=node_image, ref_node=self.node_dst)
|
||||
|
||||
tree.links.new(node_image.outputs["Alpha" if self.use_alpha else "Color"], self.socket_dst)
|
||||
if self.use_alpha:
|
||||
self.owner_shader.material.blend_method = 'BLEND'
|
||||
|
||||
self._node_image = node_image
|
||||
return self._node_image
|
||||
|
@ -703,6 +705,13 @@ class ShaderImageTextureWrapper():
|
|||
if image.colorspace_settings.is_data != self.colorspace_is_data and image.users >= 1:
|
||||
image = image.copy()
|
||||
image.colorspace_settings.name = self.colorspace_name
|
||||
if self.use_alpha:
|
||||
# Try to be smart, and only use image's alpha output if image actually has alpha data.
|
||||
tree = self.owner_shader.material.node_tree
|
||||
if image.channels < 4 or image.depth in {24, 8}:
|
||||
tree.links.new(self.node_image.outputs["Color"], self.socket_dst)
|
||||
else:
|
||||
tree.links.new(self.node_image.outputs["Alpha"], self.socket_dst)
|
||||
self.node_image.image = image
|
||||
|
||||
image = property(image_get, image_set)
|
||||
|
|
|
@ -2474,12 +2474,10 @@ float SCULPT_brush_strength_factor(SculptSession *ss,
|
|||
* across the symmetry axis and rotate it back to the original
|
||||
* position in order to project it. This insures that the
|
||||
* brush texture will be oriented correctly. */
|
||||
|
||||
flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass);
|
||||
|
||||
if (cache->radial_symmetry_pass) {
|
||||
mul_m4_v3(cache->symm_rot_mat_inv, symm_point);
|
||||
mul_m4_v3(cache->symm_rot_mat_inv, point);
|
||||
}
|
||||
flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass);
|
||||
|
||||
ED_view3d_project_float_v2_m4(cache->vc->region, symm_point, point_2d, cache->projection_mat);
|
||||
|
||||
|
|
|
@ -655,7 +655,9 @@ static void outliner_add_library_override_contents(SpaceOutliner *soops, TreeEle
|
|||
int index = 0;
|
||||
LISTBASE_FOREACH (IDOverrideLibraryProperty *, op, &id->override_library->properties) {
|
||||
if (!BKE_lib_override_rna_property_find(&idpoin, op, &override_ptr, &override_prop)) {
|
||||
BLI_assert(false);
|
||||
/* This is fine, override properties list is not alwasy fully up-to-date with current
|
||||
* RNA/IDProps etc., this gets cleaned up when re-generating the overrides rules, no error
|
||||
* here. */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -803,14 +803,11 @@ void GPU_material_compile(GPUMaterial *mat)
|
|||
|
||||
void GPU_materials_free(Main *bmain)
|
||||
{
|
||||
Material *ma;
|
||||
World *wo;
|
||||
|
||||
for (ma = bmain->materials.first; ma; ma = ma->id.next) {
|
||||
LISTBASE_FOREACH (Material *, ma, &bmain->materials) {
|
||||
GPU_material_free(&ma->gpumaterial);
|
||||
}
|
||||
|
||||
for (wo = bmain->worlds.first; wo; wo = wo->id.next) {
|
||||
LISTBASE_FOREACH (World *, wo, &bmain->worlds) {
|
||||
GPU_material_free(&wo->gpumaterial);
|
||||
}
|
||||
|
||||
|
|
|
@ -361,7 +361,7 @@ static Sequence *seq_dupli(const Scene *scene_src,
|
|||
Sequence *seqn = MEM_dupallocN(seq);
|
||||
|
||||
if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
|
||||
SEQ_relations_session_uuid_generate(seq);
|
||||
SEQ_relations_session_uuid_generate(seqn);
|
||||
}
|
||||
|
||||
seq->tmp = seqn;
|
||||
|
|
|
@ -251,7 +251,7 @@ class MeshTest:
|
|||
bpy.data.objects.remove(self.expected_object, do_unlink=True)
|
||||
evaluated_test_object.name = expected_object_name
|
||||
|
||||
# Save file
|
||||
# Save file.
|
||||
bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)
|
||||
|
||||
self._test_updated = True
|
||||
|
@ -482,7 +482,7 @@ class MeshTest:
|
|||
try:
|
||||
retval = object_operator(**operator.operator_parameters)
|
||||
except AttributeError:
|
||||
raise AttributeError("bpy.ops.mesh has no attribute {}".format(operator.operator_name))
|
||||
raise AttributeError("bpy.ops.object has no attribute {}".format(operator.operator_name))
|
||||
except TypeError as ex:
|
||||
raise TypeError("Incorrect operator parameters {!r} raised {!r}".format(operator.operator_parameters, ex))
|
||||
|
||||
|
|
Loading…
Reference in New Issue