Fix various Freestyle rendering bugs.
This commit is contained in:
@@ -391,7 +391,7 @@ class ColorDistanceFromObjectShader(ColorRampModifier):
|
||||
# construct a model-view matrix
|
||||
matrix = getCurrentScene().camera.matrix_world.inverted()
|
||||
# get the object location in the camera coordinate
|
||||
self.loc = matrix * target.location
|
||||
self.loc = matrix @ target.location
|
||||
|
||||
def shade(self, stroke):
|
||||
it = iter_distance_from_object(stroke, self.loc, *self.range)
|
||||
@@ -411,7 +411,7 @@ class AlphaDistanceFromObjectShader(CurveMappingModifier):
|
||||
# construct a model-view matrix
|
||||
matrix = getCurrentScene().camera.matrix_world.inverted()
|
||||
# get the object location in the camera coordinate
|
||||
self.loc = matrix * target.location
|
||||
self.loc = matrix @ target.location
|
||||
|
||||
def shade(self, stroke):
|
||||
it = iter_distance_from_object(stroke, self.loc, *self.range)
|
||||
@@ -434,7 +434,7 @@ class ThicknessDistanceFromObjectShader(ThicknessBlenderMixIn, CurveMappingModif
|
||||
# construct a model-view matrix
|
||||
matrix = getCurrentScene().camera.matrix_world.inverted()
|
||||
# get the object location in the camera coordinate
|
||||
self.loc = matrix * target.location
|
||||
self.loc = matrix @ target.location
|
||||
|
||||
def shade(self, stroke):
|
||||
it = iter_distance_from_object(stroke, self.loc, *self.range)
|
||||
@@ -520,7 +520,7 @@ class CalligraphicThicknessShader(ThicknessBlenderMixIn, ScalarBlendModifier):
|
||||
dir = self.func(it)
|
||||
if dir.length != 0.0:
|
||||
dir.normalize()
|
||||
fac = abs(dir.orthogonal() * self.orientation)
|
||||
fac = abs(dir.orthogonal() @ self.orientation)
|
||||
b = self.thickness.min + fac * self.thickness.delta
|
||||
else:
|
||||
b = self.thickness.min
|
||||
|
@@ -669,6 +669,10 @@ static int layer_collection_sync(
|
||||
|
||||
/* Sync objects, except if collection was excluded. */
|
||||
for (CollectionObject *cob = collection->gobject.first; cob; cob = cob->next) {
|
||||
if (cob->ob == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Base *base = BLI_ghash_lookup(view_layer->object_bases_hash, cob->ob);
|
||||
|
||||
if (base) {
|
||||
|
@@ -411,7 +411,7 @@ Object *BKE_mball_basis_find(Scene *scene, Object *basis)
|
||||
for (ViewLayer *view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
|
||||
for (Base *base = view_layer->object_bases.first; base; base = base->next) {
|
||||
Object *ob = base->object;
|
||||
if ((ob->type == OB_MBALL) && !(base->flag & OB_FROMDUPLI)) {
|
||||
if ((ob->type == OB_MBALL) && !(base->flag & BASE_FROMDUPLI)) {
|
||||
if (ob != bob) {
|
||||
BLI_split_name_num(obname, &obnr, ob->id.name + 2, '.');
|
||||
|
||||
|
@@ -3525,7 +3525,7 @@ void rna_def_freestyle_settings(BlenderRNA *brna)
|
||||
"Select silhouettes (edges at the boundary of visible and hidden faces)");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
||||
|
||||
prop = RNA_def_property(srna, "select_box", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BORDER);
|
||||
RNA_def_property_ui_text(prop, "Border", "Select border edges (open mesh edges)");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
||||
|
Reference in New Issue
Block a user