Ejemplo n.º 1
0
/* matches clip function */
bool ED_space_image_check_show_maskedit(Scene *scene, SpaceImage *sima)
{
	/* check editmode - this is reserved for UV editing */
	Object *ob = OBACT;
	if (ob && ob->mode & OB_MODE_EDIT && ED_space_image_show_uvedit(sima, ob)) {
		return false;
	}

	return (sima->mode == SI_MODE_MASK);
}
Ejemplo n.º 2
0
void draw_uvedit_main(SpaceImage *sima, ARegion *ar, Scene *scene, Object *obedit)
{
	int show_uvedit, show_uvshadow;

	show_uvedit= ED_space_image_show_uvedit(sima, obedit);
	show_uvshadow= ED_space_image_show_uvshadow(sima, obedit);

	if(show_uvedit || show_uvshadow) {
		/* this is basically the same object_handle_update as in the 3d view,
		 * here we have to do it as well for the object we are editing if we
		 * are displaying the final result */
		if(obedit && (sima->flag & SI_DRAWSHADOW))
			object_handle_update(scene, obedit);

		if(show_uvshadow)
			draw_uvs_shadow(sima, obedit);
		else
			draw_uvs(sima, scene, obedit);

		if(show_uvedit)
			drawcursor_sima(sima, ar);
	}
}