Value* getMaxLights_cf(Value** arg_list, int count) { check_arg_count(getMaxLights, 0, count); GraphicsWindow *gw = MAXScript_interface->GetActiveViewExp().getGW(); if (MaxSDK::Graphics::IsRetainedModeEnabled() && gw->querySupport(GW_SPT_NUM_LIGHTS) == 0) { return &undefined; } int n = gw->getMaxLights(); return Integer::intern(n); }