39#include "RNA_prototypes.hh"
53 clmd->
sim_parms = MEM_new<ClothSimSettings>(__func__);
54 clmd->
coll_parms = MEM_new<ClothCollSettings>(__func__);
98 if (kb && kb->
data !=
nullptr) {
99 float (*layerorco)[3] =
static_cast<float (*)[3]
>(
106 memcpy(layerorco, kb->
data,
sizeof(
float[3]) * positions.
size());
110 mesh->vert_positions_for_write().copy_from(positions);
111 mesh->tag_positions_changed();
118 reinterpret_cast<float (*)[3]
>(positions.
data()));
124 if (clmd !=
nullptr) {
204 printf(
"clothModifier_freeData\n");
259 layout.
label(
RPT_(
"Settings are inside the Physics tab"), ICON_NONE);
CustomData interface, see also DNA_customdata_types.h.
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
#define INIT_DEFAULT_STRUCT_AFTER(struct_dst, member)
#define CD_MASK_MDEFORMVERT
#define CD_MASK_CLOTH_ORCO
constexpr int64_t size() const
constexpr T * data() const
int cloth_uses_vgroup(ClothModifierData *clmd)
static void copy_data(const ModifierData *md, ModifierData *target, const int flag)
PointerRNA * modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr)
ModifierTypeInfo modifierType_Cloth
static bool depends_on_time(Scene *, ModifierData *)
@ eModifierType_Collision
static void init_data(ModifierData *md)
void(*)(void *user_data, Object *ob, ID **idpoin, LibraryForeachIDCallbackFlag cb_flag) IDWalkFunc
static void update_depsgraph(tGraphSliderOp *gso)
static void foreach_ID_link(ModifierData *md, Object *ob, IDWalkFunc walk, void *user_data)
void DEG_add_depends_on_transform_relation(DepsNodeHandle *node_handle, const char *description)
@ LIB_ID_COPY_SET_COPIED_ON_WRITE
static void required_data_mask(ModifierData *, CustomData_MeshMasks *r_cddata_masks)
void clothModifier_do(ClothModifierData *clmd, Depsgraph *depsgraph, Scene *scene, Object *ob, const Mesh *mesh, float(*vertexCos)[3])
void modifier_error_message_draw(ui::Layout &layout, PointerRNA *ptr)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
KeyBlock * BKE_keyblock_find_by_index(Key *key, int index)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
static void free_data(ModifierData *md)
static void panel_register(ARegionType *region_type)
void DEG_add_collision_relations(DepsNodeHandle *handle, Object *object, Collection *collection, unsigned int modifier_type, DEG_CollobjFilterFunction filter_function, const char *name)
@ eModifierTypeFlag_UsesPointCache
@ eModifierTypeFlag_AcceptsMesh
@ eModifierTypeFlag_Single
void cloth_free_modifier_extern(ClothModifierData *clmd)
void BKE_ptcache_free_list(ListBaseT< PointCache > *ptcaches)
PanelType * modifier_panel_register(ARegionType *region_type, ModifierType type, PanelDrawFn draw)
@ eModifierFlag_SharedCaches
struct PointCache * BKE_ptcache_add(ListBaseT< PointCache > *ptcaches)
struct PointCache * BKE_ptcache_copy_list(ListBaseT< PointCache > *ptcaches_new, const ListBaseT< PointCache > *ptcaches_old, int flag)
static void panel_draw(const bContext *, Panel *panel)
static void deform_verts(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, MutableSpan< float3 > positions)
void * CustomData_get_layer_for_write(CustomData *data, eCustomDataType type, int totelem)
Key * BKE_key_from_object(Object *ob)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
@ CLOTH_COLLSETTINGS_FLAG_ENABLED
struct EffectorWeights * BKE_effector_add_weights(struct Collection *collection)
void * CustomData_add_layer(CustomData *data, eCustomDataType type, eCDAllocType alloctype, int totelem)
void DEG_add_forcefield_relations(DepsNodeHandle *handle, Object *object, EffectorWeights *eff, bool add_absorption, int skip_forcefield, const char *name)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
CLOTH_COLLISIONSETTINGS_FLAGS flags
struct Collection * group
struct Cloth * clothObject
struct ClothSolverResult * solver_result
struct ClothHairData * hairdata
struct ClothSimSettings * sim_parms
struct PointCache * point_cache
struct ListBaseT< PointCache > ptcaches
struct ClothCollSettings * coll_parms
struct EffectorWeights * effector_weights
struct Collection * group
void label(StringRef name, int icon)