Blender  V3.3
layer_utils.c File Reference
#include <string.h>
#include "BLI_array.h"
#include "BKE_collection.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "DNA_ID.h"
#include "DNA_layer_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Functions

Selected Object Array
Object ** BKE_view_layer_array_selected_objects_params (struct ViewLayer *view_layer, const struct View3D *v3d, uint *r_len, const struct ObjectsInViewLayerParams *params)
 
Objects in Mode Array
Base ** BKE_view_layer_array_from_bases_in_mode_params (ViewLayer *view_layer, const View3D *v3d, uint *r_len, const struct ObjectsInModeParams *params)
 
Object ** BKE_view_layer_array_from_objects_in_mode_params (ViewLayer *view_layer, const View3D *v3d, uint *r_len, const struct ObjectsInModeParams *params)
 
Filter Functions
bool BKE_view_layer_filter_edit_mesh_has_uvs (const Object *ob, void *UNUSED(user_data))
 
bool BKE_view_layer_filter_edit_mesh_has_edges (const Object *ob, void *UNUSED(user_data))
 
Object * BKE_view_layer_non_active_selected_object (struct ViewLayer *view_layer, const struct View3D *v3d)
 

Function Documentation

◆ BKE_view_layer_array_from_bases_in_mode_params()

Base** BKE_view_layer_array_from_bases_in_mode_params ( ViewLayer *  view_layer,
const View3D *  v3d,
uint *  r_len,
const struct ObjectsInModeParams *  params 
)

◆ BKE_view_layer_array_from_objects_in_mode_params()

Object** BKE_view_layer_array_from_objects_in_mode_params ( ViewLayer *  view_layer,
const View3D *  v3d,
uint *  r_len,
const struct ObjectsInModeParams *  params 
)

◆ BKE_view_layer_array_selected_objects_params()

Object** BKE_view_layer_array_selected_objects_params ( struct ViewLayer *  view_layer,
const struct View3D *  v3d,
uint *  r_len,
const struct ObjectsInViewLayerParams *  params 
)

◆ BKE_view_layer_filter_edit_mesh_has_edges()

bool BKE_view_layer_filter_edit_mesh_has_edges ( const Object *  ob,
void *  UNUSEDuser_data 
)

◆ BKE_view_layer_filter_edit_mesh_has_uvs()

bool BKE_view_layer_filter_edit_mesh_has_uvs ( const Object *  ob,
void *  UNUSEDuser_data 
)

◆ BKE_view_layer_non_active_selected_object()

Object* BKE_view_layer_non_active_selected_object ( struct ViewLayer *  view_layer,
const struct View3D *  v3d 
)

Use this in rare cases we need to detect a pair of objects (active, selected). This returns the other non-active selected object.

Returns NULL with it finds multiple other selected objects as behavior in this case would be random from the user perspective.

Definition at line 186 of file layer_utils.c.

References FOREACH_SELECTED_OBJECT_BEGIN, FOREACH_SELECTED_OBJECT_END, NULL, and OBACT.

Referenced by gpencil_bake_mesh_animation_exec(), and gpencil_trace_image_exec().