PDA

View Full Version : LWEVNT_NOTIFY_ITEM_ADDED not working as documented



GregMalick
01-28-2009, 06:09 PM
As defined in SDK:

LWEVNT_NOTIFY_ITEM_ADDED:
This indicates an item has been added. An item is considered an object, light, camera, or bone; null items and objects. 'eventData' is the item id that was added.

I put this in a Master plugin of mine and noticed that Lights & Cameras do not trigger this eventcode. Not for scene opens nor for LoadfromScene.

Objects, Nulls, and Bones are fine.

Lights and Cameras are of course loaded - they just don't trigger the event as documented.

I tested in both v9.3 & v9.6 with the same results.

Sensei
01-31-2009, 12:53 PM
How about manual adding in menu lights and cameras? Do they send notifications?

GregMalick
01-31-2009, 06:15 PM
Yes. When you manually add Lights or Cameras via the menu, LWEVNT_NOTIFY_ITEM_ADDED is triggered.

I worked around the problem by determining which additional Lights & Cameras are loaded after a LWEVNT_NOTIFY_SCENE_LOAD_COMPLETE. That event is also triggered when a "Load From Scene " occurs.

NewTek should either fix the documentation or fix the Event Trigger.

No sense in developers wasting their time coding against documentation that misleads. :D