Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object.c
| Context not available. | |||||
| #include <math.h> | #include <math.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include "CLG_log.h" | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| Context not available. | |||||
| #include "CCGSubSurf.h" | #include "CCGSubSurf.h" | ||||
| #include "atomic_ops.h" | #include "atomic_ops.h" | ||||
| static CLG_LogRef LOG = { "bke.object" }; | |||||
| /* Vertex parent modifies original BMesh which is not safe for threading. | /* Vertex parent modifies original BMesh which is not safe for threading. | ||||
| * Ideally such a modification should be handled as a separate DAG update | * Ideally such a modification should be handled as a separate DAG update | ||||
| * callback for mesh datablock, but for until it is actually supported use | * callback for mesh datablock, but for until it is actually supported use | ||||
| Context not available. | |||||
| case OB_EMPTY: return DATA_("Empty"); | case OB_EMPTY: return DATA_("Empty"); | ||||
| case OB_GPENCIL: return DATA_("GPencil"); | case OB_GPENCIL: return DATA_("GPencil"); | ||||
| default: | default: | ||||
| printf("get_obdata_defname: Internal error, bad type: %d\n", type); | CLOG_ERROR(&LOG, "Internal error, bad type: %d", type); | ||||
| return DATA_("Empty"); | return DATA_("Empty"); | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| case OB_GPENCIL: return BKE_gpencil_data_addnew(bmain, name); | case OB_GPENCIL: return BKE_gpencil_data_addnew(bmain, name); | ||||
| case OB_EMPTY: return NULL; | case OB_EMPTY: return NULL; | ||||
| default: | default: | ||||
| printf("%s: Internal error, bad type: %d\n", __func__, type); | CLOG_ERROR(&LOG, "Internal error, bad type: %d", type); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| { | { | ||||
| /* paranoia checks */ | /* paranoia checks */ | ||||
| if (ID_IS_LINKED(ob) || !ID_IS_LINKED(target)) { | if (ID_IS_LINKED(ob) || !ID_IS_LINKED(target)) { | ||||
| printf("cannot make proxy\n"); | CLOG_ERROR(&LOG, "cannot make proxy"); | ||||
| return; | return; | ||||
| } | } | ||||
| Context not available. | |||||
| /* Make sure the bone is still valid */ | /* Make sure the bone is still valid */ | ||||
| pchan = BKE_pose_channel_find_name(par->pose, ob->parsubstr); | pchan = BKE_pose_channel_find_name(par->pose, ob->parsubstr); | ||||
| if (!pchan || !pchan->bone) { | if (!pchan || !pchan->bone) { | ||||
| printf("Object %s with Bone parent: bone %s doesn't exist\n", ob->id.name + 2, ob->parsubstr); | CLOG_ERROR(&LOG, "Object %s with Bone parent: bone %s doesn't exist", ob->id.name + 2, ob->parsubstr); | ||||
| unit_m4(mat); | unit_m4(mat); | ||||
| return; | return; | ||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| fprintf(stderr, | CLOG_ERROR(&LOG, "Evaluated mesh is needed to solve parenting, " | ||||
| "%s: Evaluated mesh is needed to solve parenting, " | "object position can be wrong now"); | ||||
| "object position can be wrong now\n", __func__); | |||||
| } | } | ||||
| } | } | ||||
| else if (ELEM(par->type, OB_CURVE, OB_SURF)) { | else if (ELEM(par->type, OB_CURVE, OB_SURF)) { | ||||
| Context not available. | |||||