diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-01-29 23:36:58 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-01-30 00:53:20 +0300 |
commit | 65761487229c61e5d043326cb5fd96cfca274e26 (patch) | |
tree | 3451067324e3465db25b64b8133ea8ba76e0ce18 /source/blender | |
parent | 33317b4647771e2031722531c6f9e6b124255a74 (diff) |
Fix T65146: Curve Texture Coordinates in Cycles and Eevee differ
Remove the use UV for mapping option.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.c | 27 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_curve_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 17 |
4 files changed, 10 insertions, 37 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 90afec54561..570541eb990 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -177,7 +177,6 @@ int BKE_mesh_nurbs_displist_to_mdata(struct Object *ob, void BKE_mesh_from_nurbs_displist(struct Main *bmain, struct Object *ob, struct ListBase *dispbase, - const bool use_orco_uv, const char *obdata_name, bool temporary); void BKE_mesh_from_nurbs(struct Main *bmain, struct Object *ob); diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c index 2ade368284c..fba84aaad42 100644 --- a/source/blender/blenkernel/intern/mesh_convert.c +++ b/source/blender/blenkernel/intern/mesh_convert.c @@ -522,7 +522,6 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob, Mesh *BKE_mesh_new_nomain_from_curve_displist(Object *ob, ListBase *dispbase) { - Curve *cu = ob->data; Mesh *mesh; MVert *allvert; MEdge *alledge; @@ -530,7 +529,6 @@ Mesh *BKE_mesh_new_nomain_from_curve_displist(Object *ob, ListBase *dispbase) MPoly *allpoly; MLoopUV *alluv = NULL; int totvert, totedge, totloop, totpoly; - bool use_orco_uv = (cu->flag & CU_UV_ORCO) != 0; if (BKE_mesh_nurbs_displist_to_mdata(ob, dispbase, @@ -540,7 +538,7 @@ Mesh *BKE_mesh_new_nomain_from_curve_displist(Object *ob, ListBase *dispbase) &totedge, &allloop, &allpoly, - (use_orco_uv) ? &alluv : NULL, + &alluv, &totloop, &totpoly) != 0) { /* Error initializing mdata. This often happens when curve is empty */ @@ -580,12 +578,8 @@ Mesh *BKE_mesh_new_nomain_from_curve(Object *ob) } /* this may fail replacing ob->data, be sure to check ob->type */ -void BKE_mesh_from_nurbs_displist(Main *bmain, - Object *ob, - ListBase *dispbase, - const bool use_orco_uv, - const char *obdata_name, - bool temporary) +void BKE_mesh_from_nurbs_displist( + Main *bmain, Object *ob, ListBase *dispbase, const char *obdata_name, bool temporary) { Object *ob1; Mesh *me_eval = ob->runtime.mesh_eval; @@ -609,7 +603,7 @@ void BKE_mesh_from_nurbs_displist(Main *bmain, &totedge, &allloop, &allpoly, - (use_orco_uv) ? &alluv : NULL, + &alluv, &totloop, &totpoly) != 0) { /* Error initializing */ @@ -706,14 +700,13 @@ void BKE_mesh_from_nurbs_displist(Main *bmain, void BKE_mesh_from_nurbs(Main *bmain, Object *ob) { Curve *cu = (Curve *)ob->data; - bool use_orco_uv = (cu->flag & CU_UV_ORCO) != 0; ListBase disp = {NULL, NULL}; if (ob->runtime.curve_cache) { disp = ob->runtime.curve_cache->disp; } - BKE_mesh_from_nurbs_displist(bmain, ob, &disp, use_orco_uv, cu->id.name, false); + BKE_mesh_from_nurbs_displist(bmain, ob, &disp, cu->id.name, false); } typedef struct EdgeLink { @@ -1023,8 +1016,6 @@ static void curve_to_mesh_eval_ensure(Object *object) static Mesh *mesh_new_from_curve_type_object(Object *object) { Curve *curve = object->data; - const bool uv_from_orco = (curve->flag & CU_UV_ORCO) != 0; - Object *temp_object = object_for_curve_to_mesh_create(object); Curve *temp_curve = (Curve *)temp_object->data; @@ -1039,12 +1030,8 @@ static Mesh *mesh_new_from_curve_type_object(Object *object) temp_curve->editnurb = NULL; /* Convert to mesh. */ - BKE_mesh_from_nurbs_displist(NULL, - temp_object, - &temp_object->runtime.curve_cache->disp, - uv_from_orco, - curve->id.name + 2, - true); + BKE_mesh_from_nurbs_displist( + NULL, temp_object, &temp_object->runtime.curve_cache->disp, curve->id.name + 2, true); /* BKE_mesh_from_nurbs changes the type to a mesh, check it worked. If it didn't the curve did * not have any segments or otherwise would have generated an empty mesh. */ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 13eaa8925bc..a8d10471bb8 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -330,7 +330,7 @@ enum { CU_BACK = 1 << 2, CU_PATH = 1 << 3, CU_FOLLOW = 1 << 4, - CU_UV_ORCO = 1 << 5, + /* CU_UV_ORCO = 1 << 5, */ /* DEPRECATED */ CU_DEFORM_BOUNDS_OFF = 1 << 6, CU_STRETCH = 1 << 7, /* CU_OFFS_PATHDIST = 1 << 8, */ /* DEPRECATED */ diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index d7deccef355..e900160a653 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1033,16 +1033,9 @@ static void rna_def_path(BlenderRNA *UNUSED(brna), StructRNA *srna) RNA_def_property_update(prop, 0, "rna_Curve_update_data"); } -static void rna_def_nurbs(BlenderRNA *UNUSED(brna), StructRNA *srna) +static void rna_def_nurbs(BlenderRNA *UNUSED(brna), StructRNA *UNUSED(srna)) { - PropertyRNA *prop; - - /* flags */ - prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO); - RNA_def_property_ui_text( - prop, "Use UV for Mapping", "Uses the UV values as Generated textured coordinates"); - RNA_def_property_update(prop, 0, "rna_Curve_update_data"); + /* Nothing. */ } static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna) @@ -1757,12 +1750,6 @@ static void rna_def_curve(BlenderRNA *brna) prop, "rna_Curve_texspace_size_get", "rna_Curve_texspace_size_set", NULL); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO); - RNA_def_property_ui_text( - prop, "Use UV for mapping", "Uses the UV values as Generated textured coordinates"); - RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - /* materials */ prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol"); |