forked from bartvdbraak/blender
Merge branch 'master' into blender2.8
This commit is contained in:
commit
7439919ac0
@ -4,6 +4,15 @@ Application Data (bge.app)
|
||||
|
||||
Module to access application values that remain unchanged during runtime.
|
||||
|
||||
Submodules:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
bpy.app.handlers.rst
|
||||
bpy.app.translations.rst
|
||||
|
||||
|
||||
.. module:: bge.app
|
||||
|
||||
.. data:: version
|
||||
|
@ -7,14 +7,17 @@
|
||||
|
||||
Submodules:
|
||||
|
||||
* :mod:`bmesh.ops`
|
||||
* :mod:`bmesh.types`
|
||||
* :mod:`bmesh.utils`
|
||||
* :mod:`bmesh.geometry`
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
bmesh.ops.rst
|
||||
bmesh.types.rst
|
||||
bmesh.utils.rst
|
||||
bmesh.geometry.rst
|
||||
|
||||
|
||||
Intro
|
||||
-----
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This API gives access the blenders internal mesh editing api, featuring geometry connectivity data and
|
||||
access to editing operations such as split, separate, collapse and dissolve.
|
||||
|
@ -1717,8 +1717,6 @@ def write_rst_contents(basepath):
|
||||
"bpy.utils.previews",
|
||||
"bpy.path",
|
||||
"bpy.app",
|
||||
"bpy.app.handlers",
|
||||
"bpy.app.translations",
|
||||
|
||||
# C modules
|
||||
"bpy.props",
|
||||
|
@ -19,17 +19,20 @@
|
||||
"""
|
||||
This module provides data types of view map components (0D and 1D
|
||||
elements), base classes for defining line stylization rules
|
||||
(predicates, functions, chaining iterators, and stroke shaders), as
|
||||
well as helper functions for style module writing.
|
||||
(predicates, functions, chaining iterators, and stroke shaders),
|
||||
as well as helper functions for style module writing.
|
||||
|
||||
Submodules:
|
||||
|
||||
* :mod:`freestyle.types`
|
||||
* :mod:`freestyle.predicates`
|
||||
* :mod:`freestyle.functions`
|
||||
* :mod:`freestyle.chainingiterators`
|
||||
* :mod:`freestyle.shaders`
|
||||
* :mod:`freestyle.utils`
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
freestyle.types.rst
|
||||
freestyle.predicates.rst
|
||||
freestyle.functions.rst
|
||||
freestyle.chainingiterators.rst
|
||||
freestyle.shaders.rst
|
||||
freestyle.utils.rst
|
||||
"""
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ extern "C" {
|
||||
struct bAction *add_empty_action(struct Main *bmain, const char name[]);
|
||||
|
||||
/* Allocate a copy of the given Action and all its data */
|
||||
struct bAction *BKE_action_copy(struct Main *bmain, struct bAction *src);
|
||||
struct bAction *BKE_action_copy(struct Main *bmain, const struct bAction *src);
|
||||
|
||||
/* Deallocate all of the Action's data, but not the Action itself */
|
||||
void BKE_action_free(struct bAction *act);
|
||||
@ -150,7 +150,7 @@ void BKE_pose_free_data_ex(struct bPose *pose, bool do_id_user);
|
||||
void BKE_pose_free_data(struct bPose *pose);
|
||||
void BKE_pose_free(struct bPose *pose);
|
||||
void BKE_pose_free_ex(struct bPose *pose, bool do_id_user);
|
||||
void BKE_pose_copy_data(struct bPose **dst, struct bPose *src, const bool copy_constraints);
|
||||
void BKE_pose_copy_data(struct bPose **dst, const struct bPose *src, const bool copy_constraints);
|
||||
void BKE_pose_channel_copy_data(struct bPoseChannel *pchan, const struct bPoseChannel *pchan_from);
|
||||
struct bPoseChannel *BKE_pose_channel_find_name(const struct bPose *pose, const char *name);
|
||||
struct bPoseChannel *BKE_pose_channel_active(struct Object *ob);
|
||||
|
@ -78,7 +78,7 @@ int BKE_armature_bonelist_count(struct ListBase *lb);
|
||||
void BKE_armature_bonelist_free(struct ListBase *lb);
|
||||
void BKE_armature_free(struct bArmature *arm);
|
||||
void BKE_armature_make_local(struct Main *bmain, struct bArmature *arm, const bool lib_local);
|
||||
struct bArmature *BKE_armature_copy(struct Main *bmain, struct bArmature *arm);
|
||||
struct bArmature *BKE_armature_copy(struct Main *bmain, const struct bArmature *arm);
|
||||
|
||||
/* Bounding box. */
|
||||
struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
|
||||
|
@ -61,6 +61,6 @@ BoidRule *boid_new_rule(int type);
|
||||
BoidState *boid_new_state(BoidSettings *boids);
|
||||
BoidState *boid_duplicate_state(BoidSettings *boids, BoidState *state);
|
||||
void boid_free_settings(BoidSettings *boids);
|
||||
BoidSettings *boid_copy_settings(BoidSettings *boids);
|
||||
BoidSettings *boid_copy_settings(const BoidSettings *boids);
|
||||
BoidState *boid_get_current_state(BoidSettings *boids);
|
||||
#endif
|
||||
|
@ -44,7 +44,7 @@ void BKE_brush_system_exit(void);
|
||||
void BKE_brush_init(struct Brush *brush);
|
||||
struct Brush *BKE_brush_add(struct Main *bmain, const char *name, short ob_mode);
|
||||
struct Brush *BKE_brush_first_search(struct Main *bmain, short ob_mode);
|
||||
struct Brush *BKE_brush_copy(struct Main *bmain, struct Brush *brush);
|
||||
struct Brush *BKE_brush_copy(struct Main *bmain, const struct Brush *brush);
|
||||
void BKE_brush_make_local(struct Main *bmain, struct Brush *brush, const bool lib_local);
|
||||
void BKE_brush_unlink(struct Main *bmain, struct Brush *brush);
|
||||
void BKE_brush_free(struct Brush *brush);
|
||||
|
@ -47,7 +47,7 @@ void BKE_cachefile_init(struct CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_free(struct CacheFile *cache_file);
|
||||
|
||||
struct CacheFile *BKE_cachefile_copy(struct Main *bmain, struct CacheFile *cache_file);
|
||||
struct CacheFile *BKE_cachefile_copy(struct Main *bmain, const struct CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_make_local(struct Main *bmain, struct CacheFile *cache_file, const bool lib_local);
|
||||
|
||||
|
@ -53,7 +53,7 @@ struct GPUFXSettings;
|
||||
|
||||
void BKE_camera_init(struct Camera *cam);
|
||||
void *BKE_camera_add(struct Main *bmain, const char *name);
|
||||
struct Camera *BKE_camera_copy(struct Main *bmain, struct Camera *cam);
|
||||
struct Camera *BKE_camera_copy(struct Main *bmain, const struct Camera *cam);
|
||||
void BKE_camera_make_local(struct Main *bmain, struct Camera *cam, const bool lib_local);
|
||||
void BKE_camera_free(struct Camera *ca);
|
||||
|
||||
|
@ -46,8 +46,8 @@ void curvemapping_set_defaults(struct CurveMapping *cumap, int to
|
||||
struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
|
||||
void curvemapping_free_data(struct CurveMapping *cumap);
|
||||
void curvemapping_free(struct CurveMapping *cumap);
|
||||
void curvemapping_copy_data(struct CurveMapping *target, struct CurveMapping *cumap);
|
||||
struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap);
|
||||
void curvemapping_copy_data(struct CurveMapping *target, const struct CurveMapping *cumap);
|
||||
struct CurveMapping *curvemapping_copy(const struct CurveMapping *cumap);
|
||||
void curvemapping_set_black_white_ex(const float black[3], const float white[3], float r_bwmul[3]);
|
||||
void curvemapping_set_black_white(struct CurveMapping *cumap, const float black[3], const float white[3]);
|
||||
|
||||
|
@ -78,7 +78,7 @@ void BKE_curve_free(struct Curve *cu);
|
||||
void BKE_curve_editfont_free(struct Curve *cu);
|
||||
void BKE_curve_init(struct Curve *cu);
|
||||
struct Curve *BKE_curve_add(struct Main *bmain, const char *name, int type);
|
||||
struct Curve *BKE_curve_copy(struct Main *bmain, struct Curve *cu);
|
||||
struct Curve *BKE_curve_copy(struct Main *bmain, const struct Curve *cu);
|
||||
void BKE_curve_make_local(struct Main *bmain, struct Curve *cu, const bool lib_local);
|
||||
short BKE_curve_type_get(struct Curve *cu);
|
||||
void BKE_curve_type_test(struct Object *ob);
|
||||
@ -142,7 +142,7 @@ int BKE_nurbList_verts_count(struct ListBase *nurb);
|
||||
int BKE_nurbList_verts_count_without_handles(struct ListBase *nurb);
|
||||
|
||||
void BKE_nurbList_free(struct ListBase *lb);
|
||||
void BKE_nurbList_duplicate(struct ListBase *lb1, struct ListBase *lb2);
|
||||
void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2);
|
||||
void BKE_nurbList_handles_set(struct ListBase *editnurb, const char code);
|
||||
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, const bool calc_length, const char flag);
|
||||
|
||||
@ -150,7 +150,7 @@ void BKE_nurbList_handles_autocalc(ListBase *editnurb, int flag);
|
||||
void BKE_nurbList_flag_set(ListBase *editnurb, short flag);
|
||||
|
||||
void BKE_nurb_free(struct Nurb *nu);
|
||||
struct Nurb *BKE_nurb_duplicate(struct Nurb *nu);
|
||||
struct Nurb *BKE_nurb_duplicate(const struct Nurb *nu);
|
||||
struct Nurb *BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv);
|
||||
|
||||
void BKE_nurb_test2D(struct Nurb *nu);
|
||||
|
@ -44,8 +44,8 @@ struct MLoop;
|
||||
struct MPoly;
|
||||
|
||||
struct bDeformGroup *BKE_defgroup_new(struct Object *ob, const char *name);
|
||||
void defgroup_copy_list(struct ListBase *lb1, struct ListBase *lb2);
|
||||
struct bDeformGroup *defgroup_duplicate(struct bDeformGroup *ingroup);
|
||||
void defgroup_copy_list(struct ListBase *lb1, const struct ListBase *lb2);
|
||||
struct bDeformGroup *defgroup_duplicate(const struct bDeformGroup *ingroup);
|
||||
struct bDeformGroup *defgroup_find_name(struct Object *ob, const char *name);
|
||||
int *defgroup_flip_map(struct Object *ob, int *flip_map_len, const bool use_default);
|
||||
int *defgroup_flip_map_single(struct Object *ob, int *flip_map_len, const bool use_default, int defgroup);
|
||||
|
@ -92,7 +92,7 @@ void bezt_add_to_cfra_elem(ListBase *lb, struct BezTriple *bezt);
|
||||
/* ---------------------- */
|
||||
|
||||
void fcurve_free_driver(struct FCurve *fcu);
|
||||
struct ChannelDriver *fcurve_copy_driver(struct ChannelDriver *driver);
|
||||
struct ChannelDriver *fcurve_copy_driver(const struct ChannelDriver *driver);
|
||||
|
||||
void driver_variables_copy(struct ListBase *dst_list, const struct ListBase *src_list);
|
||||
|
||||
@ -138,7 +138,7 @@ typedef struct FModifierTypeInfo {
|
||||
/* free any data that is allocated separately (optional) */
|
||||
void (*free_data)(struct FModifier *fcm);
|
||||
/* copy any special data that is allocated separately (optional) */
|
||||
void (*copy_data)(struct FModifier *fcm, struct FModifier *src);
|
||||
void (*copy_data)(struct FModifier *fcm, const struct FModifier *src);
|
||||
/* set settings for data that will be used for FCuModifier.data (memory already allocated using MEM_callocN) */
|
||||
void (*new_data)(void *mdata);
|
||||
/* verifies that the modifier settings are valid */
|
||||
@ -183,14 +183,14 @@ typedef enum eFMI_Requirement_Flags {
|
||||
} eFMI_Requirement_Flags;
|
||||
|
||||
/* Function Prototypes for FModifierTypeInfo's */
|
||||
const FModifierTypeInfo *fmodifier_get_typeinfo(struct FModifier *fcm);
|
||||
const FModifierTypeInfo *get_fmodifier_typeinfo(int type);
|
||||
const FModifierTypeInfo *fmodifier_get_typeinfo(const struct FModifier *fcm);
|
||||
const FModifierTypeInfo *get_fmodifier_typeinfo(const int type);
|
||||
|
||||
/* ---------------------- */
|
||||
|
||||
struct FModifier *add_fmodifier(ListBase *modifiers, int type);
|
||||
struct FModifier *copy_fmodifier(struct FModifier *src);
|
||||
void copy_fmodifiers(ListBase *dst, ListBase *src);
|
||||
struct FModifier *copy_fmodifier(const struct FModifier *src);
|
||||
void copy_fmodifiers(ListBase *dst, const ListBase *src);
|
||||
bool remove_fmodifier(ListBase *modifiers, struct FModifier *fcm);
|
||||
void free_fmodifiers(ListBase *modifiers);
|
||||
|
||||
@ -216,7 +216,7 @@ int BKE_fcm_envelope_find_index(struct FCM_EnvelopeData *array, float frame, int
|
||||
/* -------- Data Management -------- */
|
||||
|
||||
void free_fcurve(struct FCurve *fcu);
|
||||
struct FCurve *copy_fcurve(struct FCurve *fcu);
|
||||
struct FCurve *copy_fcurve(const struct FCurve *fcu);
|
||||
|
||||
void free_fcurves(ListBase *list);
|
||||
void copy_fcurves(ListBase *dst, ListBase *src);
|
||||
|
@ -60,7 +60,7 @@ struct bGPdata *BKE_gpencil_data_addnew(const char name[]);
|
||||
|
||||
struct bGPDframe *BKE_gpencil_frame_duplicate(const struct bGPDframe *gpf_src);
|
||||
struct bGPDlayer *BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src);
|
||||
struct bGPdata *BKE_gpencil_data_duplicate(struct Main *bmain, struct bGPdata *gpd, bool internal_copy);
|
||||
struct bGPdata *BKE_gpencil_data_duplicate(struct Main *bmain, const struct bGPdata *gpd, bool internal_copy);
|
||||
|
||||
void BKE_gpencil_make_local(struct Main *bmain, struct bGPdata *gpd, const bool lib_local);
|
||||
|
||||
|
@ -43,7 +43,7 @@ struct Scene;
|
||||
|
||||
void BKE_group_free(struct Group *group);
|
||||
struct Group *BKE_group_add(struct Main *bmain, const char *name);
|
||||
struct Group *BKE_group_copy(struct Main *bmain, struct Group *group);
|
||||
struct Group *BKE_group_copy(struct Main *bmain, const struct Group *group);
|
||||
void BKE_group_make_local(struct Main *bmain, struct Group *group, const bool lib_local);
|
||||
bool BKE_group_object_add(struct Group *group, struct Object *ob);
|
||||
bool BKE_group_object_unlink(struct Group *group, struct Object *ob);
|
||||
|
@ -88,7 +88,7 @@ void BKE_previewimg_clear(struct PreviewImage *prv);
|
||||
void BKE_previewimg_clear_single(struct PreviewImage *prv, enum eIconSizes size);
|
||||
|
||||
/* get the preview from any pointer */
|
||||
struct PreviewImage **BKE_previewimg_id_get_p(struct ID *id);
|
||||
struct PreviewImage **BKE_previewimg_id_get_p(const struct ID *id);
|
||||
|
||||
/* free the preview image belonging to the id */
|
||||
void BKE_previewimg_id_free(struct ID *id);
|
||||
@ -97,9 +97,9 @@ void BKE_previewimg_id_free(struct ID *id);
|
||||
struct PreviewImage *BKE_previewimg_create(void);
|
||||
|
||||
/* create a copy of the preview image */
|
||||
struct PreviewImage *BKE_previewimg_copy(struct PreviewImage *prv);
|
||||
struct PreviewImage *BKE_previewimg_copy(const struct PreviewImage *prv);
|
||||
|
||||
void BKE_previewimg_id_copy(struct ID *new_id, struct ID *old_id);
|
||||
void BKE_previewimg_id_copy(struct ID *new_id, const struct ID *old_id);
|
||||
|
||||
/* retrieve existing or create new preview image */
|
||||
struct PreviewImage *BKE_previewimg_id_ensure(struct ID *id);
|
||||
|
@ -250,7 +250,7 @@ void BKE_image_packfiles_from_mem(struct ReportList *reports, struct Image *ima,
|
||||
void BKE_image_print_memlist(void);
|
||||
|
||||
/* empty image block, of similar type and filename */
|
||||
struct Image *BKE_image_copy(struct Main *bmain, struct Image *ima);
|
||||
struct Image *BKE_image_copy(struct Main *bmain, const struct Image *ima);
|
||||
|
||||
/* merge source into dest, and free source */
|
||||
void BKE_image_merge(struct Image *dest, struct Image *source);
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
||||
void BKE_key_free(struct Key *sc);
|
||||
void BKE_key_free_nolib(struct Key *key);
|
||||
struct Key *BKE_key_add(struct ID *id);
|
||||
struct Key *BKE_key_copy(struct Main *bmain, struct Key *key);
|
||||
struct Key *BKE_key_copy(struct Main *bmain, const struct Key *key);
|
||||
struct Key *BKE_key_copy_nolib(struct Key *key);
|
||||
void BKE_key_sort(struct Key *key);
|
||||
|
||||
|
@ -44,7 +44,7 @@ struct Scene;
|
||||
|
||||
void BKE_lamp_init(struct Lamp *la);
|
||||
struct Lamp *BKE_lamp_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT;
|
||||
struct Lamp *BKE_lamp_copy(struct Main *bmain, struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
|
||||
struct Lamp *BKE_lamp_copy(struct Main *bmain, const struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
|
||||
struct Lamp *localize_lamp(struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
|
||||
void BKE_lamp_make_local(struct Main *bmain, struct Lamp *la, const bool lib_local);
|
||||
void BKE_lamp_free(struct Lamp *la);
|
||||
|
@ -47,7 +47,7 @@ struct MDeformVert;
|
||||
void BKE_lattice_resize(struct Lattice *lt, int u, int v, int w, struct Object *ltOb);
|
||||
void BKE_lattice_init(struct Lattice *lt);
|
||||
struct Lattice *BKE_lattice_add(struct Main *bmain, const char *name);
|
||||
struct Lattice *BKE_lattice_copy(struct Main *bmain, struct Lattice *lt);
|
||||
struct Lattice *BKE_lattice_copy(struct Main *bmain, const struct Lattice *lt);
|
||||
void BKE_lattice_free(struct Lattice *lt);
|
||||
void BKE_lattice_make_local(struct Main *bmain, struct Lattice *lt, const bool lib_local);
|
||||
void calc_lat_fudu(int flag, int res, float *r_fu, float *r_du);
|
||||
|
@ -54,8 +54,8 @@ size_t BKE_libblock_get_alloc_info(short type, const char **name);
|
||||
void *BKE_libblock_alloc_notest(short type);
|
||||
void *BKE_libblock_alloc(struct Main *bmain, short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||
void BKE_libblock_init_empty(struct ID *id);
|
||||
void *BKE_libblock_copy(struct Main *bmain, struct ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||
void *BKE_libblock_copy_nolib(struct ID *id, const bool do_action) ATTR_NONNULL();
|
||||
void *BKE_libblock_copy(struct Main *bmain, const struct ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||
void *BKE_libblock_copy_nolib(const struct ID *id, const bool do_action) ATTR_NONNULL();
|
||||
void BKE_libblock_copy_data(struct ID *id, const struct ID *id_from, const bool do_action);
|
||||
void BKE_libblock_rename(struct Main *bmain, struct ID *id, const char *name) ATTR_NONNULL();
|
||||
void BLI_libblock_ensure_unique_name(struct Main *bmain, const char *name) ATTR_NONNULL();
|
||||
@ -86,10 +86,10 @@ void BKE_id_clear_newpoin(struct ID *id);
|
||||
void BKE_id_make_local_generic(struct Main *bmain, struct ID *id, const bool id_in_mainlist, const bool lib_local);
|
||||
bool id_make_local(struct Main *bmain, struct ID *id, const bool test, const bool force_local);
|
||||
bool id_single_user(struct bContext *C, struct ID *id, struct PointerRNA *ptr, struct PropertyRNA *prop);
|
||||
bool id_copy(struct Main *bmain, struct ID *id, struct ID **newid, bool test);
|
||||
bool id_copy(struct Main *bmain, const struct ID *id, struct ID **newid, bool test);
|
||||
void id_sort_by_name(struct ListBase *lb, struct ID *id);
|
||||
void BKE_id_expand_local(struct Main *bmain, struct ID *id);
|
||||
void BKE_id_copy_ensure_local(struct Main *bmain, struct ID *old_id, struct ID *new_id);
|
||||
void BKE_id_copy_ensure_local(struct Main *bmain, const struct ID *old_id, struct ID *new_id);
|
||||
|
||||
bool new_id(struct ListBase *lb, struct ID *id, const char *name);
|
||||
void id_clear_lib_data(struct Main *bmain, struct ID *id);
|
||||
|
@ -52,7 +52,7 @@ struct bContext;
|
||||
void BKE_linestyle_init(struct FreestyleLineStyle *linestyle);
|
||||
FreestyleLineStyle *BKE_linestyle_new(struct Main *bmain, const char *name);
|
||||
void BKE_linestyle_free(FreestyleLineStyle *linestyle);
|
||||
FreestyleLineStyle *BKE_linestyle_copy(struct Main *bmain, FreestyleLineStyle *linestyle);
|
||||
FreestyleLineStyle *BKE_linestyle_copy(struct Main *bmain, const FreestyleLineStyle *linestyle);
|
||||
|
||||
void BKE_linestyle_make_local(struct Main *bmain, struct FreestyleLineStyle *linestyle, const bool lib_local);
|
||||
|
||||
@ -63,10 +63,10 @@ LineStyleModifier *BKE_linestyle_alpha_modifier_add(FreestyleLineStyle *linestyl
|
||||
LineStyleModifier *BKE_linestyle_thickness_modifier_add(FreestyleLineStyle *linestyle, const char *name, int type);
|
||||
LineStyleModifier *BKE_linestyle_geometry_modifier_add(FreestyleLineStyle *linestyle, const char *name, int type);
|
||||
|
||||
LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m);
|
||||
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m);
|
||||
LineStyleModifier *BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m);
|
||||
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m);
|
||||
LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m);
|
||||
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m);
|
||||
LineStyleModifier *BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m);
|
||||
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m);
|
||||
|
||||
int BKE_linestyle_color_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier);
|
||||
int BKE_linestyle_alpha_modifier_remove(FreestyleLineStyle *linestyle, LineStyleModifier *modifier);
|
||||
|
@ -77,14 +77,14 @@ void BKE_mask_layer_free(struct MaskLayer *masklay);
|
||||
void BKE_mask_layer_free_list(struct ListBase *masklayers);
|
||||
void BKE_mask_spline_free(struct MaskSpline *spline);
|
||||
void BKE_mask_spline_free_list(struct ListBase *splines);
|
||||
struct MaskSpline *BKE_mask_spline_copy(struct MaskSpline *spline);
|
||||
struct MaskSpline *BKE_mask_spline_copy(const struct MaskSpline *spline);
|
||||
void BKE_mask_point_free(struct MaskSplinePoint *point);
|
||||
|
||||
void BKE_mask_layer_unique_name(struct Mask *mask, struct MaskLayer *masklay);
|
||||
void BKE_mask_layer_rename(struct Mask *mask, struct MaskLayer *masklay, char *oldname, char *newname);
|
||||
|
||||
struct MaskLayer *BKE_mask_layer_copy(struct MaskLayer *layer);
|
||||
void BKE_mask_layer_copy_list(struct ListBase *masklayers_new, struct ListBase *masklayers);
|
||||
struct MaskLayer *BKE_mask_layer_copy(const struct MaskLayer *layer);
|
||||
void BKE_mask_layer_copy_list(struct ListBase *masklayers_new, const struct ListBase *masklayers);
|
||||
|
||||
/* splines */
|
||||
struct MaskSpline *BKE_mask_spline_add(struct MaskLayer *masklay);
|
||||
@ -123,7 +123,7 @@ void BKE_mask_point_select_set_handle(struct MaskSplinePoint *point, const eMask
|
||||
/* general */
|
||||
struct Mask *BKE_mask_new(struct Main *bmain, const char *name);
|
||||
struct Mask *BKE_mask_copy_nolib(struct Mask *mask);
|
||||
struct Mask *BKE_mask_copy(struct Main *bmain, struct Mask *mask);
|
||||
struct Mask *BKE_mask_copy(struct Main *bmain, const struct Mask *mask);
|
||||
|
||||
void BKE_mask_make_local(struct Main *bmain, struct Mask *mask, const bool lib_local);
|
||||
|
||||
|
@ -54,7 +54,7 @@ void BKE_material_init(struct Material *ma);
|
||||
void BKE_material_remap_object(struct Object *ob, const unsigned int *remap);
|
||||
void BKE_material_remap_object_calc(struct Object *ob_dst, struct Object *ob_src, short *remap_src_to_dst);
|
||||
struct Material *BKE_material_add(struct Main *bmain, const char *name);
|
||||
struct Material *BKE_material_copy(struct Main *bmain, struct Material *ma);
|
||||
struct Material *BKE_material_copy(struct Main *bmain, const struct Material *ma);
|
||||
struct Material *localize_material(struct Material *ma);
|
||||
struct Material *give_node_material(struct Material *ma); /* returns node material or self */
|
||||
void BKE_material_make_local(struct Main *bmain, struct Material *ma, const bool lib_local);
|
||||
|
@ -41,7 +41,7 @@ struct MetaElem;
|
||||
void BKE_mball_free(struct MetaBall *mb);
|
||||
void BKE_mball_init(struct MetaBall *mb);
|
||||
struct MetaBall *BKE_mball_add(struct Main *bmain, const char *name);
|
||||
struct MetaBall *BKE_mball_copy(struct Main *bmain, struct MetaBall *mb);
|
||||
struct MetaBall *BKE_mball_copy(struct Main *bmain, const struct MetaBall *mb);
|
||||
|
||||
void BKE_mball_make_local(struct Main *bmain, struct MetaBall *mb, const bool lib_local);
|
||||
|
||||
|
@ -87,7 +87,7 @@ int BKE_mesh_edge_other_vert(const struct MEdge *e, int v);
|
||||
void BKE_mesh_free(struct Mesh *me);
|
||||
void BKE_mesh_init(struct Mesh *me);
|
||||
struct Mesh *BKE_mesh_add(struct Main *bmain, const char *name);
|
||||
struct Mesh *BKE_mesh_copy(struct Main *bmain, struct Mesh *me);
|
||||
struct Mesh *BKE_mesh_copy(struct Main *bmain, const struct Mesh *me);
|
||||
void BKE_mesh_update_customdata_pointers(struct Mesh *me, const bool do_ensure_tess_cd);
|
||||
void BKE_mesh_ensure_skin_customdata(struct Mesh *me);
|
||||
|
||||
|
@ -41,7 +41,7 @@ struct MovieDistortion;
|
||||
|
||||
void BKE_movieclip_free(struct MovieClip *clip);
|
||||
|
||||
struct MovieClip *BKE_movieclip_copy(struct Main *bmain, struct MovieClip *clip);
|
||||
struct MovieClip *BKE_movieclip_copy(struct Main *bmain, const struct MovieClip *clip);
|
||||
void BKE_movieclip_make_local(struct Main *bmain, struct MovieClip *clip, const bool lib_local);
|
||||
|
||||
struct MovieClip *BKE_movieclip_file_add(struct Main *bmain, const char *name);
|
||||
|
@ -336,8 +336,8 @@ struct bNodeTree *ntreeAddTree(struct Main *bmain, const char *name, const char
|
||||
|
||||
/* copy/free funcs, need to manage ID users */
|
||||
void ntreeFreeTree(struct bNodeTree *ntree);
|
||||
struct bNodeTree *ntreeCopyTree_ex(struct bNodeTree *ntree, struct Main *bmain, const bool do_id_user);
|
||||
struct bNodeTree *ntreeCopyTree(struct Main *bmain, struct bNodeTree *ntree);
|
||||
struct bNodeTree *ntreeCopyTree_ex(const struct bNodeTree *ntree, struct Main *bmain, const bool do_id_user);
|
||||
struct bNodeTree *ntreeCopyTree(struct Main *bmain, const struct bNodeTree *ntree);
|
||||
/* node->id user count */
|
||||
void ntreeUserIncrefID(struct bNodeTree *ntree);
|
||||
void ntreeUserDecrefID(struct bNodeTree *ntree);
|
||||
|
@ -55,7 +55,7 @@ void BKE_object_workob_calc_parent(struct Scene *scene, struct Object *ob, struc
|
||||
|
||||
void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src);
|
||||
struct SoftBody *copy_softbody(const struct SoftBody *sb, bool copy_caches);
|
||||
struct BulletSoftBody *copy_bulletsoftbody(struct BulletSoftBody *sb);
|
||||
struct BulletSoftBody *copy_bulletsoftbody(const struct BulletSoftBody *sb);
|
||||
struct ParticleSystem *BKE_object_copy_particlesystem(struct ParticleSystem *psys);
|
||||
void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src);
|
||||
void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src);
|
||||
@ -106,8 +106,8 @@ bool BKE_object_lod_is_usable(struct Object *ob, struct SceneLayer *sl);
|
||||
struct Object *BKE_object_lod_meshob_get(struct Object *ob, struct SceneLayer *sl);
|
||||
struct Object *BKE_object_lod_matob_get(struct Object *ob, struct SceneLayer *sl);
|
||||
|
||||
struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, bool copy_caches);
|
||||
struct Object *BKE_object_copy(struct Main *bmain, struct Object *ob);
|
||||
struct Object *BKE_object_copy_ex(struct Main *bmain, const struct Object *ob, bool copy_caches);
|
||||
struct Object *BKE_object_copy(struct Main *bmain, const struct Object *ob);
|
||||
void BKE_object_make_local(struct Main *bmain, struct Object *ob, const bool lib_local);
|
||||
void BKE_object_make_local_ex(struct Main *bmain, struct Object *ob, const bool lib_local, const bool clear_proxy);
|
||||
bool BKE_object_is_libdata(struct Object *ob);
|
||||
|
@ -100,7 +100,7 @@ void BKE_paint_set_overlay_override(enum OverlayFlags flag);
|
||||
/* palettes */
|
||||
void BKE_palette_free(struct Palette *palette);
|
||||
struct Palette *BKE_palette_add(struct Main *bmain, const char *name);
|
||||
struct Palette *BKE_palette_copy(struct Main *bmain, struct Palette *palette);
|
||||
struct Palette *BKE_palette_copy(struct Main *bmain, const struct Palette *palette);
|
||||
void BKE_palette_make_local(struct Main *bmain, struct Palette *palette, const bool lib_local);
|
||||
struct PaletteColor *BKE_palette_color_add(struct Palette *palette);
|
||||
bool BKE_palette_is_empty(const struct Palette *palette);
|
||||
@ -110,7 +110,7 @@ void BKE_palette_clear(struct Palette *palette);
|
||||
/* paint curves */
|
||||
struct PaintCurve *BKE_paint_curve_add(struct Main *bmain, const char *name);
|
||||
void BKE_paint_curve_free(struct PaintCurve *pc);
|
||||
struct PaintCurve *BKE_paint_curve_copy(struct Main *bmain, struct PaintCurve *pc);
|
||||
struct PaintCurve *BKE_paint_curve_copy(struct Main *bmain, const struct PaintCurve *pc);
|
||||
void BKE_paint_curve_make_local(struct Main *bmain, struct PaintCurve *pc, const bool lib_local);
|
||||
|
||||
void BKE_paint_init(struct Scene *sce, PaintMode mode, const char col[3]);
|
||||
|
@ -324,7 +324,7 @@ struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct P
|
||||
struct ModifierData *object_add_particle_system(struct Scene *scene, struct Object *ob, const char *name);
|
||||
void object_remove_particle_system(struct Scene *scene, struct Object *ob);
|
||||
struct ParticleSettings *psys_new_settings(const char *name, struct Main *main);
|
||||
struct ParticleSettings *BKE_particlesettings_copy(struct Main *bmain, struct ParticleSettings *part);
|
||||
struct ParticleSettings *BKE_particlesettings_copy(struct Main *bmain, const struct ParticleSettings *part);
|
||||
void BKE_particlesettings_make_local(struct Main *bmain, struct ParticleSettings *part, const bool lib_local);
|
||||
|
||||
void psys_reset(struct ParticleSystem *psys, int mode);
|
||||
|
@ -37,8 +37,8 @@ struct Object;
|
||||
|
||||
void BKE_bproperty_free(struct bProperty *prop);
|
||||
void BKE_bproperty_free_list(struct ListBase *lb);
|
||||
struct bProperty *BKE_bproperty_copy(struct bProperty *prop);
|
||||
void BKE_bproperty_copy_list(struct ListBase *lbn, struct ListBase *lbo);
|
||||
struct bProperty *BKE_bproperty_copy(const struct bProperty *prop);
|
||||
void BKE_bproperty_copy_list(struct ListBase *lbn, const struct ListBase *lbo);
|
||||
void BKE_bproperty_init(struct bProperty *prop);
|
||||
struct bProperty *BKE_bproperty_new(int type);
|
||||
void BKE_bproperty_unique(struct bProperty *first, struct bProperty *prop, int force);
|
||||
|
@ -49,8 +49,8 @@ void BKE_rigidbody_free_constraint(struct Object *ob);
|
||||
|
||||
/* ...... */
|
||||
|
||||
struct RigidBodyOb *BKE_rigidbody_copy_object(struct Object *ob);
|
||||
struct RigidBodyCon *BKE_rigidbody_copy_constraint(struct Object *ob);
|
||||
struct RigidBodyOb *BKE_rigidbody_copy_object(const struct Object *ob);
|
||||
struct RigidBodyCon *BKE_rigidbody_copy_constraint(const struct Object *ob);
|
||||
|
||||
/* Callback format for performing operations on ID-pointers for rigidbody world. */
|
||||
typedef void (*RigidbodyWorldIDFunc)(struct RigidBodyWorld *rbw, struct ID **idpoin, void *userdata, int cb_flag);
|
||||
|
@ -53,15 +53,15 @@ void free_actuators(struct ListBase *lb);
|
||||
void free_sensor(struct bSensor *sens);
|
||||
void free_sensors(struct ListBase *lb);
|
||||
struct bSensor *copy_sensor(struct bSensor *sens);
|
||||
void copy_sensors(struct ListBase *lbn, struct ListBase *lbo);
|
||||
void copy_sensors(struct ListBase *lbn, const struct ListBase *lbo);
|
||||
void init_sensor(struct bSensor *sens);
|
||||
struct bSensor *new_sensor(int type);
|
||||
struct bController *copy_controller(struct bController *cont);
|
||||
void copy_controllers(struct ListBase *lbn, struct ListBase *lbo);
|
||||
void copy_controllers(struct ListBase *lbn, const struct ListBase *lbo);
|
||||
void init_controller(struct bController *cont);
|
||||
struct bController *new_controller(int type);
|
||||
struct bActuator *copy_actuator(struct bActuator *act);
|
||||
void copy_actuators(struct ListBase *lbn, struct ListBase *lbo);
|
||||
void copy_actuators(struct ListBase *lbn, const struct ListBase *lbo);
|
||||
void init_actuator(struct bActuator *act);
|
||||
struct bActuator *new_actuator(int type);
|
||||
void clear_sca_new_poins_ob(struct Object *ob);
|
||||
@ -70,7 +70,7 @@ void set_sca_new_poins_ob(struct Object *ob);
|
||||
void set_sca_new_poins(void);
|
||||
|
||||
void BKE_sca_logic_links_remap(struct Main *bmain, struct Object *ob_old, struct Object *ob_new);
|
||||
void BKE_sca_logic_copy(struct Object *ob_new, struct Object *ob);
|
||||
void BKE_sca_logic_copy(struct Object *ob_new, const struct Object *ob);
|
||||
|
||||
void sca_move_sensor(struct bSensor *sens_to_move, struct Object *ob, int move_up);
|
||||
void sca_move_controller(struct bController *cont_to_move, struct Object *ob, int move_up);
|
||||
|
@ -33,7 +33,7 @@ struct Speaker;
|
||||
|
||||
void BKE_speaker_init(struct Speaker *spk);
|
||||
void *BKE_speaker_add(struct Main *bmain, const char *name);
|
||||
struct Speaker *BKE_speaker_copy(struct Main *bmain, struct Speaker *spk);
|
||||
struct Speaker *BKE_speaker_copy(struct Main *bmain, const struct Speaker *spk);
|
||||
void BKE_speaker_make_local(struct Main *bmain, struct Speaker *spk, const bool lib_local);
|
||||
void BKE_speaker_free(struct Speaker *spk);
|
||||
|
||||
|
@ -52,7 +52,7 @@ bool BKE_text_reload(struct Text *text);
|
||||
struct Text *BKE_text_load_ex(struct Main *bmain, const char *file, const char *relpath,
|
||||
const bool is_internal);
|
||||
struct Text *BKE_text_load (struct Main *bmain, const char *file, const char *relpath);
|
||||
struct Text *BKE_text_copy (struct Main *bmain, struct Text *ta);
|
||||
struct Text *BKE_text_copy (struct Main *bmain, const struct Text *ta);
|
||||
void BKE_text_make_local (struct Main *bmain, struct Text *text, const bool lib_local);
|
||||
void BKE_text_clear (struct Text *text);
|
||||
void BKE_text_write (struct Text *text, const char *str);
|
||||
|
@ -70,7 +70,7 @@ void colorband_update_sort(struct ColorBand *coba);
|
||||
|
||||
void BKE_texture_free(struct Tex *tex);
|
||||
void BKE_texture_default(struct Tex *tex);
|
||||
struct Tex *BKE_texture_copy(struct Main *bmain, struct Tex *tex);
|
||||
struct Tex *BKE_texture_copy(struct Main *bmain, const struct Tex *tex);
|
||||
struct Tex *BKE_texture_add(struct Main *bmain, const char *name);
|
||||
struct Tex *BKE_texture_localize(struct Tex *tex);
|
||||
void BKE_texture_make_local(struct Main *bmain, struct Tex *tex, const bool lib_local);
|
||||
@ -114,13 +114,13 @@ void BKE_texture_colormapping_default(struct ColorMapping *color
|
||||
void BKE_texture_envmap_free_data(struct EnvMap *env);
|
||||
void BKE_texture_envmap_free(struct EnvMap *env);
|
||||
struct EnvMap *BKE_texture_envmap_add(void);
|
||||
struct EnvMap *BKE_texture_envmap_copy(struct EnvMap *env);
|
||||
struct EnvMap *BKE_texture_envmap_copy(const struct EnvMap *env);
|
||||
|
||||
void BKE_texture_pointdensity_init_data(struct PointDensity *pd);
|
||||
void BKE_texture_pointdensity_free_data(struct PointDensity *pd);
|
||||
void BKE_texture_pointdensity_free(struct PointDensity *pd);
|
||||
struct PointDensity *BKE_texture_pointdensity_add(void);
|
||||
struct PointDensity *BKE_texture_pointdensity_copy(struct PointDensity *pd);
|
||||
struct PointDensity *BKE_texture_pointdensity_copy(const struct PointDensity *pd);
|
||||
|
||||
void BKE_texture_voxeldata_free_data(struct VoxelData *vd);
|
||||
void BKE_texture_voxeldata_free(struct VoxelData *vd);
|
||||
@ -129,7 +129,7 @@ struct VoxelData *BKE_texture_voxeldata_copy(struct VoxelData *vd);
|
||||
|
||||
void BKE_texture_ocean_free(struct OceanTex *ot);
|
||||
struct OceanTex *BKE_texture_ocean_add(void);
|
||||
struct OceanTex *BKE_texture_ocean_copy(struct OceanTex *ot);
|
||||
struct OceanTex *BKE_texture_ocean_copy(const struct OceanTex *ot);
|
||||
|
||||
bool BKE_texture_dependsOnTime(const struct Tex *texture);
|
||||
bool BKE_texture_is_image_user(const struct Tex *tex);
|
||||
|
@ -52,7 +52,7 @@ struct rcti;
|
||||
/* **** Common functions **** */
|
||||
|
||||
void BKE_tracking_free(struct MovieTracking *tracking);
|
||||
void BKE_tracking_copy(struct MovieTracking *tracking_dst, struct MovieTracking *tracking_src);
|
||||
void BKE_tracking_copy(struct MovieTracking *tracking_dst, const struct MovieTracking *tracking_src);
|
||||
|
||||
void BKE_tracking_settings_init(struct MovieTracking *tracking);
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct World;
|
||||
void BKE_world_free(struct World *sc);
|
||||
void BKE_world_init(struct World *wrld);
|
||||
struct World *add_world(struct Main *bmian, const char *name);
|
||||
struct World *BKE_world_copy(struct Main *bmain, struct World *wrld);
|
||||
struct World *BKE_world_copy(struct Main *bmain, const struct World *wrld);
|
||||
struct World *localize_world(struct World *wrld);
|
||||
void BKE_world_make_local(struct Main *bmain, struct World *wrld, const bool lib_local);
|
||||
|
||||
|
@ -121,7 +121,7 @@ void BKE_action_free(bAction *act)
|
||||
|
||||
/* .................................. */
|
||||
|
||||
bAction *BKE_action_copy(Main *bmain, bAction *src)
|
||||
bAction *BKE_action_copy(Main *bmain, const bAction *src)
|
||||
{
|
||||
bAction *dst = NULL;
|
||||
bActionGroup *dgrp, *sgrp;
|
||||
@ -524,7 +524,7 @@ const char *BKE_pose_ikparam_get_name(bPose *pose)
|
||||
*
|
||||
* \param dst Should be freed already, makes entire duplicate.
|
||||
*/
|
||||
void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints)
|
||||
void BKE_pose_copy_data(bPose **dst, const bPose *src, const bool copy_constraints)
|
||||
{
|
||||
bPose *outPose;
|
||||
bPoseChannel *pchan;
|
||||
|
@ -149,7 +149,7 @@ void BKE_armature_make_local(Main *bmain, bArmature *arm, const bool lib_local)
|
||||
BKE_id_make_local_generic(bmain, &arm->id, true, lib_local);
|
||||
}
|
||||
|
||||
static void copy_bonechildren(Bone *newBone, Bone *oldBone, Bone *actBone, Bone **newActBone)
|
||||
static void copy_bonechildren(Bone *newBone, const Bone *oldBone, const Bone *actBone, Bone **newActBone)
|
||||
{
|
||||
Bone *curBone, *newChildBone;
|
||||
|
||||
@ -171,7 +171,7 @@ static void copy_bonechildren(Bone *newBone, Bone *oldBone, Bone *actBone, Bone
|
||||
}
|
||||
}
|
||||
|
||||
bArmature *BKE_armature_copy(Main *bmain, bArmature *arm)
|
||||
bArmature *BKE_armature_copy(Main *bmain, const bArmature *arm)
|
||||
{
|
||||
bArmature *newArm;
|
||||
Bone *oldBone, *newBone;
|
||||
|
@ -1581,7 +1581,7 @@ void boid_free_settings(BoidSettings *boids)
|
||||
MEM_freeN(boids);
|
||||
}
|
||||
}
|
||||
BoidSettings *boid_copy_settings(BoidSettings *boids)
|
||||
BoidSettings *boid_copy_settings(const BoidSettings *boids)
|
||||
{
|
||||
BoidSettings *nboids = NULL;
|
||||
|
||||
|
@ -172,7 +172,7 @@ struct Brush *BKE_brush_first_search(struct Main *bmain, short ob_mode)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Brush *BKE_brush_copy(Main *bmain, Brush *brush)
|
||||
Brush *BKE_brush_copy(Main *bmain, const Brush *brush)
|
||||
{
|
||||
Brush *brushn;
|
||||
|
||||
@ -195,7 +195,7 @@ Brush *BKE_brush_copy(Main *bmain, Brush *brush)
|
||||
brushn->curve = curvemapping_copy(brush->curve);
|
||||
|
||||
/* enable fake user by default */
|
||||
id_fake_user_set(&brush->id);
|
||||
id_fake_user_set(&brushn->id);
|
||||
|
||||
BKE_id_copy_ensure_local(bmain, &brush->id, &brushn->id);
|
||||
|
||||
|
@ -100,12 +100,12 @@ void BKE_cachefile_free(CacheFile *cache_file)
|
||||
BLI_freelistN(&cache_file->object_paths);
|
||||
}
|
||||
|
||||
CacheFile *BKE_cachefile_copy(Main *bmain, CacheFile *cache_file)
|
||||
CacheFile *BKE_cachefile_copy(Main *bmain, const CacheFile *cache_file)
|
||||
{
|
||||
CacheFile *new_cache_file = BKE_libblock_copy(bmain, &cache_file->id);
|
||||
new_cache_file->handle = NULL;
|
||||
|
||||
BLI_listbase_clear(&cache_file->object_paths);
|
||||
BLI_listbase_clear(&new_cache_file->object_paths);
|
||||
|
||||
BKE_id_copy_ensure_local(bmain, &cache_file->id, &new_cache_file->id);
|
||||
|
||||
|
@ -93,7 +93,7 @@ void *BKE_camera_add(Main *bmain, const char *name)
|
||||
return cam;
|
||||
}
|
||||
|
||||
Camera *BKE_camera_copy(Main *bmain, Camera *cam)
|
||||
Camera *BKE_camera_copy(Main *bmain, const Camera *cam)
|
||||
{
|
||||
Camera *camn;
|
||||
|
||||
|
@ -130,7 +130,7 @@ void curvemapping_free(CurveMapping *cumap)
|
||||
}
|
||||
}
|
||||
|
||||
void curvemapping_copy_data(CurveMapping *target, CurveMapping *cumap)
|
||||
void curvemapping_copy_data(CurveMapping *target, const CurveMapping *cumap)
|
||||
{
|
||||
int a;
|
||||
|
||||
@ -146,7 +146,7 @@ void curvemapping_copy_data(CurveMapping *target, CurveMapping *cumap)
|
||||
}
|
||||
}
|
||||
|
||||
CurveMapping *curvemapping_copy(CurveMapping *cumap)
|
||||
CurveMapping *curvemapping_copy(const CurveMapping *cumap)
|
||||
{
|
||||
if (cumap) {
|
||||
CurveMapping *cumapn = MEM_dupallocN(cumap);
|
||||
|
@ -190,7 +190,7 @@ Curve *BKE_curve_add(Main *bmain, const char *name, int type)
|
||||
return cu;
|
||||
}
|
||||
|
||||
Curve *BKE_curve_copy(Main *bmain, Curve *cu)
|
||||
Curve *BKE_curve_copy(Main *bmain, const Curve *cu)
|
||||
{
|
||||
Curve *cun;
|
||||
int a;
|
||||
@ -472,7 +472,7 @@ void BKE_nurbList_free(ListBase *lb)
|
||||
BLI_listbase_clear(lb);
|
||||
}
|
||||
|
||||
Nurb *BKE_nurb_duplicate(Nurb *nu)
|
||||
Nurb *BKE_nurb_duplicate(const Nurb *nu)
|
||||
{
|
||||
Nurb *newnu;
|
||||
int len;
|
||||
@ -536,7 +536,7 @@ Nurb *BKE_nurb_copy(Nurb *src, int pntsu, int pntsv)
|
||||
return newnu;
|
||||
}
|
||||
|
||||
void BKE_nurbList_duplicate(ListBase *lb1, ListBase *lb2)
|
||||
void BKE_nurbList_duplicate(ListBase *lb1, const ListBase *lb2)
|
||||
{
|
||||
Nurb *nu, *nun;
|
||||
|
||||
|
@ -79,7 +79,7 @@ bDeformGroup *BKE_defgroup_new(Object *ob, const char *name)
|
||||
return defgroup;
|
||||
}
|
||||
|
||||
void defgroup_copy_list(ListBase *outbase, ListBase *inbase)
|
||||
void defgroup_copy_list(ListBase *outbase, const ListBase *inbase)
|
||||
{
|
||||
bDeformGroup *defgroup, *defgroupn;
|
||||
|
||||
@ -91,7 +91,7 @@ void defgroup_copy_list(ListBase *outbase, ListBase *inbase)
|
||||
}
|
||||
}
|
||||
|
||||
bDeformGroup *defgroup_duplicate(bDeformGroup *ingroup)
|
||||
bDeformGroup *defgroup_duplicate(const bDeformGroup *ingroup)
|
||||
{
|
||||
bDeformGroup *outgroup;
|
||||
|
||||
|
@ -126,7 +126,7 @@ void free_fcurves(ListBase *list)
|
||||
/* ---------------------- Copy --------------------------- */
|
||||
|
||||
/* duplicate an F-Curve */
|
||||
FCurve *copy_fcurve(FCurve *fcu)
|
||||
FCurve *copy_fcurve(const FCurve *fcu)
|
||||
{
|
||||
FCurve *fcu_d;
|
||||
|
||||
@ -1805,7 +1805,7 @@ void fcurve_free_driver(FCurve *fcu)
|
||||
}
|
||||
|
||||
/* This makes a copy of the given driver */
|
||||
ChannelDriver *fcurve_copy_driver(ChannelDriver *driver)
|
||||
ChannelDriver *fcurve_copy_driver(const ChannelDriver *driver)
|
||||
{
|
||||
ChannelDriver *ndriver;
|
||||
|
||||
|
@ -116,7 +116,7 @@ static void fcm_generator_free(FModifier *fcm)
|
||||
MEM_freeN(data->coefficients);
|
||||
}
|
||||
|
||||
static void fcm_generator_copy(FModifier *fcm, FModifier *src)
|
||||
static void fcm_generator_copy(FModifier *fcm, const FModifier *src)
|
||||
{
|
||||
FMod_Generator *gen = (FMod_Generator *)fcm->data;
|
||||
FMod_Generator *ogen = (FMod_Generator *)src->data;
|
||||
@ -386,7 +386,7 @@ static void fcm_envelope_free(FModifier *fcm)
|
||||
MEM_freeN(env->data);
|
||||
}
|
||||
|
||||
static void fcm_envelope_copy(FModifier *fcm, FModifier *src)
|
||||
static void fcm_envelope_copy(FModifier *fcm, const FModifier *src)
|
||||
{
|
||||
FMod_Envelope *env = (FMod_Envelope *)fcm->data;
|
||||
FMod_Envelope *oenv = (FMod_Envelope *)src->data;
|
||||
@ -877,7 +877,7 @@ static void fcm_python_new_data(void *mdata)
|
||||
data->prop->type = IDP_GROUP;
|
||||
}
|
||||
|
||||
static void fcm_python_copy(FModifier *fcm, FModifier *src)
|
||||
static void fcm_python_copy(FModifier *fcm, const FModifier *src)
|
||||
{
|
||||
FMod_Python *pymod = (FMod_Python *)fcm->data;
|
||||
FMod_Python *opymod = (FMod_Python *)src->data;
|
||||
@ -1040,7 +1040,7 @@ static void fmods_init_typeinfo(void)
|
||||
/* This function should be used for getting the appropriate type-info when only
|
||||
* a F-Curve modifier type is known
|
||||
*/
|
||||
const FModifierTypeInfo *get_fmodifier_typeinfo(int type)
|
||||
const FModifierTypeInfo *get_fmodifier_typeinfo(const int type)
|
||||
{
|
||||
/* initialize the type-info list? */
|
||||
if (FMI_INIT) {
|
||||
@ -1065,7 +1065,7 @@ const FModifierTypeInfo *get_fmodifier_typeinfo(int type)
|
||||
/* This function should always be used to get the appropriate type-info, as it
|
||||
* has checks which prevent segfaults in some weird cases.
|
||||
*/
|
||||
const FModifierTypeInfo *fmodifier_get_typeinfo(FModifier *fcm)
|
||||
const FModifierTypeInfo *fmodifier_get_typeinfo(const FModifier *fcm)
|
||||
{
|
||||
/* only return typeinfo for valid modifiers */
|
||||
if (fcm)
|
||||
@ -1117,7 +1117,7 @@ FModifier *add_fmodifier(ListBase *modifiers, int type)
|
||||
}
|
||||
|
||||
/* Make a copy of the specified F-Modifier */
|
||||
FModifier *copy_fmodifier(FModifier *src)
|
||||
FModifier *copy_fmodifier(const FModifier *src)
|
||||
{
|
||||
const FModifierTypeInfo *fmi = fmodifier_get_typeinfo(src);
|
||||
FModifier *dst;
|
||||
@ -1142,7 +1142,7 @@ FModifier *copy_fmodifier(FModifier *src)
|
||||
}
|
||||
|
||||
/* Duplicate all of the F-Modifiers in the Modifier stacks */
|
||||
void copy_fmodifiers(ListBase *dst, ListBase *src)
|
||||
void copy_fmodifiers(ListBase *dst, const ListBase *src)
|
||||
{
|
||||
FModifier *fcm, *srcfcm;
|
||||
|
||||
|
@ -754,7 +754,7 @@ bGPDlayer *BKE_gpencil_layer_duplicate(const bGPDlayer *gpl_src)
|
||||
}
|
||||
|
||||
/* make a copy of a given gpencil datablock */
|
||||
bGPdata *BKE_gpencil_data_duplicate(Main *bmain, bGPdata *gpd_src, bool internal_copy)
|
||||
bGPdata *BKE_gpencil_data_duplicate(Main *bmain, const bGPdata *gpd_src, bool internal_copy)
|
||||
{
|
||||
const bGPDlayer *gpl_src;
|
||||
bGPDlayer *gpl_dst;
|
||||
|
@ -87,7 +87,7 @@ Group *BKE_group_add(Main *bmain, const char *name)
|
||||
return group;
|
||||
}
|
||||
|
||||
Group *BKE_group_copy(Main *bmain, Group *group)
|
||||
Group *BKE_group_copy(Main *bmain, const Group *group)
|
||||
{
|
||||
Group *groupn;
|
||||
|
||||
|
@ -205,7 +205,7 @@ void BKE_previewimg_clear(struct PreviewImage *prv)
|
||||
}
|
||||
}
|
||||
|
||||
PreviewImage *BKE_previewimg_copy(PreviewImage *prv)
|
||||
PreviewImage *BKE_previewimg_copy(const PreviewImage *prv)
|
||||
{
|
||||
PreviewImage *prv_img = NULL;
|
||||
int i;
|
||||
@ -223,7 +223,7 @@ PreviewImage *BKE_previewimg_copy(PreviewImage *prv)
|
||||
}
|
||||
|
||||
/** Duplicate preview image from \a id and clear icon_id, to be used by datablock copy functions. */
|
||||
void BKE_previewimg_id_copy(ID *new_id, ID *old_id)
|
||||
void BKE_previewimg_id_copy(ID *new_id, const ID *old_id)
|
||||
{
|
||||
PreviewImage **old_prv_p = BKE_previewimg_id_get_p(old_id);
|
||||
PreviewImage **new_prv_p = BKE_previewimg_id_get_p(new_id);
|
||||
@ -240,7 +240,7 @@ void BKE_previewimg_id_copy(ID *new_id, ID *old_id)
|
||||
}
|
||||
}
|
||||
|
||||
PreviewImage **BKE_previewimg_id_get_p(ID *id)
|
||||
PreviewImage **BKE_previewimg_id_get_p(const ID *id)
|
||||
{
|
||||
switch (GS(id->name)) {
|
||||
#define ID_PRV_CASE(id_code, id_struct) case id_code: { return &((id_struct *)id)->preview; } ((void)0)
|
||||
|
@ -435,7 +435,7 @@ static void copy_image_packedfiles(ListBase *lb_dst, const ListBase *lb_src)
|
||||
}
|
||||
|
||||
/* empty image block, of similar type and filename */
|
||||
Image *BKE_image_copy(Main *bmain, Image *ima)
|
||||
Image *BKE_image_copy(Main *bmain, const Image *ima)
|
||||
{
|
||||
Image *nima = image_alloc(bmain, ima->id.name + 2, ima->source, ima->type);
|
||||
|
||||
|
@ -151,7 +151,7 @@ Key *BKE_key_add(ID *id) /* common function */
|
||||
return key;
|
||||
}
|
||||
|
||||
Key *BKE_key_copy(Main *bmain, Key *key)
|
||||
Key *BKE_key_copy(Main *bmain, const Key *key)
|
||||
{
|
||||
Key *keyn;
|
||||
KeyBlock *kbn, *kb;
|
||||
|
@ -117,7 +117,7 @@ Lamp *BKE_lamp_add(Main *bmain, const char *name)
|
||||
return la;
|
||||
}
|
||||
|
||||
Lamp *BKE_lamp_copy(Main *bmain, Lamp *la)
|
||||
Lamp *BKE_lamp_copy(Main *bmain, const Lamp *la)
|
||||
{
|
||||
Lamp *lan;
|
||||
int a;
|
||||
|
@ -276,7 +276,7 @@ Lattice *BKE_lattice_add(Main *bmain, const char *name)
|
||||
return lt;
|
||||
}
|
||||
|
||||
Lattice *BKE_lattice_copy(Main *bmain, Lattice *lt)
|
||||
Lattice *BKE_lattice_copy(Main *bmain, const Lattice *lt)
|
||||
{
|
||||
Lattice *ltn;
|
||||
|
||||
|
@ -309,7 +309,7 @@ void BKE_id_expand_local(Main *bmain, ID *id)
|
||||
/**
|
||||
* Ensure new (copied) ID is fully made local.
|
||||
*/
|
||||
void BKE_id_copy_ensure_local(Main *bmain, ID *old_id, ID *new_id)
|
||||
void BKE_id_copy_ensure_local(Main *bmain, const ID *old_id, ID *new_id)
|
||||
{
|
||||
if (ID_IS_LINKED_DATABLOCK(old_id)) {
|
||||
BKE_id_expand_local(bmain, new_id);
|
||||
@ -497,7 +497,7 @@ bool id_make_local(Main *bmain, ID *id, const bool test, const bool lib_local)
|
||||
* Invokes the appropriate copy method for the block and returns the result in
|
||||
* newid, unless test. Returns true if the block can be copied.
|
||||
*/
|
||||
bool id_copy(Main *bmain, ID *id, ID **newid, bool test)
|
||||
bool id_copy(Main *bmain, const ID *id, ID **newid, bool test)
|
||||
{
|
||||
if (!test) {
|
||||
*newid = NULL;
|
||||
@ -1116,7 +1116,7 @@ void BKE_libblock_copy_data(ID *id, const ID *id_from, const bool do_action)
|
||||
}
|
||||
|
||||
/* used everywhere in blenkernel */
|
||||
void *BKE_libblock_copy(Main *bmain, ID *id)
|
||||
void *BKE_libblock_copy(Main *bmain, const ID *id)
|
||||
{
|
||||
ID *idn;
|
||||
size_t idn_len;
|
||||
@ -1138,7 +1138,7 @@ void *BKE_libblock_copy(Main *bmain, ID *id)
|
||||
return idn;
|
||||
}
|
||||
|
||||
void *BKE_libblock_copy_nolib(ID *id, const bool do_action)
|
||||
void *BKE_libblock_copy_nolib(const ID *id, const bool do_action)
|
||||
{
|
||||
ID *idn;
|
||||
size_t idn_len;
|
||||
|
@ -155,7 +155,7 @@ void BKE_linestyle_free(FreestyleLineStyle *linestyle)
|
||||
BKE_linestyle_geometry_modifier_remove(linestyle, m);
|
||||
}
|
||||
|
||||
FreestyleLineStyle *BKE_linestyle_copy(struct Main *bmain, FreestyleLineStyle *linestyle)
|
||||
FreestyleLineStyle *BKE_linestyle_copy(struct Main *bmain, const FreestyleLineStyle *linestyle)
|
||||
{
|
||||
FreestyleLineStyle *new_linestyle;
|
||||
LineStyleModifier *m;
|
||||
@ -355,7 +355,7 @@ LineStyleModifier *BKE_linestyle_color_modifier_add(FreestyleLineStyle *linestyl
|
||||
return m;
|
||||
}
|
||||
|
||||
LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m)
|
||||
LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m)
|
||||
{
|
||||
LineStyleModifier *new_m;
|
||||
|
||||
@ -594,7 +594,7 @@ LineStyleModifier *BKE_linestyle_alpha_modifier_add(FreestyleLineStyle *linestyl
|
||||
return m;
|
||||
}
|
||||
|
||||
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m)
|
||||
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m)
|
||||
{
|
||||
LineStyleModifier *new_m;
|
||||
|
||||
@ -863,7 +863,7 @@ LineStyleModifier *BKE_linestyle_thickness_modifier_add(FreestyleLineStyle *line
|
||||
return m;
|
||||
}
|
||||
|
||||
LineStyleModifier *BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m)
|
||||
LineStyleModifier *BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m)
|
||||
{
|
||||
LineStyleModifier *new_m;
|
||||
|
||||
@ -1195,7 +1195,7 @@ LineStyleModifier *BKE_linestyle_geometry_modifier_add(FreestyleLineStyle *lines
|
||||
return m;
|
||||
}
|
||||
|
||||
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle, LineStyleModifier *m)
|
||||
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle, const LineStyleModifier *m)
|
||||
{
|
||||
LineStyleModifier *new_m;
|
||||
|
||||
|
@ -192,7 +192,7 @@ void BKE_mask_layer_rename(Mask *mask, MaskLayer *masklay, char *oldname, char *
|
||||
BKE_animdata_fix_paths_rename_all(&mask->id, "layers", oldname, masklay->name);
|
||||
}
|
||||
|
||||
MaskLayer *BKE_mask_layer_copy(MaskLayer *masklay)
|
||||
MaskLayer *BKE_mask_layer_copy(const MaskLayer *masklay)
|
||||
{
|
||||
MaskLayer *masklay_new;
|
||||
MaskSpline *spline;
|
||||
@ -236,7 +236,7 @@ MaskLayer *BKE_mask_layer_copy(MaskLayer *masklay)
|
||||
return masklay_new;
|
||||
}
|
||||
|
||||
void BKE_mask_layer_copy_list(ListBase *masklayers_new, ListBase *masklayers)
|
||||
void BKE_mask_layer_copy_list(ListBase *masklayers_new, const ListBase *masklayers)
|
||||
{
|
||||
MaskLayer *layer;
|
||||
|
||||
@ -840,7 +840,7 @@ Mask *BKE_mask_copy_nolib(Mask *mask)
|
||||
return mask_new;
|
||||
}
|
||||
|
||||
Mask *BKE_mask_copy(Main *bmain, Mask *mask)
|
||||
Mask *BKE_mask_copy(Main *bmain, const Mask *mask)
|
||||
{
|
||||
Mask *mask_new;
|
||||
|
||||
@ -851,7 +851,7 @@ Mask *BKE_mask_copy(Main *bmain, Mask *mask)
|
||||
BKE_mask_layer_copy_list(&mask_new->masklayers, &mask->masklayers);
|
||||
|
||||
/* enable fake user by default */
|
||||
id_fake_user_set(&mask->id);
|
||||
id_fake_user_set(&mask_new->id);
|
||||
|
||||
BKE_id_copy_ensure_local(bmain, &mask->id, &mask_new->id);
|
||||
|
||||
@ -906,7 +906,7 @@ void BKE_mask_spline_free_list(ListBase *splines)
|
||||
}
|
||||
}
|
||||
|
||||
static MaskSplinePoint *mask_spline_points_copy(MaskSplinePoint *points, int tot_point)
|
||||
static MaskSplinePoint *mask_spline_points_copy(const MaskSplinePoint *points, int tot_point)
|
||||
{
|
||||
MaskSplinePoint *npoints;
|
||||
int i;
|
||||
@ -923,7 +923,7 @@ static MaskSplinePoint *mask_spline_points_copy(MaskSplinePoint *points, int tot
|
||||
return npoints;
|
||||
}
|
||||
|
||||
MaskSpline *BKE_mask_spline_copy(MaskSpline *spline)
|
||||
MaskSpline *BKE_mask_spline_copy(const MaskSpline *spline)
|
||||
{
|
||||
MaskSpline *nspline = MEM_callocN(sizeof(MaskSpline), "new spline");
|
||||
|
||||
|
@ -221,7 +221,7 @@ Material *BKE_material_add(Main *bmain, const char *name)
|
||||
}
|
||||
|
||||
/* XXX keep synced with next function */
|
||||
Material *BKE_material_copy(Main *bmain, Material *ma)
|
||||
Material *BKE_material_copy(Main *bmain, const Material *ma)
|
||||
{
|
||||
Material *man;
|
||||
int a;
|
||||
|
@ -104,7 +104,7 @@ MetaBall *BKE_mball_add(Main *bmain, const char *name)
|
||||
return mb;
|
||||
}
|
||||
|
||||
MetaBall *BKE_mball_copy(Main *bmain, MetaBall *mb)
|
||||
MetaBall *BKE_mball_copy(Main *bmain, const MetaBall *mb)
|
||||
{
|
||||
MetaBall *mbn;
|
||||
int a;
|
||||
|
@ -498,7 +498,7 @@ Mesh *BKE_mesh_add(Main *bmain, const char *name)
|
||||
return me;
|
||||
}
|
||||
|
||||
Mesh *BKE_mesh_copy(Main *bmain, Mesh *me)
|
||||
Mesh *BKE_mesh_copy(Main *bmain, const Mesh *me)
|
||||
{
|
||||
Mesh *men;
|
||||
int a;
|
||||
|
@ -1488,7 +1488,7 @@ void BKE_movieclip_free(MovieClip *clip)
|
||||
BKE_animdata_free((ID *) clip, false);
|
||||
}
|
||||
|
||||
MovieClip *BKE_movieclip_copy(Main *bmain, MovieClip *clip)
|
||||
MovieClip *BKE_movieclip_copy(Main *bmain, const MovieClip *clip)
|
||||
{
|
||||
MovieClip *clip_new;
|
||||
|
||||
|
@ -921,7 +921,7 @@ static void node_socket_copy(bNodeSocket *dst, bNodeSocket *src)
|
||||
|
||||
/* keep socket listorder identical, for copying links */
|
||||
/* ntree is the target tree */
|
||||
bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node)
|
||||
bNode *nodeCopyNode(bNodeTree *ntree, bNode *node)
|
||||
{
|
||||
bNode *nnode = MEM_callocN(sizeof(bNode), "dupli node");
|
||||
bNodeSocket *sock, *oldsock;
|
||||
@ -1200,7 +1200,9 @@ bNodeTree *ntreeAddTree(Main *bmain, const char *name, const char *idname)
|
||||
* copying for internal use (threads for eg), where you wont want it to modify the
|
||||
* scene data.
|
||||
*/
|
||||
static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, Main *bmain, bool skip_database, bool do_id_user, bool do_make_extern, bool copy_previews)
|
||||
static bNodeTree *ntreeCopyTree_internal(
|
||||
const bNodeTree *ntree, Main *bmain,
|
||||
bool skip_database, bool do_id_user, bool do_make_extern, bool copy_previews)
|
||||
{
|
||||
bNodeTree *newtree;
|
||||
bNode *node /*, *nnode */ /* UNUSED */, *last;
|
||||
@ -1299,11 +1301,11 @@ static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, Main *bmain, bool ski
|
||||
return newtree;
|
||||
}
|
||||
|
||||
bNodeTree *ntreeCopyTree_ex(bNodeTree *ntree, Main *bmain, const bool do_id_user)
|
||||
bNodeTree *ntreeCopyTree_ex(const bNodeTree *ntree, Main *bmain, const bool do_id_user)
|
||||
{
|
||||
return ntreeCopyTree_internal(ntree, bmain, false, do_id_user, true, true);
|
||||
}
|
||||
bNodeTree *ntreeCopyTree(Main *bmain, bNodeTree *ntree)
|
||||
bNodeTree *ntreeCopyTree(Main *bmain, const bNodeTree *ntree)
|
||||
{
|
||||
return ntreeCopyTree_ex(ntree, bmain, true);
|
||||
}
|
||||
|
@ -909,7 +909,7 @@ SoftBody *copy_softbody(const SoftBody *sb, bool copy_caches)
|
||||
return sbn;
|
||||
}
|
||||
|
||||
BulletSoftBody *copy_bulletsoftbody(BulletSoftBody *bsb)
|
||||
BulletSoftBody *copy_bulletsoftbody(const BulletSoftBody *bsb)
|
||||
{
|
||||
BulletSoftBody *bsbn;
|
||||
|
||||
@ -1042,7 +1042,7 @@ void BKE_object_copy_softbody(Object *ob_dst, const Object *ob_src)
|
||||
}
|
||||
}
|
||||
|
||||
static void copy_object_pose(Object *obn, Object *ob)
|
||||
static void copy_object_pose(Object *obn, const Object *ob)
|
||||
{
|
||||
bPoseChannel *chan;
|
||||
|
||||
@ -1075,7 +1075,7 @@ static void copy_object_pose(Object *obn, Object *ob)
|
||||
}
|
||||
}
|
||||
|
||||
static void copy_object_lod(Object *obn, Object *ob)
|
||||
static void copy_object_lod(Object *obn, const Object *ob)
|
||||
{
|
||||
BLI_duplicatelist(&obn->lodlevels, &ob->lodlevels);
|
||||
|
||||
@ -1126,7 +1126,7 @@ void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src)
|
||||
copy_v3_v3(ob_tar->size, ob_src->size);
|
||||
}
|
||||
|
||||
Object *BKE_object_copy_ex(Main *bmain, Object *ob, bool copy_caches)
|
||||
Object *BKE_object_copy_ex(Main *bmain, const Object *ob, bool copy_caches)
|
||||
{
|
||||
Object *obn;
|
||||
ModifierData *md;
|
||||
@ -1217,7 +1217,7 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, bool copy_caches)
|
||||
}
|
||||
|
||||
/* copy objects, will re-initialize cached simulation data */
|
||||
Object *BKE_object_copy(Main *bmain, Object *ob)
|
||||
Object *BKE_object_copy(Main *bmain, const Object *ob)
|
||||
{
|
||||
return BKE_object_copy_ex(bmain, ob, false);
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ PaintCurve *BKE_paint_curve_add(Main *bmain, const char *name)
|
||||
return pc;
|
||||
}
|
||||
|
||||
PaintCurve *BKE_paint_curve_copy(Main *bmain, PaintCurve *pc)
|
||||
PaintCurve *BKE_paint_curve_copy(Main *bmain, const PaintCurve *pc)
|
||||
{
|
||||
PaintCurve *pc_new;
|
||||
|
||||
@ -399,7 +399,7 @@ Palette *BKE_palette_add(Main *bmain, const char *name)
|
||||
return palette;
|
||||
}
|
||||
|
||||
Palette *BKE_palette_copy(Main *bmain, Palette *palette)
|
||||
Palette *BKE_palette_copy(Main *bmain, const Palette *palette)
|
||||
{
|
||||
Palette *palette_new;
|
||||
|
||||
|
@ -3331,7 +3331,7 @@ void BKE_particlesettings_rough_curve_init(ParticleSettings *part)
|
||||
part->roughcurve = cumap;
|
||||
}
|
||||
|
||||
ParticleSettings *BKE_particlesettings_copy(Main *bmain, ParticleSettings *part)
|
||||
ParticleSettings *BKE_particlesettings_copy(Main *bmain, const ParticleSettings *part)
|
||||
{
|
||||
ParticleSettings *partn;
|
||||
int a;
|
||||
|
@ -65,7 +65,7 @@ void BKE_bproperty_free_list(ListBase *lb)
|
||||
}
|
||||
}
|
||||
|
||||
bProperty *BKE_bproperty_copy(bProperty *prop)
|
||||
bProperty *BKE_bproperty_copy(const bProperty *prop)
|
||||
{
|
||||
bProperty *propn;
|
||||
|
||||
@ -80,7 +80,7 @@ bProperty *BKE_bproperty_copy(bProperty *prop)
|
||||
return propn;
|
||||
}
|
||||
|
||||
void BKE_bproperty_copy_list(ListBase *lbn, ListBase *lbo)
|
||||
void BKE_bproperty_copy_list(ListBase *lbn, const ListBase *lbo)
|
||||
{
|
||||
bProperty *prop, *propn;
|
||||
BKE_bproperty_free_list(lbn); /* in case we are copying to an object with props */
|
||||
|
@ -183,7 +183,7 @@ void BKE_rigidbody_free_constraint(Object *ob)
|
||||
* be added to relevant groups later...
|
||||
*/
|
||||
|
||||
RigidBodyOb *BKE_rigidbody_copy_object(Object *ob)
|
||||
RigidBodyOb *BKE_rigidbody_copy_object(const Object *ob)
|
||||
{
|
||||
RigidBodyOb *rboN = NULL;
|
||||
|
||||
@ -203,7 +203,7 @@ RigidBodyOb *BKE_rigidbody_copy_object(Object *ob)
|
||||
return rboN;
|
||||
}
|
||||
|
||||
RigidBodyCon *BKE_rigidbody_copy_constraint(Object *ob)
|
||||
RigidBodyCon *BKE_rigidbody_copy_constraint(const Object *ob)
|
||||
{
|
||||
RigidBodyCon *rbcN = NULL;
|
||||
|
||||
|
@ -87,7 +87,7 @@ bSensor *copy_sensor(bSensor *sens)
|
||||
return sensn;
|
||||
}
|
||||
|
||||
void copy_sensors(ListBase *lbn, ListBase *lbo)
|
||||
void copy_sensors(ListBase *lbn, const ListBase *lbo)
|
||||
{
|
||||
bSensor *sens, *sensn;
|
||||
|
||||
@ -251,7 +251,7 @@ bController *copy_controller(bController *cont)
|
||||
return contn;
|
||||
}
|
||||
|
||||
void copy_controllers(ListBase *lbn, ListBase *lbo)
|
||||
void copy_controllers(ListBase *lbn, const ListBase *lbo)
|
||||
{
|
||||
bController *cont, *contn;
|
||||
|
||||
@ -389,7 +389,7 @@ bActuator *copy_actuator(bActuator *act)
|
||||
return actn;
|
||||
}
|
||||
|
||||
void copy_actuators(ListBase *lbn, ListBase *lbo)
|
||||
void copy_actuators(ListBase *lbn, const ListBase *lbo)
|
||||
{
|
||||
bActuator *act, *actn;
|
||||
|
||||
@ -783,7 +783,7 @@ void BKE_sca_logic_links_remap(Main *bmain, Object *ob_old, Object *ob_new)
|
||||
* Handle the copying of logic data into a new object, including internal logic links update.
|
||||
* External links (links between logic bricks of different objects) must be handled separately.
|
||||
*/
|
||||
void BKE_sca_logic_copy(Object *ob_new, Object *ob)
|
||||
void BKE_sca_logic_copy(Object *ob_new, const Object *ob)
|
||||
{
|
||||
copy_sensors(&ob_new->sensors, &ob->sensors);
|
||||
copy_controllers(&ob_new->controllers, &ob->controllers);
|
||||
|
@ -68,7 +68,7 @@ void *BKE_speaker_add(Main *bmain, const char *name)
|
||||
return spk;
|
||||
}
|
||||
|
||||
Speaker *BKE_speaker_copy(Main *bmain, Speaker *spk)
|
||||
Speaker *BKE_speaker_copy(Main *bmain, const Speaker *spk)
|
||||
{
|
||||
Speaker *spkn;
|
||||
|
||||
|
@ -448,7 +448,7 @@ Text *BKE_text_load(Main *bmain, const char *file, const char *relpath)
|
||||
return BKE_text_load_ex(bmain, file, relpath, false);
|
||||
}
|
||||
|
||||
Text *BKE_text_copy(Main *bmain, Text *ta)
|
||||
Text *BKE_text_copy(Main *bmain, const Text *ta)
|
||||
{
|
||||
Text *tan;
|
||||
TextLine *line, *tmp;
|
||||
|
@ -846,7 +846,7 @@ MTex *BKE_texture_mtex_add_id(ID *id, int slot)
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
Tex *BKE_texture_copy(Main *bmain, Tex *tex)
|
||||
Tex *BKE_texture_copy(Main *bmain, const Tex *tex)
|
||||
{
|
||||
Tex *texn;
|
||||
|
||||
@ -1263,7 +1263,7 @@ EnvMap *BKE_texture_envmap_add(void)
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
EnvMap *BKE_texture_envmap_copy(EnvMap *env)
|
||||
EnvMap *BKE_texture_envmap_copy(const EnvMap *env)
|
||||
{
|
||||
EnvMap *envn;
|
||||
int a;
|
||||
@ -1336,7 +1336,7 @@ PointDensity *BKE_texture_pointdensity_add(void)
|
||||
return pd;
|
||||
}
|
||||
|
||||
PointDensity *BKE_texture_pointdensity_copy(PointDensity *pd)
|
||||
PointDensity *BKE_texture_pointdensity_copy(const PointDensity *pd)
|
||||
{
|
||||
PointDensity *pdn;
|
||||
|
||||
@ -1430,7 +1430,7 @@ OceanTex *BKE_texture_ocean_add(void)
|
||||
return ot;
|
||||
}
|
||||
|
||||
OceanTex *BKE_texture_ocean_copy(struct OceanTex *ot)
|
||||
OceanTex *BKE_texture_ocean_copy(const OceanTex *ot)
|
||||
{
|
||||
OceanTex *otn = MEM_dupallocN(ot);
|
||||
|
||||
|
@ -190,7 +190,7 @@ void BKE_tracking_free(MovieTracking *tracking)
|
||||
}
|
||||
|
||||
/* Copy the whole list of tracks. */
|
||||
static void tracking_tracks_copy(ListBase *tracks_dst, ListBase *tracks_src, GHash *tracks_mapping)
|
||||
static void tracking_tracks_copy(ListBase *tracks_dst, const ListBase *tracks_src, GHash *tracks_mapping)
|
||||
{
|
||||
MovieTrackingTrack *track_dst, *track_src;
|
||||
|
||||
@ -210,7 +210,7 @@ static void tracking_tracks_copy(ListBase *tracks_dst, ListBase *tracks_src, GHa
|
||||
|
||||
/* copy the whole list of plane tracks (need whole MovieTracking structures due to embedded pointers to tracks).
|
||||
* WARNING: implies tracking_[dst/src] and their tracks have already been copied. */
|
||||
static void tracking_plane_tracks_copy(ListBase *plane_tracks_dst, ListBase *plane_tracks_src, GHash *tracks_mapping)
|
||||
static void tracking_plane_tracks_copy(ListBase *plane_tracks_dst, const ListBase *plane_tracks_src, GHash *tracks_mapping)
|
||||
{
|
||||
MovieTrackingPlaneTrack *plane_track_dst, *plane_track_src;
|
||||
|
||||
@ -232,7 +232,7 @@ static void tracking_plane_tracks_copy(ListBase *plane_tracks_dst, ListBase *pla
|
||||
|
||||
/* Copy reconstruction structure. */
|
||||
static void tracking_reconstruction_copy(
|
||||
MovieTrackingReconstruction *reconstruction_dst, MovieTrackingReconstruction *reconstruction_src)
|
||||
MovieTrackingReconstruction *reconstruction_dst, const MovieTrackingReconstruction *reconstruction_src)
|
||||
{
|
||||
*reconstruction_dst = *reconstruction_src;
|
||||
if (reconstruction_src->cameras) {
|
||||
@ -242,14 +242,14 @@ static void tracking_reconstruction_copy(
|
||||
|
||||
/* Copy stabilization structure. */
|
||||
static void tracking_stabilization_copy(
|
||||
MovieTrackingStabilization *stabilization_dst, MovieTrackingStabilization *stabilization_src)
|
||||
MovieTrackingStabilization *stabilization_dst, const MovieTrackingStabilization *stabilization_src)
|
||||
{
|
||||
*stabilization_dst = *stabilization_src;
|
||||
}
|
||||
|
||||
/* Copy tracking object. */
|
||||
static void tracking_object_copy(
|
||||
MovieTrackingObject *object_dst, MovieTrackingObject *object_src, GHash *tracks_mapping)
|
||||
MovieTrackingObject *object_dst, const MovieTrackingObject *object_src, GHash *tracks_mapping)
|
||||
{
|
||||
*object_dst = *object_src;
|
||||
tracking_tracks_copy(&object_dst->tracks, &object_src->tracks, tracks_mapping);
|
||||
@ -258,7 +258,7 @@ static void tracking_object_copy(
|
||||
}
|
||||
|
||||
/* Copy list of tracking objects. */
|
||||
static void tracking_objects_copy(ListBase *objects_dst, ListBase *objects_src, GHash *tracks_mapping)
|
||||
static void tracking_objects_copy(ListBase *objects_dst, const ListBase *objects_src, GHash *tracks_mapping)
|
||||
{
|
||||
MovieTrackingObject *object_dst, *object_src;
|
||||
|
||||
@ -272,7 +272,7 @@ static void tracking_objects_copy(ListBase *objects_dst, ListBase *objects_src,
|
||||
}
|
||||
|
||||
/* Copy tracking structure content. */
|
||||
void BKE_tracking_copy(MovieTracking *tracking_dst, MovieTracking *tracking_src)
|
||||
void BKE_tracking_copy(MovieTracking *tracking_dst, const MovieTracking *tracking_src)
|
||||
{
|
||||
GHash *tracks_mapping = BLI_ghash_ptr_new(__func__);
|
||||
|
||||
|
@ -119,7 +119,7 @@ World *add_world(Main *bmain, const char *name)
|
||||
return wrld;
|
||||
}
|
||||
|
||||
World *BKE_world_copy(Main *bmain, World *wrld)
|
||||
World *BKE_world_copy(Main *bmain, const World *wrld)
|
||||
{
|
||||
World *wrldn;
|
||||
int a;
|
||||
|
@ -166,7 +166,7 @@ struct ImBuf *IMB_makeSingleUser(struct ImBuf *ibuf);
|
||||
*
|
||||
* \attention Defined in allocimbuf.c
|
||||
*/
|
||||
struct ImBuf *IMB_dupImBuf(struct ImBuf *ibuf1);
|
||||
struct ImBuf *IMB_dupImBuf(const struct ImBuf *ibuf1);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -506,7 +506,7 @@ bool IMB_initImBuf(struct ImBuf *ibuf,
|
||||
}
|
||||
|
||||
/* does no zbuffers? */
|
||||
ImBuf *IMB_dupImBuf(ImBuf *ibuf1)
|
||||
ImBuf *IMB_dupImBuf(const ImBuf *ibuf1)
|
||||
{
|
||||
ImBuf *ibuf2, tbuf;
|
||||
int flags = 0;
|
||||
|
@ -41,7 +41,7 @@ const char *GHOST_getSystemDir(int version, const char *versionstr)
|
||||
|
||||
struct ImBuf;
|
||||
void IMB_freeImBuf(struct ImBuf *ibuf) {}
|
||||
struct ImBuf *IMB_dupImBuf(struct ImBuf *ibuf) {return NULL;}
|
||||
struct ImBuf *IMB_dupImBuf(const ImBuf *ibuf) {return NULL;}
|
||||
|
||||
#ifdef __linux__
|
||||
char *zLhm65070058860608_br_find_exe(const char *default_exe)
|
||||
|
Loading…
Reference in New Issue
Block a user