• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ BKE_report函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中BKE_report函数的典型用法代码示例。如果您正苦于以下问题:C++ BKE_report函数的具体用法?C++ BKE_report怎么用?C++ BKE_report使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了BKE_report函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: objects_add_active_exec

static int objects_add_active_exec(bContext *C, wmOperator *op)
{
	Object *ob = ED_object_context(C);
	Main *bmain = CTX_data_main(C);
	Scene *scene = CTX_data_scene(C);
	int group_object_index = RNA_enum_get(op->ptr, "group");
	int is_cycle = FALSE;

	if (ob) {
		Group *group = group_object_active_find_index(ob, group_object_index);

		/* now add all selected objects from the group */
		if (group) {

			/* for recursive check */
			tag_main_lb(&bmain->group, TRUE);

			CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
			{
				if (group_link_early_exit_check(group, base->object))
					continue;

				if (base->object->dup_group != group && !check_group_contains_object_recursive(group, base->object)) {
					BKE_group_object_add(group, base->object, scene, base);
				}
				else {
					is_cycle = TRUE;
				}
			}
			CTX_DATA_END;

			if (is_cycle) {
				BKE_report(op->reports, RPT_WARNING, "Skipped some groups because of cycle detected");
			}

			DAG_relations_tag_update(bmain);
			WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);

			return OPERATOR_FINISHED;
		}
	}

	return OPERATOR_CANCELLED;
}
开发者ID:Eibriel,项目名称:kiriblender,代码行数:44,代码来源:object_group.c


示例2: mesh_bisect_invoke

static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
	Object *obedit = CTX_data_edit_object(C);
	BMEditMesh *em = BKE_editmesh_from_object(obedit);
	int ret;

	if (em->bm->totedgesel == 0) {
		BKE_report(op->reports, RPT_ERROR, "Selected edges/faces required");
		return OPERATOR_CANCELLED;
	}

	/* if the properties are set or there is no rv3d,
	 * skip model and exec immediately */

	if ((CTX_wm_region_view3d(C) == NULL) ||
	    (RNA_struct_property_is_set(op->ptr, "plane_co") &&
	     RNA_struct_property_is_set(op->ptr, "plane_no")))
	{
		return mesh_bisect_exec(C, op);
	}

	ret = WM_gesture_straightline_invoke(C, op, event);
	if (ret & OPERATOR_RUNNING_MODAL) {
		View3D *v3d = CTX_wm_view3d(C);

		wmGesture *gesture = op->customdata;
		BisectData *opdata;


		opdata = MEM_mallocN(sizeof(BisectData), "inset_operator_data");
		opdata->mesh_backup = EDBM_redo_state_store(em);
		opdata->is_first = true;
		gesture->userdata = opdata;

		/* misc other vars */
		G.moving = G_TRANSFORM_EDIT;
		opdata->twtype = v3d->twtype;
		v3d->twtype = 0;

		/* initialize modal callout */
		ED_area_headerprint(CTX_wm_area(C), IFACE_("LMB: Click and drag to draw cut line"));
	}
	return ret;
}
开发者ID:Andrewson3D,项目名称:blender-for-vray,代码行数:44,代码来源:editmesh_bisect.c


示例3: action_layer_prev_exec

static int action_layer_prev_exec(bContext *C, wmOperator *op)
{
	AnimData *adt = ED_actedit_animdata_from_context(C);
	NlaTrack *act_track;
	NlaTrack *nlt;
	
	Scene *scene = CTX_data_scene(C);
	float ctime = BKE_scene_frame_get(scene);
	
	/* Sanity Check */
	if (adt == NULL) {
		BKE_report(op->reports, RPT_ERROR, "Internal Error: Could not find Animation Data/NLA Stack to use");
		return OPERATOR_CANCELLED;
	}
	
	/* Get active track */
	act_track = BKE_nlatrack_find_tweaked(adt);
	
	/* If there is no active track, that means we are using the active action... */
	if (act_track) {
		/* Active Track - Start from the one below it */
		nlt = act_track->prev;
	}
	else {
		/* Active Action - Use the top-most track */
		nlt = adt->nla_tracks.last;
	}
	
	/* Find previous action and hook it up */
	for (; nlt; nlt = nlt->prev) {
		NlaStrip *strip = action_layer_get_nlastrip(&nlt->strips, ctime);
		
		if (strip) {
			action_layer_switch_strip(adt, act_track, adt->actstrip, nlt, strip);
			break;
		}
	}
	
	/* Update the action that this editor now uses
	 * NOTE: The calls above have already handled the usercount/animdata side of things
	 */
	actedit_change_action(C, adt->action);
	return OPERATOR_FINISHED;
}
开发者ID:diekev,项目名称:blender,代码行数:44,代码来源:action_data.c


示例4: create_navmesh_exec

static int create_navmesh_exec(bContext *C, wmOperator *op)
{
	Scene* scene= CTX_data_scene(C);
	LinkNode* obs= NULL;
	Base* navmeshBase= NULL;

	CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
		if (base->object->type == OB_MESH) {
			if (base->object->body_type==OB_BODY_TYPE_NAVMESH) {
				if (!navmeshBase || base == scene->basact) {
					navmeshBase= base;
				}
			}
			else {
				BLI_linklist_append(&obs, (void*)base->object);
			}
		}
	}
	CTX_DATA_END;

	if (obs) {
		struct recast_polyMesh *pmesh= NULL;
		struct recast_polyMeshDetail *dmesh= NULL;

		int nverts= 0, ntris= 0;
		int *tris= 0;
		float *verts= NULL;

		createVertsTrisData(C, obs, &nverts, &verts, &ntris, &tris);
		BLI_linklist_free(obs, NULL);
		buildNavMesh(&scene->gm.recastData, nverts, verts, ntris, tris, &pmesh, &dmesh);
		createRepresentation(C, pmesh, dmesh, navmeshBase);

		MEM_freeN(verts);
		MEM_freeN(tris);

		return OPERATOR_FINISHED;
	}
	else {
		BKE_report(op->reports, RPT_ERROR, "No mesh objects found");

		return OPERATOR_CANCELLED;
	}
}
开发者ID:BHCLL,项目名称:blendocv,代码行数:44,代码来源:mesh_navmesh.c


示例5: EDBM_op_finish

/* returns 0 on error, 1 on success.  executes and finishes a bmesh operator */
bool EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const bool do_report)
{
	const char *errmsg;

	BMO_op_finish(em->bm, bmop);

	if (BMO_error_get(em->bm, &errmsg, NULL)) {
		BMEditMesh *emcopy = em->emcopy;

		if (do_report) {
			BKE_report(op->reports, RPT_ERROR, errmsg);
		}

		EDBM_mesh_free(em);
		*em = *emcopy;

		MEM_freeN(emcopy);
		em->emcopyusers = 0;
		em->emcopy = NULL;

		/* when copying, tessellation isn't to for faster copying,
		 * but means we need to re-tessellate here */
		if (em->looptris == NULL) {
			BKE_editmesh_tessface_calc(em);
		}

		return false;
	}
	else {
		em->emcopyusers--;
		if (em->emcopyusers < 0) {
			printf("warning: em->emcopyusers was less than zero.\n");
		}

		if (em->emcopyusers <= 0) {
			BKE_editmesh_free(em->emcopy);
			MEM_freeN(em->emcopy);
			em->emcopy = NULL;
		}

		return true;
	}
}
开发者ID:mgschwan,项目名称:blensor,代码行数:44,代码来源:editmesh_utils.c


示例6: outliner_action_set_exec

static int outliner_action_set_exec(bContext *C, wmOperator *op)
{
	SpaceOops *soops = CTX_wm_space_outliner(C);
	int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
	
	bAction *act;
	
	/* check for invalid states */
	if (soops == NULL)
		return OPERATOR_CANCELLED;
	set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
	
	/* get action to use */
	act = BLI_findlink(&CTX_data_main(C)->action, RNA_enum_get(op->ptr, "action"));
	
	if (act == NULL) {
		BKE_report(op->reports, RPT_ERROR, "No valid action to add");
		return OPERATOR_CANCELLED;
	}
	else if (act->idroot == 0) {
		/* hopefully in this case (i.e. library of userless actions), the user knows what they're doing... */
		BKE_reportf(op->reports, RPT_WARNING,
		            "Action '%s' does not specify what datablocks it can be used on "
		            "(try setting the 'ID Root Type' setting from the Datablocks Editor "
		            "for this action to avoid future problems)",
		            act->id.name + 2);
	}
	
	/* perform action if valid channel */
	if (datalevel == TSE_ANIM_DATA)
		outliner_do_id_set_operation(soops, datalevel, &soops->tree, (ID *)act, actionset_id_cb);
	else if (idlevel == ID_AC)
		outliner_do_id_set_operation(soops, idlevel, &soops->tree, (ID *)act, actionset_id_cb);
	else
		return OPERATOR_CANCELLED;
		
	/* set notifier that things have changed */
	WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);
	ED_undo_push(C, "Set action");
	
	/* done */
	return OPERATOR_FINISHED;
}
开发者ID:244xiao,项目名称:blender,代码行数:43,代码来源:outliner_tools.c


示例7: start_avi

static int start_avi(Scene *scene, RenderData *rd, int rectx, int recty, ReportList *reports)
{
    int x, y;
    char name[256];
    AviFormat format;
    int quality;
    double framerate;

    (void)scene; /* unused */

    filepath_avi(name, rd);

    x = rectx;
    y = recty;

    quality = rd->im_format.quality;
    framerate = (double) rd->frs_sec / (double) rd->frs_sec_base;

    avi = MEM_mallocN(sizeof(AviMovie), "avimovie");

    if (rd->im_format.imtype != R_IMF_IMTYPE_AVIJPEG) format = AVI_FORMAT_AVI_RGB;
    else format = AVI_FORMAT_MJPEG;

    if (AVI_open_compress(name, avi, 1, format) != AVI_ERROR_NONE) {
        BKE_report(reports, RPT_ERROR, "Cannot open or start AVI movie file");
        MEM_freeN(avi);
        avi = NULL;
        return 0;
    }

    AVI_set_compress_option(avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_WIDTH, &x);
    AVI_set_compress_option(avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_HEIGHT, &y);
    AVI_set_compress_option(avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_QUALITY, &quality);
    AVI_set_compress_option(avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_FRAMERATE, &framerate);

    avi->interlace = 0;
    avi->odd_fields = 0;
    /*  avi->interlace = rd->mode & R_FIELDS; */
    /*  avi->odd_fields = (rd->mode & R_ODDFIELD) ? 1 : 0; */

    printf("Created avi: %s\n", name);
    return 1;
}
开发者ID:ruesp83,项目名称:Blender---Layer,代码行数:43,代码来源:writeavi.c


示例8: rna_KeyingSet_paths_clear

static void rna_KeyingSet_paths_clear(KeyingSet *keyingset, ReportList *reports)
{
	/* if data is valid, call the API function for this */
	if (keyingset) {
		KS_Path *ksp, *kspn;
		
		/* free each path as we go to avoid looping twice */
		for (ksp = keyingset->paths.first; ksp; ksp = kspn) {
			kspn = ksp->next;
			BKE_keyingset_free_path(keyingset, ksp);
		}
			
		/* reset the active path, since there aren't any left */
		keyingset->active_path = 0;
	}
	else {
		BKE_report(reports, RPT_ERROR, "Keying set paths could not be removed");
	}
}
开发者ID:244xiao,项目名称:blender,代码行数:19,代码来源:rna_animation.c


示例9: write_video_frame

/* Write a frame to the output file */
static int write_video_frame(RenderData *rd, AVFrame* frame, ReportList *reports)
{
	int outsize = 0;
	int ret, success= 1;
	AVCodecContext* c = video_stream->codec;

	frame->pts = rd->cfra - rd->sfra;

	if (rd->mode & R_FIELDS) {
		frame->top_field_first = ((rd->mode & R_ODDFIELD) != 0);
	}

	outsize = avcodec_encode_video(c, video_buffer, video_buffersize, 
					   frame);
	if (outsize != 0) {
		AVPacket packet;
		av_init_packet(&packet);

		if (c->coded_frame->pts != AV_NOPTS_VALUE) {
			packet.pts = av_rescale_q(c->coded_frame->pts,
						  c->time_base,
						  video_stream->time_base);
			fprintf(stderr, "Video Frame PTS: %d\n", (int)packet.pts);
		} else {
			fprintf(stderr, "Video Frame PTS: not set\n");
		}
		if (c->coded_frame->key_frame)
			packet.flags |= AV_PKT_FLAG_KEY;
		packet.stream_index = video_stream->index;
		packet.data = video_buffer;
		packet.size = outsize;
		ret = av_interleaved_write_frame(outfile, &packet);
	} else {
		ret = 0;
	}

	if (ret != 0) {
		success= 0;
		BKE_report(reports, RPT_ERROR, "Error writing frame.");
	}

	return success;
}
开发者ID:BHCLL,项目名称:blendocv,代码行数:44,代码来源:writeffmpeg.c


示例10: knifeproject_exec

static int knifeproject_exec(bContext *C, wmOperator *op)
{
	ARegion *ar = CTX_wm_region(C);
	Scene *scene = CTX_data_scene(C);
	Object *obedit = CTX_data_edit_object(C);
	BMEditMesh *em = BKE_editmesh_from_object(obedit);
	const bool cut_through = RNA_boolean_get(op->ptr, "cut_through");

	LinkNode *polys = NULL;

	CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
	{
		if (ob != obedit) {
			polys = knifeproject_poly_from_object(ar, scene, ob, polys);
		}
	}
	CTX_DATA_END;

	if (polys) {
		EDBM_mesh_knife(C, polys, true, cut_through);

		/* select only tagged faces */
		BM_mesh_elem_hflag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT, false);

		/* not essential, but switch out of vertex mode since the
		 * selected regions wont be nicely isolated after flushing.
		 * note: call after de-select to avoid selection flushing */
		EDBM_selectmode_disable(scene, em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE);

		BM_mesh_elem_hflag_enable_test(em->bm, BM_FACE, BM_ELEM_SELECT, true, false, BM_ELEM_TAG);

		BM_mesh_select_mode_flush(em->bm);

		BLI_linklist_freeN(polys);

		return OPERATOR_FINISHED;
	}
	else {
		BKE_report(op->reports, RPT_ERROR, "No other selected objects found to use for projection");
		return OPERATOR_CANCELLED;
	}
}
开发者ID:SuriyaaKudoIsc,项目名称:blender-git,代码行数:42,代码来源:editmesh_knife_project.c


示例11: ED_object_modifier_move_up

int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md)
{
	if(md->prev) {
		ModifierTypeInfo *mti = modifierType_getInfo(md->type);

		if(mti->type!=eModifierTypeType_OnlyDeform) {
			ModifierTypeInfo *nmti = modifierType_getInfo(md->prev->type);

			if(nmti->flags&eModifierTypeFlag_RequiresOriginalData) {
				BKE_report(reports, RPT_WARNING, "Cannot move above a modifier requiring original data");
				return 0;
			}
		}

		BLI_remlink(&ob->modifiers, md);
		BLI_insertlink(&ob->modifiers, md->prev->prev, md);
	}

	return 1;
}
开发者ID:ryden,项目名称:blender-mirror,代码行数:20,代码来源:object_modifier.c


示例12: BKE_spacetype_from_id

static ARegionType *region_type_find(ReportList *reports, int space_type, int region_type)
{
	SpaceType *st;
	ARegionType *art;

	st = BKE_spacetype_from_id(space_type);

	for (art = (st) ? st->regiontypes.first : NULL; art; art = art->next) {
		if (art->regionid == region_type)
			break;
	}

	/* region type not found? abort */
	if (art == NULL) {
		BKE_report(reports, RPT_ERROR, "Region not found in space type");
		return NULL;
	}

	return art;
}
开发者ID:Ichthyostega,项目名称:blender,代码行数:20,代码来源:rna_ui.c


示例13: ED_object_modifier_move_down

int ED_object_modifier_move_down(ReportList *reports, Object *ob, ModifierData *md)
{
	if(md->next) {
		ModifierTypeInfo *mti = modifierType_getInfo(md->type);

		if(mti->flags&eModifierTypeFlag_RequiresOriginalData) {
			ModifierTypeInfo *nmti = modifierType_getInfo(md->next->type);

			if(nmti->type!=eModifierTypeType_OnlyDeform) {
				BKE_report(reports, RPT_WARNING, "Cannot move beyond a non-deforming modifier");
				return 0;
			}
		}

		BLI_remlink(&ob->modifiers, md);
		BLI_insertlink(&ob->modifiers, md->next, md);
	}

	return 1;
}
开发者ID:ryden,项目名称:blender-mirror,代码行数:20,代码来源:object_modifier.c


示例14: gp_layer_add_exec

/* add new layer - wrapper around API */
static int gp_layer_add_exec(bContext *C, wmOperator *op)
{
	bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL);
	
	/* if there's no existing Grease-Pencil data there, add some */
	if (gpd_ptr == NULL) {
		BKE_report(op->reports, RPT_ERROR, "Nowhere for grease pencil data to go");
		return OPERATOR_CANCELLED;
	}
	if (*gpd_ptr == NULL)
		*gpd_ptr = gpencil_data_addnew(DATA_("GPencil"));
	
	/* add new layer now */
	gpencil_layer_addnew(*gpd_ptr, DATA_("GP_Layer"), 1);
	
	/* notifiers */
	WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
	
	return OPERATOR_FINISHED;
}
开发者ID:diosney,项目名称:blender,代码行数:21,代码来源:gpencil_edit.c


示例15: BKE_report

static Base *rna_Object_local_view_property_helper(
    bScreen *sc, View3D *v3d, Object *ob, ReportList *reports, Scene **r_scene)
{
  if (v3d->localvd == NULL) {
    BKE_report(reports, RPT_ERROR, "Viewport not in local view");
    return NULL;
  }

  wmWindow *win = ED_screen_window_find(sc, G_MAIN->wm.first);
  ViewLayer *view_layer = WM_window_get_active_view_layer(win);
  Base *base = BKE_view_layer_base_find(view_layer, ob);
  if (base == NULL) {
    BKE_reportf(
        reports, RPT_WARNING, "Object %s not in view layer %s", ob->id.name + 2, view_layer->name);
  }
  if (r_scene) {
    *r_scene = win->scene;
  }
  return base;
}
开发者ID:dfelinto,项目名称:blender,代码行数:20,代码来源:rna_object_api.c


示例16: BKE_report

static wmKeyMapItem *rna_KeyMap_item_new_from_item(wmKeyMap *km,
                                                   ReportList *reports,
                                                   wmKeyMapItem *kmi_src,
                                                   bool head)
{
  /*  wmWindowManager *wm = CTX_wm_manager(C); */

  if ((km->flag & KEYMAP_MODAL) == (kmi_src->idname[0] != '\0')) {
    BKE_report(reports, RPT_ERROR, "Can not mix modal/non-modal items");
    return NULL;
  }

  /* create keymap item */
  wmKeyMapItem *kmi = WM_keymap_add_item_copy(km, kmi_src);
  if (head) {
    BLI_remlink(&km->items, kmi);
    BLI_addhead(&km->items, kmi);
  }
  return kmi;
}
开发者ID:dfelinto,项目名称:blender,代码行数:20,代码来源:rna_wm_api.c


示例17: ED_object_gpencil_modifier_copy

int ED_object_gpencil_modifier_copy(ReportList *reports, Object *ob, GpencilModifierData *md)
{
  GpencilModifierData *nmd;
  const GpencilModifierTypeInfo *mti = BKE_gpencil_modifierType_getInfo(md->type);
  GpencilModifierType type = md->type;

  if (mti->flags & eGpencilModifierTypeFlag_Single) {
    if (BKE_gpencil_modifiers_findByType(ob, type)) {
      BKE_report(reports, RPT_WARNING, "Only one modifier of this type is allowed");
      return 0;
    }
  }

  nmd = BKE_gpencil_modifier_new(md->type);
  BKE_gpencil_modifier_copyData(md, nmd);
  BLI_insertlinkafter(&ob->greasepencil_modifiers, md, nmd);
  BKE_gpencil_modifier_unique_name(&ob->greasepencil_modifiers, nmd);

  return 1;
}
开发者ID:dfelinto,项目名称:blender,代码行数:20,代码来源:object_gpencil_modifier.c


示例18: packAll

/* no libraries for now */
void packAll(Main *bmain, ReportList *reports, bool verbose)
{
	Image *ima;
	VFont *vfont;
	bSound *sound;
	int tot = 0;
	
	for (ima = bmain->image.first; ima; ima = ima->id.next) {
		if (BKE_image_has_packedfile(ima) == false && ima->id.lib == NULL) {
			if (ima->source == IMA_SRC_FILE) {
				BKE_image_packfiles(reports, ima, ID_BLEND_PATH(bmain, &ima->id));
				tot ++;
			}
			else if (BKE_image_is_animated(ima) && verbose) {
				BKE_reportf(reports, RPT_WARNING, "Image '%s' skipped, movies and image sequences not supported",
				            ima->id.name + 2);
			}
		}
	}

	for (vfont = bmain->vfont.first; vfont; vfont = vfont->id.next) {
		if (vfont->packedfile == NULL && vfont->id.lib == NULL && BKE_vfont_is_builtin(vfont) == false) {
			vfont->packedfile = newPackedFile(reports, vfont->name, bmain->name);
			tot ++;
		}
	}

	for (sound = bmain->sound.first; sound; sound = sound->id.next) {
		if (sound->packedfile == NULL && sound->id.lib == NULL) {
			sound->packedfile = newPackedFile(reports, sound->name, bmain->name);
			tot++;
		}
	}
	
	if (tot > 0)
		BKE_reportf(reports, RPT_INFO, "Packed %d files", tot);
	else if (verbose)
		BKE_report(reports, RPT_INFO, "No new files have been packed");


}
开发者ID:Bforartists,项目名称:Bforartists,代码行数:42,代码来源:packedFile.c


示例19: actkeys_sample_exec

static int actkeys_sample_exec(bContext *C, wmOperator *op)
{
	bAnimContext ac;
	
	/* get editor data */
	if (ANIM_animdata_get_context(C, &ac) == 0)
		return OPERATOR_CANCELLED;
		
	if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) {
		BKE_report(op->reports, RPT_ERROR, "Not implemented");
		return OPERATOR_PASS_THROUGH;
	}
	
	/* sample keyframes */
	sample_action_keys(&ac);
	
	/* set notifier that keyframes have changed */
	WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
	
	return OPERATOR_FINISHED;
}
开发者ID:pawkoz,项目名称:dyplom,代码行数:21,代码来源:action_edit.c


示例20: actkeys_copy_exec

static int actkeys_copy_exec(bContext *C, wmOperator *op)
{
	bAnimContext ac;
	
	/* get editor data */
	if (ANIM_animdata_get_context(C, &ac) == 0)
		return OPERATOR_CANCELLED;
	
	/* copy keyframes */
	if (ac.datatype == ANIMCONT_GPENCIL) {
		// FIXME...
	}
	else {
		if (copy_action_keys(&ac)) {	
			BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer");
			return OPERATOR_CANCELLED;
		}
	}
	
	return OPERATOR_FINISHED;
}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:21,代码来源:action_edit.c



注:本文中的BKE_report函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BKE_reportf函数代码示例发布时间:2022-05-30
下一篇:
C++ BKE_paint_get_active_from_context函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap