Cleanup: Move object.c to C++

This is useful to allow the use of features made in C++.

Differential Revision: https://developer.blender.org/D13115
This commit is contained in:
Germano Cavalcante 2021-11-04 16:51:37 -03:00
parent e51735d276
commit e7e3431b29
Notes: blender-bot 2023-02-14 09:02:40 +01:00
Referenced by issue #92972, Cycles HIP graphics interop issue on AMD 5500 XT and Windows
Referenced by issue #92913, Blender crashes if the subdivision resolution is increased
Referenced by issue #92862, Huge viewport performance difference between the instances from the particle system and the geometry nodes instances
Referenced by issue #92868, Shadow catchers with transparency in front of other shadow catchers crash Cycles X
5 changed files with 428 additions and 440 deletions

View File

@ -46,6 +46,7 @@
*/
#include "BLI_compiler_attrs.h"
#include "BLI_utildefines.h"
#ifdef __cplusplus
extern "C" {
@ -179,6 +180,8 @@ typedef enum eLibIDDuplicateFlags {
LIB_ID_DUPLICATE_IS_ROOT_ID = 1 << 1,
} eLibIDDuplicateFlags;
ENUM_OPERATORS(eLibIDDuplicateFlags, LIB_ID_DUPLICATE_IS_ROOT_ID)
/* lib_remap.c (keep here since they're general functions) */
/**
* New freeing logic options.

View File

@ -75,7 +75,7 @@ void BKE_object_modifier_gpencil_hook_reset(struct Object *ob,
struct HookGpencilModifierData *hmd);
bool BKE_object_modifier_gpencil_use_time(struct Object *ob, struct GpencilModifierData *md);
bool BKE_object_shaderfx_use_time(struct Object *ob, struct ShaderFxData *md);
bool BKE_object_shaderfx_use_time(struct Object *ob, struct ShaderFxData *fx);
bool BKE_object_supports_modifiers(const struct Object *ob);
bool BKE_object_support_modifier_type_check(const struct Object *ob, int modifier_type);
@ -89,7 +89,7 @@ bool BKE_object_copy_modifier(struct Main *bmain,
struct Object *ob_dst,
const struct Object *ob_src,
struct ModifierData *md);
bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, struct GpencilModifierData *md);
bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, struct GpencilModifierData *gmd_src);
bool BKE_object_modifier_stack_copy(struct Object *ob_dst,
const struct Object *ob_src,
const bool do_copy_all,
@ -155,7 +155,7 @@ bool BKE_object_obdata_is_libdata(const struct Object *ob);
struct Object *BKE_object_duplicate(struct Main *bmain,
struct Object *ob,
uint dupflag,
const uint duplicate_options);
uint duplicate_options);
void BKE_object_obdata_size_init(struct Object *ob, const float size);

View File

@ -226,7 +226,7 @@ set(SRC
intern/multires_versioning.c
intern/nla.c
intern/node.cc
intern/object.c
intern/object.cc
intern/object_deform.c
intern/object_dupli.cc
intern/object_facemap.c

View File

@ -30,6 +30,8 @@
extern "C" {
#endif
struct BodySpring;
/* pd->forcefield: Effector Fields types */
typedef enum ePFieldType {
/** (this is used for general effector weight). */