diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_multires.h')
-rw-r--r-- | source/blender/blenkernel/BKE_multires.h | 68 |
1 files changed, 46 insertions, 22 deletions
diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index d8199c96d6b..d9136846830 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -33,6 +33,7 @@ */ enum MultiresModifiedFlags; +struct Depsgraph; struct DerivedMesh; struct MDisps; struct Mesh; @@ -60,7 +61,7 @@ void multires_force_render_update(struct Object *ob); void multires_force_external_reload(struct Object *ob); /* internal, only called in subsurf_ccg.c */ -void multires_modifier_update_mdisps(struct DerivedMesh *dm); +void multires_modifier_update_mdisps(struct DerivedMesh *dm, struct Scene *scene); void multires_modifier_update_hidden(struct DerivedMesh *dm); void multiresModifier_set_levels_from_disps(struct MultiresModifierData *mmd, struct Object *ob); @@ -74,43 +75,35 @@ typedef enum { struct DerivedMesh *multires_make_derived_from_derived(struct DerivedMesh *dm, struct MultiresModifierData *mmd, + struct Scene *scene, struct Object *ob, MultiresFlags flags); struct MultiresModifierData *find_multires_modifier_before(struct Scene *scene, struct ModifierData *lastmd); struct MultiresModifierData *get_multires_modifier(struct Scene *scene, struct Object *ob, bool use_first); -struct DerivedMesh *get_multires_dm(struct Scene *scene, struct MultiresModifierData *mmd, +int multires_get_level(const struct Scene *scene, const struct Object *ob, const struct MultiresModifierData *mmd, + bool render, bool ignore_simplify); +struct DerivedMesh *get_multires_dm(struct Depsgraph *depsgraph, struct Scene *scene, struct MultiresModifierData *mmd, struct Object *ob); -void multiresModifier_del_levels(struct MultiresModifierData *, struct Object *, int direction); -void multiresModifier_base_apply(struct MultiresModifierData *mmd, struct Object *ob); -void multiresModifier_subdivide(struct MultiresModifierData *mmd, struct Object *ob, int updateblock, int simple); +struct Mesh *get_multires_mesh( + struct Depsgraph *depsgraph, struct Scene *scene, + struct MultiresModifierData *mmd, struct Object *ob); +void multiresModifier_del_levels(struct MultiresModifierData *mmd, struct Scene *scene, struct Object *object, int direction); +void multiresModifier_base_apply(struct MultiresModifierData *mmd, struct Scene *scene, struct Object *ob); +void multiresModifier_subdivide(struct MultiresModifierData *mmd, struct Scene *scene, struct Object *ob, int updateblock, int simple); void multiresModifier_sync_levels_ex( - struct Object *ob_dst, struct MultiresModifierData *mmd_src, struct MultiresModifierData *mmd_dst); -int multiresModifier_reshape(struct Scene *scene, struct MultiresModifierData *mmd, - struct Object *dst, struct Object *src); -int multiresModifier_reshapeFromDM(struct Scene *scene, struct MultiresModifierData *mmd, - struct Object *ob, struct DerivedMesh *srcdm); -int multiresModifier_reshapeFromDeformMod(struct Scene *scene, struct MultiresModifierData *mmd, - struct Object *ob, struct ModifierData *md); + struct Scene *scene, struct Object *ob_dst, struct MultiresModifierData *mmd_src, struct MultiresModifierData *mmd_dst); void multires_stitch_grids(struct Object *); -/*switch mdisp data in dm between tangent and object space*/ -enum { - MULTIRES_SPACE_TANGENT, - MULTIRES_SPACE_OBJECT, - MULTIRES_SPACE_ABSOLUTE -}; -void multires_set_space(struct DerivedMesh *dm, struct Object *ob, int from, int to); - /* Related to the old multires */ void multires_free(struct Multires *mr); void multires_load_old(struct Object *ob, struct Mesh *me); void multires_load_old_250(struct Mesh *); -void multiresModifier_scale_disp(struct Scene *scene, struct Object *ob); -void multiresModifier_prepare_join(struct Scene *scene, struct Object *ob, struct Object *to_ob); +void multiresModifier_scale_disp(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob); +void multiresModifier_prepare_join(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Object *to_ob); int multires_mdisp_corners(struct MDisps *s); @@ -121,4 +114,35 @@ void multires_topology_changed(struct Mesh *me); void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u, float v); int mdisp_rot_face_to_crn(struct MVert *mvert, struct MPoly *mpoly, struct MLoop *mloops, const struct MLoopTri *lt, const int face_side, const float u, const float v, float *x, float *y); +/* Reshaping, define in multires_reshape.c */ + +bool multiresModifier_reshape( + struct Depsgraph *depsgraph, + struct MultiresModifierData *mmd, + struct Object *dst, + struct Object *src); +bool multiresModifier_reshapeFromDeformModifier( + struct Depsgraph *depsgraph, + struct MultiresModifierData *mmd, + struct Object *ob, + struct ModifierData *md); + +/* Subdivision integration, defined in multires_subdiv.c */ + +struct SubdivSettings; +struct SubdivToMeshSettings; + +void BKE_multires_subdiv_settings_init( + struct SubdivSettings *settings, + const struct MultiresModifierData *mmd); + +/* TODO(sergey): Replace this set of boolean flags with bitmask. */ +void BKE_multires_subdiv_mesh_settings_init( + struct SubdivToMeshSettings *mesh_settings, + const struct Scene *scene, + const struct Object *object, + const struct MultiresModifierData *mmd, + const bool use_render_params, + const bool ignore_simplify); + #endif /* __BKE_MULTIRES_H__ */ |