- // Create a new PropertyNotification, temporarily owned
- SceneGraph::PropertyNotification* propertyNotification = SceneGraph::PropertyNotification::New( *mProxy,
- mProxyPropertyIndex,
- mPropertyType,
- mComponentIndex,
- GetImplementation(mCondition).type,
- mRawConditionArgs,
- mNotifyMode );
- // Keep a const pointer to the PropertyNotification.
- mPropertyNotification = propertyNotification;
-
- // Transfer scene object ownership to the update manager through a message
- AddPropertyNotificationMessage( mUpdateManager, propertyNotification );
+ const PropertyInputImpl* property = mObject->GetSceneObjectInputProperty(mObjectPropertyIndex);
+
+ // Create a new PropertyNotification, keep a const pointer to it
+ mPropertyNotification = SceneGraph::PropertyNotification::New(property,
+ mObjectPropertyIndex,
+ mPropertyType,
+ mComponentIndex,
+ GetImplementation(mCondition).type,
+ mRawConditionArgs,
+ mNotifyMode,
+ mCompare);
+ OwnerPointer<SceneGraph::PropertyNotification> transferOwnership(const_cast<SceneGraph::PropertyNotification*>(mPropertyNotification));
+ AddPropertyNotificationMessage(mUpdateManager, transferOwnership);