22 #define DNA_DEPRECATED_ALLOW
96 printf(
"Freed %d (Unconverted) Ipo-Curves from IPO '%s'\n", n, ipo->
id.
name + 2);
114 if (icu->driver !=
NULL) {
119 if (icu->driver !=
NULL) {
128 if (icu->driver !=
NULL) {
167 .struct_size =
sizeof(
Ipo),
169 .name_plural =
"ipos",
170 .translation_context =
"",
172 .asset_type_info =
NULL,
179 .foreach_cache =
NULL,
180 .foreach_path =
NULL,
188 .blend_read_undo_preserve =
NULL,
190 .lib_override_apply_post =
NULL,
211 {(1 << 0),
"layers", 0}, {(1 << 1),
"layers", 1}, {(1 << 2),
"layers", 2},
212 {(1 << 3),
"layers", 3}, {(1 << 4),
"layers", 4}, {(1 << 5),
"layers", 5},
213 {(1 << 6),
"layers", 6}, {(1 << 7),
"layers", 7}, {(1 << 8),
"layers", 8},
214 {(1 << 9),
"layers", 9}, {(1 << 10),
"layers", 10}, {(1 << 11),
"layers", 11},
215 {(1 << 12),
"layers", 12}, {(1 << 13),
"layers", 13}, {(1 << 14),
"layers", 14},
216 {(1 << 15),
"layers", 15}, {(1 << 16),
"layers", 16}, {(1 << 17),
"layers", 17},
217 {(1 << 18),
"layers", 18}, {(1 << 19),
"layers", 19},
223 #define RET_ABP(items) \
225 *tot = ARRAY_SIZE(items); \
266 return "delta_location";
269 return "delta_location";
272 return "delta_location";
276 return "rotation_euler";
279 return "rotation_euler";
282 return "rotation_euler";
285 return "delta_rotation_euler";
288 return "delta_rotation_euler";
291 return "delta_rotation_euler";
304 return "delta_scale";
307 return "delta_scale";
310 return "delta_scale";
326 poin = &(ob->pd->f_strength);
331 poin = &(ob->pd->f_power);
336 poin = &(ob->pd->pdef_damp);
341 poin = &(ob->pd->pdef_rdamp);
346 poin = &(ob->pd->pdef_perm);
351 poin = &(ob->pd->maxdist);
372 return "rotation_quaternion";
375 return "rotation_quaternion";
378 return "rotation_quaternion";
381 return "rotation_quaternion";
385 return "rotation_euler";
388 return "rotation_euler";
391 return "rotation_euler";
415 CLOG_ERROR(&
LOG,
"unmatched PoseChannel setting (code %d)", adrcode);
431 return "data.head_tail";
443 static char buf[128];
458 char kb_name_esc[
sizeof(kb->
name) * 2];
460 BLI_snprintf(buf,
sizeof(buf),
"key_blocks[\"%s\"].value", kb_name_esc);
464 BLI_snprintf(buf,
sizeof(buf),
"key_blocks[%d].value", adrcode);
473 const char *base =
NULL, *prop =
NULL;
474 static char buf[128];
478 base =
"textures[0]";
481 base =
"textures[1]";
484 base =
"textures[2]";
487 base =
"textures[3]";
490 base =
"textures[4]";
493 base =
"textures[5]";
496 base =
"textures[6]";
499 base =
"textures[7]";
502 base =
"textures[8]";
505 base =
"textures[9]";
508 base =
"textures[10]";
511 base =
"textures[11]";
514 base =
"textures[12]";
517 base =
"textures[13]";
520 base =
"textures[14]";
523 base =
"textures[15]";
526 base =
"textures[16]";
529 base =
"textures[17]";
533 adrcode = (adrcode & (
MA_MAP1 - 1));
537 poin = &(mtex->ofs[0]);
540 poin = &(mtex->ofs[1]);
543 poin = &(mtex->ofs[2]);
546 poin = &(mtex->size[0]);
549 poin = &(mtex->size[1]);
552 poin = &(mtex->size[2]);
564 poin = &(mtex->def_var);
567 poin = &(mtex->colfac);
570 poin = &(mtex->norfac);
573 poin = &(mtex->varfac);
577 prop =
"warp_factor";
611 return "noise_basis";
613 return "noise_basis";
618 return "feature_weights";
621 return "feature_weights";
624 return "feature_weights";
627 return "feature_weights";
629 return "minkovsky_exponent";
631 return "distance_metric";
637 return "noise_intensity";
641 return "distortion_amount";
648 return "highest_dimension";
687 return "diffuse_color";
690 return "diffuse_color";
693 return "diffuse_color";
697 return "specular_color";
700 return "specular_color";
703 return "specular_color";
707 return "mirror_color";
710 return "mirror_color";
713 return "mirror_color";
719 return "diffuse_intensity";
728 return "specular_intensity";
731 return "specular_hardness";
734 return "specular_opacity";
743 return "translucency";
746 return "raytrace_mirror.reflect";
749 return "raytrace_mirror.fresnel";
752 return "raytrace_mirror.fresnel_factor";
755 return "raytrace_transparency.fresnel";
758 return "raytrace_transparency.fresnel_factor";
782 return "ortho_scale";
798 poin = &(ca->YF_aperture);
801 poin = &(ca->dof_distance);
845 return "linear_attenuation";
847 return "quadratic_attenuation";
850 return "halo_intensity";
879 return "attenuation";
896 return "horizon_color";
899 return "horizon_color";
902 return "horizon_color";
905 return "zenith_color";
908 return "zenith_color";
911 return "zenith_color";
917 return "mist.intensity";
923 return "mist.height";
941 return "settings.clump_factor";
943 return "settings.angular_velocity_factor";
945 return "settings.particle_size";
947 return "settings.drag_factor";
949 return "settings.brownian_factor";
951 return "settings.damp_factor";
953 return "settings.length";
956 return "settings.acceleration";
959 return "settings.acceleration";
962 return "settings.acceleration";
964 return "settings.kink_amplitude";
966 return "settings.kink_frequency";
968 return "settings.kink_shape";
970 return "settings.billboard_tilt";
980 poin = &(part->pd->f_strength);
985 poin = &(part->pd->f_power);
990 poin = &(part->pd->maxdist);
995 poin = &(part->pd2->f_strength);
1000 poin = &(part->pd2->f_power);
1005 poin = &(part->pd2->maxdist);
1037 const char *propname =
NULL;
1040 int dummy_index = 0;
1048 switch (blocktype) {
1097 propname =
"eval_time";
1105 propname =
"effect_fader";
1108 propname =
"speed_fader";
1111 propname =
"blend_alpha";
1125 CLOG_WARN(&
LOG,
"No path for blocktype %d, adrcode %d yet", blocktype, adrcode);
1133 if ((propname ==
NULL) && (blocktype > 0)) {
1145 *array_index = dummy_index;
1151 if ((actname && actname[0]) && (constname && constname[0])) {
1158 buf,
sizeof(buf),
"pose.bones[\"%s\"].constraints[\"%s\"]", actname_esc, constname_esc);
1160 else if (actname && actname[0]) {
1161 if ((blocktype ==
ID_OB) &&
STREQ(actname,
"Object")) {
1165 else if ((blocktype ==
ID_KE) &&
STREQ(actname,
"Shape")) {
1168 strcpy(buf,
"data.shape_keys");
1174 BLI_snprintf(buf,
sizeof(buf),
"pose.bones[\"%s\"]", actname_esc);
1177 else if (constname && constname[0]) {
1181 BLI_snprintf(buf,
sizeof(buf),
"constraints[\"%s\"]", constname_esc);
1185 char seq_name_esc[(
sizeof(seq->
name) - 2) * 2];
1187 BLI_snprintf(buf,
sizeof(buf),
"sequence_editor.sequences_all[\"%s\"]", seq_name_esc);
1204 if (array_index ==
NULL) {
1205 BLI_snprintf(buf,
sizeof(buf),
"[\"%d\"]", dummy_index);
1263 if (idriver->
name[0]) {
1283 dtar->
id = (
ID *)idriver->
ob;
1291 dtar->
id = (
ID *)idriver->
ob;
1305 dtar->
id = (
ID *)idriver->
ob;
1321 dtar->
id = (
ID *)idriver->
ob;
1338 if (groups && grpname) {
1346 memset(&tmp_act, 0,
sizeof(
bAction));
1373 sizeof(agrp->
name));
1477 if (abp && totbits) {
1482 printf(
"\tconvert bitflag ipocurve, totbits = %d\n", totbits);
1494 for (
b = 0;
b < totbits;
b++, abp++) {
1498 if (
b < (totbits - 1)) {
1524 for (dst = fcurve->
bezt,
src = icu->
bezt, i = 0; i < fcurve->totvert; i++, dst++,
src++) {
1545 if (((
int)(dst->
vec[1][1])) & (abp->
bit)) {
1546 dst->
vec[0][1] = dst->
vec[1][1] = dst->
vec[2][1] = 1.0f;
1549 dst->
vec[0][1] = dst->
vec[1][1] = dst->
vec[2][1] = 0.0f;
1590 for (dst = fcu->
bezt,
src = icu->
bezt, i = 0; i < fcu->totvert; i++, dst++,
src++) {
1620 dst->
vec[0][1] *= fac;
1621 dst->
vec[1][1] *= fac;
1622 dst->
vec[2][1] *= fac;
1653 dst->
vec[0][0] *= fac;
1654 dst->
vec[1][0] *= fac;
1655 dst->
vec[2][0] *= fac;
1710 printf(
"ipo_to_animato\n");
1754 for (icu = ipo->
curve.
first; icu; icu = icn) {
1799 for (achan = act->chanbase.first; achan; achan = achann) {
1801 achann = achan->
next;
1813 conchann = conchan->
next;
1855 printf(
"ipo to animdata - ID:%s, IPO:%s, actname:%s constname:%s seqname:%s curves:%d\n",
1858 (actname) ? actname :
"<None>",
1859 (constname) ? constname :
"<None>",
1860 (seq) ? (seq->
name + 2) :
"<None>",
1873 printf(
"\thas anim\n");
1883 printf(
"\t\tadded new action - '%s'\n", nameBuf);
1892 if (drivers.
first) {
1894 printf(
"\thas drivers\n");
1909 if (
ELEM(
NULL, adt, act->chanbase.first)) {
1917 printf(
"act_to_adt - set adt action to act\n");
1941 for (as = strips->
first; as; as = asn) {
2035 IpoCurve *icu = (seq->ipo) ? seq->ipo->curve.first :
NULL;
2039 printf(
"\tconverting sequence strip %s\n", seq->
name + 2);
2051 switch (seq->
type) {
2087 if (bmain ==
NULL) {
2098 printf(
"INFO: Converting to Animato...\n");
2111 printf(
"\tconverting ob %s\n",
id->
name + 2);
2115 if (ob->nlastrips.first) {
2137 else if ((ob->ipo) || (ob->action)) {
2146 if (ob->action != adt->
action) {
2204 if (ob->constraintChannels.first) {
2208 for (conchan = ob->constraintChannels.first; conchan; conchan = conchann) {
2210 conchann = conchan->
next;
2227 if (adt && adt->
action) {
2238 printf(
"\tconverting key %s\n",
id->
name + 2);
2266 printf(
"\tconverting material %s\n",
id->
name + 2);
2291 printf(
"\tconverting world %s\n",
id->
name + 2);
2326 printf(
"\tconverting texture %s\n",
id->
name + 2);
2351 printf(
"\tconverting camera %s\n",
id->
name + 2);
2376 printf(
"\tconverting light %s\n",
id->
name + 2);
2401 printf(
"\tconverting curve %s\n",
id->
name + 2);
2437 printf(
"\tconverting action %s\n",
id->
name + 2);
2441 if (act->chanbase.first) {
2454 printf(
"\tconverting ipo %s\n",
id->
name + 2);
2476 printf(
"INFO: Animato convert done\n");
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
struct bActionGroup * BKE_action_group_find_name(struct bAction *act, const char name[])
struct bAction * BKE_action_add(struct Main *bmain, const char name[])
void action_groups_add_channel(struct bAction *act, struct bActionGroup *agrp, struct FCurve *fcurve)
struct AnimData * BKE_animdata_ensure_id(struct ID *id)
struct AnimData * BKE_animdata_from_id(const struct ID *id)
struct FCurve * BKE_fcurve_copy(const struct FCurve *fcu)
void BKE_fcurves_free(ListBase *list)
struct FModifier * add_fmodifier(ListBase *modifiers, int type, struct FCurve *owner_fcu)
struct FCurve * BKE_fcurve_create(void)
struct DriverVar * driver_add_new_variable(struct ChannelDriver *driver)
void driver_change_variable_type(struct DriverVar *dvar, int type)
@ IDTYPE_FLAGS_NO_ANIMDATA
@ IDTYPE_FLAGS_NO_LIBLINKING
struct KeyBlock * BKE_keyblock_from_key(struct Key *key, int index)
void id_us_min(struct ID *id)
void BKE_nlastrip_validate_name(struct AnimData *adt, struct NlaStrip *strip)
bool BKE_nlatrack_add_strip(struct NlaTrack *nlt, struct NlaStrip *strip, bool is_liboverride)
struct NlaTrack * BKE_nlatrack_add(struct AnimData *adt, struct NlaTrack *prev, bool is_liboverride)
A dynamically sized string ADT.
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
void BLI_dynstr_append(DynStr *__restrict ds, const char *cstr) ATTR_NONNULL()
BLI_INLINE void BLI_endian_switch_int16(short *val) ATTR_NONNULL(1)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_len)
#define BLO_read_data_address(reader, ptr_p)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
bool BLO_read_requires_endian_switch(BlendDataReader *reader)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define ID_REAL_USERS(id)
@ NLASTRIP_FLAG_AUTO_BLENDS
@ NLASTRIP_FLAG_SYNC_LENGTH
@ FCM_EXTRAPOLATE_CYCLIC_OFFSET
@ DVAR_TYPE_TRANSFORM_CHAN
@ NLASTRIP_EXTEND_NOTHING
#define IPO_DRIVER_TYPE_PYTHON
Object is a sort of wrapper for general info.
@ SEQ_USE_EFFECT_DEFAULT_FADE
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
static void mul(btAlignedObjectArray< T > &items, const Q &value)
SyclQueue void void * src
static const char * ob_adrcodes_to_paths(int adrcode, int *array_index)
static AdrBit2Path ob_layer_bits[]
static void ipo_blend_read_data(BlendDataReader *reader, ID *id)
static bool seq_convert_callback(Sequence *seq, void *userdata)
static void action_to_animato(ID *id, bAction *act, ListBase *groups, ListBase *curves, ListBase *drivers)
static char * shapekey_adrcodes_to_paths(ID *id, int adrcode, int *UNUSED(array_index))
static const char * pchan_adrcodes_to_paths(int adrcode, int *array_index)
static void ipo_blend_read_lib(BlendLibReader *reader, ID *id)
static void nlastrips_to_animdata(ID *id, ListBase *strips)
static void ipo_blend_read_expand(BlendExpander *expander, ID *id)
static void action_to_animdata(ID *id, bAction *act)
static const char * sound_adrcodes_to_paths(int adrcode, int *array_index)
struct AdrBit2Path AdrBit2Path
static const char * light_adrcodes_to_paths(int adrcode, int *array_index)
static void ipo_to_animato(ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq, ListBase *animgroups, ListBase *anim, ListBase *drivers)
static const char * texture_adrcodes_to_paths(int adrcode, int *array_index)
static const char * constraint_adrcodes_to_paths(int adrcode, int *array_index)
void do_versions_ipos_to_animato(Main *bmain)
static ChannelDriver * idriver_to_cdriver(IpoDriver *idriver)
static AdrBit2Path * adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *tot)
static void ipo_to_animdata(Main *bmain, ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq)
static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname, Sequence *seq, int muteipo)
static const char * camera_adrcodes_to_paths(int adrcode, int *array_index)
static const char * material_adrcodes_to_paths(int adrcode, int *array_index)
static const char * particle_adrcodes_to_paths(int adrcode, int *array_index)
static const char * world_adrcodes_to_paths(int adrcode, int *array_index)
static short adrcode_to_dtar_transchan(short adrcode)
struct Seq_callback_data Seq_callback_data
static void fcurve_add_to_list(ListBase *groups, ListBase *list, FCurve *fcu, char *grpname, int muteipo)
static void ipo_free_data(ID *id)
static char * get_rna_access(ID *id, int blocktype, int adrcode, char actname[], char constname[], Sequence *seq, int *array_index)
static const char * mtex_adrcodes_to_paths(int adrcode, int *UNUSED(array_index))
void SEQ_for_each_callback(ListBase *seqbase, SeqForEachFunc callback, void *user_data)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
struct bActionChannel * next
ListBase constraintChannels
struct bActionStrip * next
struct bConstraintChannel * next
struct bConstraint * next
struct bPoseChannel * next