diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_curve.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 20 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 11 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_volumes.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 2 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_convert_object.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_curve_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 20 |
16 files changed, 27 insertions, 74 deletions
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 98712af82e9..630c5fa1856 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -89,7 +89,7 @@ struct BoundBox *BKE_curve_boundbox_get(struct Object *ob); void BKE_curve_texspace_calc(struct Curve *cu); void BKE_curve_texspace_ensure(struct Curve *cu); -void BKE_curve_texspace_get(struct Curve *cu, float r_loc[3], float r_rot[3], float r_size[3]); +void BKE_curve_texspace_get(struct Curve *cu, float r_loc[3], float r_size[3]); bool BKE_curve_minmax(struct Curve *cu, bool use_radius, float min[3], float max[3]); bool BKE_curve_center_median(struct Curve *cu, float cent[3]); diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index fe45530e01e..76e67065329 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -193,9 +193,11 @@ struct BoundBox *BKE_mesh_boundbox_get(struct Object *ob); void BKE_mesh_texspace_calc(struct Mesh *me); void BKE_mesh_texspace_ensure(struct Mesh *me); -void BKE_mesh_texspace_get(struct Mesh *me, float r_loc[3], float r_rot[3], float r_size[3]); -void BKE_mesh_texspace_get_reference( - struct Mesh *me, short **r_texflag, float **r_loc, float **r_rot, float **r_size); +void BKE_mesh_texspace_get(struct Mesh *me, float r_loc[3], float r_size[3]); +void BKE_mesh_texspace_get_reference(struct Mesh *me, + short **r_texflag, + float **r_loc, + float **r_size); void BKE_mesh_texspace_copy_from_object(struct Mesh *me, struct Object *ob); void BKE_mesh_split_faces(struct Mesh *mesh, bool free_loop_normals); diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index dcd926e9e19..ffdcb9cd2c0 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -321,8 +321,10 @@ void BKE_object_handle_update_ex(struct Depsgraph *depsgraph, void BKE_object_sculpt_data_create(struct Object *ob); -int BKE_object_obdata_texspace_get( - struct Object *ob, short **r_texflag, float **r_loc, float **r_size, float **r_rot); +int BKE_object_obdata_texspace_get(struct Object *ob, + short **r_texflag, + float **r_loc, + float **r_size); struct Mesh *BKE_object_get_evaluated_mesh(const struct Depsgraph *depsgraph, struct Object *ob); struct Mesh *BKE_object_get_final_mesh(struct Object *object); diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index a9d98c726c9..d81d250a305 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -340,7 +340,6 @@ void BKE_curve_texspace_calc(Curve *cu) copy_v3_v3(cu->loc, loc); copy_v3_v3(cu->size, size); - zero_v3(cu->rot); cu->texflag |= CU_AUTOSPACE_EVALUATED; } @@ -353,16 +352,13 @@ void BKE_curve_texspace_ensure(Curve *cu) } } -void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_rot[3], float r_size[3]) +void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_size[3]) { BKE_curve_texspace_ensure(cu); if (r_loc) { copy_v3_v3(r_loc, cu->loc); } - if (r_rot) { - copy_v3_v3(r_rot, cu->rot); - } if (r_size) { copy_v3_v3(r_size, cu->size); } @@ -5481,7 +5477,6 @@ void BKE_curve_eval_geometry(Depsgraph *depsgraph, Curve *curve) curve_orig->texflag |= CU_AUTOSPACE_EVALUATED; copy_v3_v3(curve_orig->loc, curve->loc); copy_v3_v3(curve_orig->size, curve->size); - copy_v3_v3(curve_orig->rot, curve->rot); } } } diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index e451ca06cba..a98fc414f31 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -865,7 +865,6 @@ void BKE_mesh_texspace_calc(Mesh *me) copy_v3_v3(me->loc, loc); copy_v3_v3(me->size, size); - zero_v3(me->rot); me->texflag |= ME_AUTOSPACE_EVALUATED; } @@ -878,23 +877,19 @@ void BKE_mesh_texspace_ensure(Mesh *me) } } -void BKE_mesh_texspace_get(Mesh *me, float r_loc[3], float r_rot[3], float r_size[3]) +void BKE_mesh_texspace_get(Mesh *me, float r_loc[3], float r_size[3]) { BKE_mesh_texspace_ensure(me); if (r_loc) { copy_v3_v3(r_loc, me->loc); } - if (r_rot) { - copy_v3_v3(r_rot, me->rot); - } if (r_size) { copy_v3_v3(r_size, me->size); } } -void BKE_mesh_texspace_get_reference( - Mesh *me, short **r_texflag, float **r_loc, float **r_rot, float **r_size) +void BKE_mesh_texspace_get_reference(Mesh *me, short **r_texflag, float **r_loc, float **r_size) { BKE_mesh_texspace_ensure(me); @@ -904,9 +899,6 @@ void BKE_mesh_texspace_get_reference( if (r_loc != NULL) { *r_loc = me->loc; } - if (r_rot != NULL) { - *r_rot = me->rot; - } if (r_size != NULL) { *r_size = me->size; } @@ -914,14 +906,13 @@ void BKE_mesh_texspace_get_reference( void BKE_mesh_texspace_copy_from_object(Mesh *me, Object *ob) { - float *texloc, *texrot, *texsize; + float *texloc, *texsize; short *texflag; - if (BKE_object_obdata_texspace_get(ob, &texflag, &texloc, &texsize, &texrot)) { + if (BKE_object_obdata_texspace_get(ob, &texflag, &texloc, &texsize)) { me->texflag = *texflag; copy_v3_v3(me->loc, texloc); copy_v3_v3(me->size, texsize); - copy_v3_v3(me->rot, texrot); } } @@ -950,7 +941,7 @@ void BKE_mesh_orco_verts_transform(Mesh *me, float (*orco)[3], int totvert, int float loc[3], size[3]; int a; - BKE_mesh_texspace_get(me->texcomesh ? me->texcomesh : me, loc, NULL, size); + BKE_mesh_texspace_get(me->texcomesh ? me->texcomesh : me, loc, size); if (invert) { for (a = 0; a < totvert; a++) { @@ -1942,7 +1933,6 @@ void BKE_mesh_eval_geometry(Depsgraph *depsgraph, Mesh *mesh) mesh_orig->texflag |= ME_AUTOSPACE_EVALUATED; copy_v3_v3(mesh_orig->loc, mesh->loc); copy_v3_v3(mesh_orig->size, mesh->size); - copy_v3_v3(mesh_orig->rot, mesh->rot); } } } diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c index e1b1fddc730..2ade368284c 100644 --- a/source/blender/blenkernel/intern/mesh_convert.c +++ b/source/blender/blenkernel/intern/mesh_convert.c @@ -667,7 +667,6 @@ void BKE_mesh_from_nurbs_displist(Main *bmain, me->texflag = cu->texflag & ~CU_AUTOSPACE; copy_v3_v3(me->loc, cu->loc); copy_v3_v3(me->size, cu->size); - copy_v3_v3(me->rot, cu->rot); BKE_mesh_texspace_calc(me); cu->mat = NULL; diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index de712173e8f..f10930a2ba7 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -3269,8 +3269,7 @@ void BKE_object_sculpt_data_create(Object *ob) ob->sculpt->mode_type = ob->mode; } -int BKE_object_obdata_texspace_get( - Object *ob, short **r_texflag, float **r_loc, float **r_size, float **r_rot) +int BKE_object_obdata_texspace_get(Object *ob, short **r_texflag, float **r_loc, float **r_size) { if (ob->data == NULL) { @@ -3279,7 +3278,7 @@ int BKE_object_obdata_texspace_get( switch (GS(((ID *)ob->data)->name)) { case ID_ME: { - BKE_mesh_texspace_get_reference((Mesh *)ob->data, r_texflag, r_loc, r_rot, r_size); + BKE_mesh_texspace_get_reference((Mesh *)ob->data, r_texflag, r_loc, r_size); break; } case ID_CU: { @@ -3294,9 +3293,6 @@ int BKE_object_obdata_texspace_get( if (r_size) { *r_size = cu->size; } - if (r_rot) { - *r_rot = cu->rot; - } break; } case ID_MB: { @@ -3310,9 +3306,6 @@ int BKE_object_obdata_texspace_get( if (r_size) { *r_size = mb->size; } - if (r_rot) { - *r_rot = mb->rot; - } break; } default: diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index 711c956ce4b..fac87bad41a 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -413,7 +413,7 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata, DRWShadingGroup *grp = DRW_shgroup_material_create(mat, vedata->psl->volumetric_objects_ps); - BKE_mesh_texspace_get_reference((struct Mesh *)ob->data, NULL, &texcoloc, NULL, &texcosize); + BKE_mesh_texspace_get_reference((struct Mesh *)ob->data, NULL, &texcoloc, &texcosize); /* TODO(fclem) remove those "unnecessary" UBOs */ DRW_shgroup_uniform_block(grp, "planar_block", sldata->planar_ubo); diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index d73f8fd5165..4bed8cf6a40 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -447,7 +447,7 @@ static void drw_call_calc_orco(Object *ob, float (*r_orcofacs)[4]) if (ob_data != NULL) { switch (GS(ob_data->name)) { case ID_ME: - BKE_mesh_texspace_get_reference((Mesh *)ob_data, NULL, &texcoloc, NULL, &texcosize); + BKE_mesh_texspace_get_reference((Mesh *)ob_data, NULL, &texcoloc, &texcosize); break; case ID_CU: { Curve *cu = (Curve *)ob_data; diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 654393cfc60..25c1492795b 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -3019,7 +3019,7 @@ static void DRW_shgroup_texture_space(OBJECT_ShadingGroupList *sgl, Object *ob, switch (GS(ob_data->name)) { case ID_ME: - BKE_mesh_texspace_get_reference((Mesh *)ob_data, NULL, &texcoloc, NULL, &texcosize); + BKE_mesh_texspace_get_reference((Mesh *)ob_data, NULL, &texcoloc, &texcosize); break; case ID_CU: { Curve *cu = (Curve *)ob_data; diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 3ad5e10b948..994d844287c 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -7136,7 +7136,6 @@ static int match_texture_space_exec(bContext *C, wmOperator *UNUSED(op)) copy_v3_v3(curve->loc, loc); copy_v3_v3(curve->size, size); - zero_v3(curve->rot); curve->texflag &= ~CU_AUTOSPACE; diff --git a/source/blender/editors/transform/transform_convert_object.c b/source/blender/editors/transform/transform_convert_object.c index 6142e9628a4..a32f533cc89 100644 --- a/source/blender/editors/transform/transform_convert_object.c +++ b/source/blender/editors/transform/transform_convert_object.c @@ -930,11 +930,13 @@ void createTransTexspace(TransInfo *t) normalize_m3(td->axismtx); pseudoinverse_m3_m3(td->smtx, td->mtx, PSEUDOINVERSE_EPSILON); - if (BKE_object_obdata_texspace_get(ob, &texflag, &td->loc, &td->ext->size, &td->ext->rot)) { + if (BKE_object_obdata_texspace_get(ob, &texflag, &td->loc, &td->ext->size)) { ob->dtx |= OB_TEXSPACE; *texflag &= ~ME_AUTOSPACE; } + zero_v3(td->ext->rot); + copy_v3_v3(td->iloc, td->loc); copy_v3_v3(td->ext->irot, td->ext->rot); copy_v3_v3(td->ext->isize, td->ext->size); diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 1c8365f7b72..919ad598cec 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -227,14 +227,13 @@ typedef struct Curve { /* texture space, copied as one block in editobject.c */ float loc[3]; float size[3]; - float rot[3]; /** Creation-time type of curve datablock. */ short type; /** Keep a short because of BKE_object_obdata_texspace_get(). */ short texflag; - char _pad0[2]; + char _pad0[6]; short twist_mode; float twist_smooth, smallcaps_scale; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 30acfa68971..e77a535ab7a 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -175,7 +175,6 @@ typedef struct Mesh { /* texture space, copied as one block in editobject.c */ float loc[3]; float size[3]; - float rot[3]; short texflag, flag; float smoothresh; @@ -192,7 +191,7 @@ typedef struct Mesh { float remesh_voxel_size; char remesh_mode; - char _pad1[3]; + char _pad1[7]; /** Deprecated multiresolution modeling data, only keep for loading old files. */ struct Multires *mr DNA_DEPRECATED; diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index aab78c269e6..6a3ab632fd4 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1757,15 +1757,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"); - /* not supported yet */ -# if 0 - prop = RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER); - RNA_def_property_float(prop, NULL, "rot"); - RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation"); - RNA_def_property_editable_func(prop, texspace_editable); - RNA_def_property_update(prop, 0, "rna_Curve_update_data"); -# endif - 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( diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index ed605376f0c..1ecaf0805a0 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -543,7 +543,7 @@ static void rna_MeshVertex_undeformed_co_get(PointerRNA *ptr, float values[3]) /* orco is normalized to 0..1, we do inverse to match mvert->co */ float loc[3], size[3]; - BKE_mesh_texspace_get(me->texcomesh ? me->texcomesh : me, loc, NULL, size); + BKE_mesh_texspace_get(me->texcomesh ? me->texcomesh : me, loc, size); madd_v3_v3v3v3(values, loc, orco[(mvert - me->mvert)], size); } else { @@ -2207,15 +2207,6 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable) RNA_def_property_editable_func(prop, texspace_editable); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - /* not supported yet */ -# if 0 - prop = RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER); - RNA_def_property_float(prop, NULL, "rot"); - RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation"); - RNA_def_property_editable_func(prop, texspace_editable); - RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); -# endif - /* materials */ prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol"); @@ -3080,15 +3071,6 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); # endif - /* not supported yet */ -# if 0 - prop = RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER); - RNA_def_property_float(prop, NULL, "rot"); - RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation"); - RNA_def_property_editable_func(prop, texspace_editable); - RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); -# endif - /* editflag */ prop = RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_X); |