Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/buttons_texture.c
| Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | bool ED_texture_context_check_particles(const bContext *C) | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| return (ob && ob->particlesystem.first); | return (ob && ob->particlesystem.first); | ||||
| } | } | ||||
| bool ED_texture_context_check_linestyle(const bContext *C) | bool ED_texture_context_check_linestyle(const bContext *C) | ||||
| { | { | ||||
| #ifdef WITH_FREESTYLE | #ifdef WITH_FREESTYLE | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| SceneRenderLayer *actsrl; | SceneLayer *active_render_layer; | ||||
| FreestyleConfig *config; | FreestyleConfig *config; | ||||
| FreestyleLineSet *lineset; | FreestyleLineSet *lineset; | ||||
| FreestyleLineStyle *linestyle; | FreestyleLineStyle *linestyle; | ||||
| if (scene && (scene->r.mode & R_EDGE_FRS)) { | if (scene && (scene->r.mode & R_EDGE_FRS)) { | ||||
| actsrl = BLI_findlink(&scene->r.layers, scene->r.actlay); | active_render_layer = BLI_findlink(&scene->render_layers, scene->active_layer); | ||||
| config = &actsrl->freestyleConfig; | config = &active_render_layer->freestyle_config; | ||||
| if (config->mode == FREESTYLE_CONTROL_EDITOR_MODE) { | if (config->mode == FREESTYLE_CONTROL_EDITOR_MODE) { | ||||
| lineset = BKE_freestyle_lineset_get_active(config); | lineset = BKE_freestyle_lineset_get_active(config); | ||||
| if (lineset) { | if (lineset) { | ||||
| linestyle = lineset->linestyle; | linestyle = lineset->linestyle; | ||||
| return linestyle && (linestyle->flag & LS_TEXTURE); | return linestyle && (linestyle->flag & LS_TEXTURE); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 573 Lines • Show Last 20 Lines | |||||