26#include "RNA_prototypes.hh"
34template<LightLinkingType link_type>
48 ot->
name =
"New Light Linking Collection";
49 ot->
description =
"Create new light linking collection used by the active emitter";
50 ot->
idname =
"OBJECT_OT_light_linking_receiver_collection_new";
63 ot->
name =
"New Light Linking Collection";
64 ot->
description =
"Create new light linking collection used by the active emitter";
65 ot->
idname =
"OBJECT_OT_light_linking_blocker_collection_new";
81template<LightLinkingType link_type>
98 ot->
name =
"Select Light Linking Receivers";
99 ot->
description =
"Select all objects which receive light from this emitter";
100 ot->
idname =
"OBJECT_OT_light_linking_receivers_select";
113 ot->
name =
"Select Light Linking Blockers";
114 ot->
description =
"Select all objects which block light from this emitter";
115 ot->
idname =
"OBJECT_OT_light_linking_blockers_select";
131template<LightLinkingType link_type>
142 if (receiver == emitter) {
165 "Include selected receivers to receive light from the active emitter"},
170 "Exclude selected receivers from receiving light from the active emitter"},
171 {0,
nullptr, 0,
nullptr,
nullptr},
175 ot->
name =
"Link Receivers to Emitter";
176 ot->
description =
"Light link selected receivers to the active emitter object";
177 ot->
idname =
"OBJECT_OT_light_linking_receivers_link";
191 "State of the light linking");
201 "Include selected blockers to cast shadows from the active emitter"},
206 "Exclude selected blockers from casting shadows from the active emitter"},
207 {0,
nullptr, 0,
nullptr,
nullptr},
211 ot->
name =
"Link Blockers to Emitter";
212 ot->
description =
"Light link selected blockers to the active emitter object";
213 ot->
idname =
"OBJECT_OT_light_linking_blockers_link";
227 "State of the shadow linking");
244 if (!
id || !collection) {
263 ot->
name =
"Remove From Light Linking Collection";
264 ot->
description =
"Remove this object or collection from the light linking collection";
265 ot->
idname =
"OBJECT_OT_light_linking_unlink_from_collection";
#define CTX_DATA_BEGIN(C, Type, instance, member)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_light_linking_select_receivers_of_emitter(struct Scene *scene, struct ViewLayer *view_layer, struct Object *emitter, LightLinkingType link_type)
bool BKE_light_linking_unlink_id_from_collection(struct Main *bmain, struct Collection *collection, struct ID *id, struct ReportList *reports)
struct Collection * BKE_light_linking_collection_new(struct Main *bmain, struct Object *object, LightLinkingType link_type)
void BKE_light_linking_link_receiver_to_emitter(struct Main *bmain, struct Object *emitter, struct Object *receiver, LightLinkingType link_type, eCollectionLightLinkingState link_state)
Object groups, one object can be in many groups at once.
eCollectionLightLinkingState
@ COLLECTION_LIGHT_LINKING_STATE_EXCLUDE
@ COLLECTION_LIGHT_LINKING_STATE_INCLUDE
bool ED_operator_object_active(bContext *C)
bool ED_operator_object_active_editable(bContext *C)
#define ND_SPACE_OUTLINER
void OBJECT_OT_light_linking_receiver_collection_new(wmOperatorType *ot)
static int light_linking_collection_new_exec(bContext *C, wmOperator *)
static int light_linking_link_exec(bContext *C, wmOperator *op)
static int light_linking_unlink_from_collection_exec(bContext *C, wmOperator *op)
static int light_linking_select_exec(bContext *C, wmOperator *)
void OBJECT_OT_light_linking_blocker_collection_new(wmOperatorType *ot)
void OBJECT_OT_light_linking_unlink_from_collection(wmOperatorType *ot)
Object * context_active_object(const bContext *C)
void OBJECT_OT_light_linking_receivers_link(wmOperatorType *ot)
void OBJECT_OT_light_linking_blockers_select(wmOperatorType *ot)
void OBJECT_OT_light_linking_receivers_select(wmOperatorType *ot)
void OBJECT_OT_light_linking_blockers_link(wmOperatorType *ot)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)